yazi
This commit is contained in:
@@ -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 = [
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
@@ -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
|
||||
@@ -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" }]
|
||||
|
||||
Reference in New Issue
Block a user