fix(yazi): data column

This commit is contained in:
js0ny 2025-11-13 07:30:00 +00:00
parent d2b57af9ce
commit 9889fc8b7d
11 changed files with 66 additions and 29 deletions

View file

@ -1,3 +1,18 @@
-- ~/.config/yazi/init.lua
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("%m-%d %H:%M", time)
else
time = os.date("%Y-%m-%d", time)
end
local size = self._file:size()
return string.format("%s %s", size and ya.readable_size(size) or "/", time)
end
require("starship"):setup()
require("git"):setup()