diff --git a/home/user/.config/yazi/init.lua b/home/user/.config/yazi/init.lua new file mode 100644 index 0000000..3fa7485 --- /dev/null +++ b/home/user/.config/yazi/init.lua @@ -0,0 +1,13 @@ +function Linemode:size_and_mtime() + local time = math.floor(self._file.cha.mtime or 0) + if time == 0 then + time = "" + elseif os.date("%Y", time) == os.date("%Y") then + time = os.date("%b %d %H:%M", time) + else + time = os.date("%b %d %Y", time) + end + + local size = self._file:size() + return string.format("%s %s", size and ya.readable_size(size) or "-", time) +end diff --git a/home/user/.config/yazi/yazi.toml b/home/user/.config/yazi/yazi.toml index e69de29..2d60465 100644 --- a/home/user/.config/yazi/yazi.toml +++ b/home/user/.config/yazi/yazi.toml @@ -0,0 +1,4 @@ +[mgr] +sort_by = "natural" +sort_dir_first = false +linemode = "size_and_mtime"