Files
nixos-config/home/common/programs/yazi/init.lua
T
Miguel Palhas 346d407744 yazi
2025-11-24 15:44:00 +00:00

17 lines
449 B
Lua

require("git"):setup()
---@diagnostic disable: cast-local-type, undefined-global
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