diff --git a/yazi/keymap.toml b/yazi/keymap.toml index 8d598d2..1ac8718 100644 --- a/yazi/keymap.toml +++ b/yazi/keymap.toml @@ -201,7 +201,7 @@ keymap = [ { on = "", run = "help", desc = "Open help" }, ] -[select] +[pick] keymap = [ { on = "", run = "close", desc = "Cancel selection" }, diff --git a/yazi/plugins/yaziline.yazi/init.lua b/yazi/plugins/yaziline.yazi/init.lua index 32c64f4..c635b1a 100644 --- a/yazi/plugins/yaziline.yazi/init.lua +++ b/yazi/plugins/yaziline.yazi/init.lua @@ -38,14 +38,14 @@ local function setup(_, options) return ui.Span(" " .. mode .. " "):style(style) end - function Status:size() + function Status:size() local h = self._tab.current.hovered if not h then - return ui.Line {} + return ui.Line {} end local style = self:style() - return ui.Span(current_separator_style.separator_close .. " " .. ya.readable_size(h:size() or h.cha.length) .. " ") + return ui.Span(current_separator_style.separator_close .. " " .. ya.readable_size(h:size() or h.cha.len) .. " ") :fg(style.bg):bg(THEME.status.separator_style.bg) end @@ -85,14 +85,18 @@ local function setup(_, options) } end - function Status:modified() + function Status:modified() local hovered = cx.active.current.hovered + if not hovered then + return ui.Line {} -- Return empty line if no file is hovered + end + local cha = hovered.cha - local time = (cha.modified or 0) // 1 + local time = (cha.mtime or 0) // 1 -- Use mtime instead of modified - return ui.Span(os.date("%Y-%m-%d %H:%M", time) .. " " .. current_separator_style.separator_open_thin .. " "):fg( - THEME.status.separator_style.fg) - end + return ui.Span(os.date("%Y-%m-%d %H:%M", time) .. " " .. current_separator_style.separator_open_thin .. " ") + :fg(THEME.status.separator_style.fg) +end function Status:percentage() local percent = 0 @@ -127,7 +131,7 @@ local function setup(_, options) end Status:children_add(Status.files, 4000, Status.LEFT) - Status:children_add(Status.modified, 0, Status.RIGHT) + Status:children_add(Status.mtime, 0, Status.RIGHT) end return { setup = setup } diff --git a/yazi/yazi.toml b/yazi/yazi.toml index 2af9319..b142840 100644 --- a/yazi/yazi.toml +++ b/yazi/yazi.toml @@ -187,7 +187,7 @@ quit_title = "{n} task{s} running, sure to quit? (y/N)" quit_origin = "top-center" quit_offset = [0, 2, 50, 3] -[select] +[pick] open_title = "Open with:" open_origin = "hovered" open_offset = [0, 1, 50, 7] @@ -197,6 +197,3 @@ sort_by = "none" sort_sensitive = false sort_reverse = false sort_translit = false - -[log] -enabled = false