fix yazi
This commit is contained in:
parent
872b594f2c
commit
5b8dfde8c2
@ -4,6 +4,24 @@
|
|||||||
programs.yazi = {
|
programs.yazi = {
|
||||||
enable = true;
|
enable = true;
|
||||||
|
|
||||||
|
initLua = ''
|
||||||
|
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
|
||||||
|
|
||||||
|
require("git"):setup()
|
||||||
|
'';
|
||||||
|
|
||||||
# Основные настройки
|
# Основные настройки
|
||||||
settings = {
|
settings = {
|
||||||
manager = {
|
manager = {
|
||||||
@ -66,9 +84,7 @@
|
|||||||
];
|
];
|
||||||
};
|
};
|
||||||
|
|
||||||
# Плагины
|
|
||||||
plugins = {
|
plugins = {
|
||||||
git.package = pkgs.yaziPlugins.git;
|
|
||||||
mount.package = pkgs.yaziPlugins.mount;
|
mount.package = pkgs.yaziPlugins.mount;
|
||||||
jump-to-char.package = pkgs.yaziPlugins.jump-to-char;
|
jump-to-char.package = pkgs.yaziPlugins.jump-to-char;
|
||||||
smart-enter.package = pkgs.yaziPlugins.smart-enter;
|
smart-enter.package = pkgs.yaziPlugins.smart-enter;
|
||||||
@ -42,6 +42,6 @@
|
|||||||
};
|
};
|
||||||
|
|
||||||
imports = [
|
imports = [
|
||||||
./yazi.nix
|
./modules/yazi.nix
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user