yazi
This commit is contained in:
Generated
+3
-3
@@ -426,11 +426,11 @@
|
|||||||
"nvchad-starter": {
|
"nvchad-starter": {
|
||||||
"flake": false,
|
"flake": false,
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1763985834,
|
"lastModified": 1763994809,
|
||||||
"narHash": "sha256-aP8d8J7Zc/rbAJHzo6cJ8hiVGGiRkuNC/3ScTCDqRmQ=",
|
"narHash": "sha256-DQOe9cri2xVm6M0+x1eRfwITG6paN5p+Ra0EfdghqOM=",
|
||||||
"owner": "naps62",
|
"owner": "naps62",
|
||||||
"repo": "nvchad-starter",
|
"repo": "nvchad-starter",
|
||||||
"rev": "8223b4f0c7a711887a1edc528ec7566942fad45e",
|
"rev": "f7808a3201c7f8871c5d12c1a3034e0a01112f8f",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
|||||||
@@ -112,8 +112,8 @@ in
|
|||||||
"w[tg1], gapsout:0, gapsin:0"
|
"w[tg1], gapsout:0, gapsin:0"
|
||||||
"f[1], 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:terminal, on-created-empty:[float; size 1400 1000; move center] kitty, persistent:false"
|
||||||
"special:yazi, on-created-empty:[float; size 1000 800; move center] kitty --session sessions/yazi, persistent:false"
|
"special:yazi, on-created-empty:[float; size 1400 1000; move center] kitty --session sessions/yazi, persistent:false"
|
||||||
];
|
];
|
||||||
|
|
||||||
windowrulev2 = [
|
windowrulev2 = [
|
||||||
|
|||||||
@@ -6,9 +6,10 @@
|
|||||||
}:
|
}:
|
||||||
{
|
{
|
||||||
|
|
||||||
home.packages = with pkgs; [
|
programs.yazi.enable = true;
|
||||||
yazi
|
|
||||||
];
|
|
||||||
|
|
||||||
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]
|
[preview]
|
||||||
image_quality = 80
|
image_quality = 80
|
||||||
|
|
||||||
[opener]
|
[opener]
|
||||||
pdf = [{ run = 'tdf "$@"', block = true }]
|
pdf = [{ run = 'tdf "$@"', block = true }]
|
||||||
edit = [{ run = '$EDITOR "$@"', block = true }]
|
edit = [{ run = 'nvim "$@"', block = true }]
|
||||||
|
|
||||||
[open]
|
[open]
|
||||||
rules = [{ mime = "application/pdf", use = "tdf" }]
|
prepend_rules = [{ mime = "application/pdf", use = "pdf" }]
|
||||||
|
|||||||
Reference in New Issue
Block a user