mirror of
https://github.com/js0ny/dotfiles.git
synced 2025-12-21 08:43:00 +00:00
18 lines
446 B
Lua
18 lines
446 B
Lua
-- ~/.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()
|