This commit is contained in:
Miguel Palhas
2025-11-24 15:44:00 +00:00
parent 265d97cecc
commit 346d407744
5 changed files with 32 additions and 11 deletions
+2 -2
View File
@@ -112,8 +112,8 @@ in
"w[tg1], gapsout:0, gapsin:0"
"f[1], gapsout:0, gapsin:0"
"special:terminal, on-created-empty:[float; size 1000 800; move center] kitty, persistent:false"
"special:yazi, on-created-empty:[float; size 1000 800; move center] kitty --session sessions/yazi, persistent:false"
"special:terminal, on-created-empty:[float; size 1400 1000; move center] kitty, persistent:false"
"special:yazi, on-created-empty:[float; size 1400 1000; move center] kitty --session sessions/yazi, persistent:false"
];
windowrulev2 = [
+5 -4
View File
@@ -6,9 +6,10 @@
}:
{
home.packages = with pkgs; [
yazi
];
programs.yazi.enable = true;
xdg.configFile."yazi/yazi.yaml".source = ./yazi.yaml;
home.packages = with pkgs; [ yaziPlugins.git ];
xdg.configFile."yazi/yazi.toml".source = ./yazi.toml;
xdg.configFile."yazi/init.lua".source = ./init.lua;
}
+16
View File
@@ -0,0 +1,16 @@
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
+6 -2
View File
@@ -1,9 +1,13 @@
[mgr]
ratio = [1, 3, 4]
linemode = "size_and_mtime"
[preview]
image_quality = 80
[opener]
pdf = [{ run = 'tdf "$@"', block = true }]
edit = [{ run = '$EDITOR "$@"', block = true }]
edit = [{ run = 'nvim "$@"', block = true }]
[open]
rules = [{ mime = "application/pdf", use = "tdf" }]
prepend_rules = [{ mime = "application/pdf", use = "pdf" }]