1
0
Fork 0
mirror of https://git.sr.ht/~neverness/ultima synced 2025-01-09 20:23:52 +00:00
ultima/modules/home/programs/cli/yazi/plugins.nix

97 lines
2.6 KiB
Nix
Raw Normal View History

2024-11-21 09:24:15 +00:00
{ pkgs, ... }:
let
2024-11-22 10:54:28 +00:00
rev = "main";
2024-11-21 09:24:15 +00:00
yazi-plugins = pkgs.fetchFromGitHub {
owner = "yazi-rs";
repo = "plugins";
rev = "main";
hash = "sha256-RYa7wbFGZ9citYYdF9FYJwzUGBmIUvNBdORpBPb6ZnQ=";
};
in {
programs.yazi.plugins = with pkgs; {
# BUILTINED
chmod = "${yazi-plugins}/chmod.yazi";
max-preview = "${yazi-plugins}/max-preview.yazi";
no-status = "${yazi-plugins}/no-status.yazi";
hide-preview = "${yazi-plugins}/hide-preview.yazi";
full-border = "${yazi-plugins}/full-border.yazi";
# FETCHED
ouch = fetchFromGitHub {
owner = "ndtoan96";
repo = "ouch.yazi";
hash = "sha256-yLt9aY6hUIOdBI5bMdCs7VYFJGyD3WIkmPxvWKNCskA=";
2024-11-22 10:54:28 +00:00
inherit rev;
2024-11-21 09:24:15 +00:00
};
glow = fetchFromGitHub {
owner = "Reledia";
repo = "glow.yazi";
hash = "sha256-d73C8s8p85c0xfq8Nfzlnp83JUakMPbviQDFCX0G+qE=";
2024-11-22 10:54:28 +00:00
inherit rev;
2024-11-21 09:24:15 +00:00
};
ffmpeg = fetchFromGitHub {
owner = "Tyarel8";
repo = "video-ffmpeg.yazi";
hash = "sha256-PIsetF42mlxDv7hEBgjt4FdryDhWTAF/o0Z3Z1G8HJE=";
2024-11-22 10:54:28 +00:00
inherit rev;
2024-11-21 09:24:15 +00:00
};
relative = fetchFromGitHub {
owner = "dedukun";
repo = "relative-motions.yazi";
hash = "sha256-qtjAgH+NS4YFVIwq+x2sC90y4vDSXNI8pGXIZ3FuQMU=";
2024-11-22 10:54:28 +00:00
inherit rev;
2024-11-21 09:24:15 +00:00
};
enter = fetchFromGitHub {
owner = "ourongxing";
repo = "fast-enter.yazi";
hash = "sha256-jjluqFboFXV4yqBMvW7WhO61Urn2FQ/O31PqlaCxB2c=";
2024-11-22 10:54:28 +00:00
inherit rev;
2024-11-21 09:24:15 +00:00
};
yatline = fetchFromGitHub {
owner = "imsi32";
repo = "yatline.yazi";
hash = "sha256-4qxBAXFyPBQhSU24xL7fzhgM5e8Cq7BigEp4GPxSjD4=";
2024-11-22 10:54:28 +00:00
inherit rev;
2024-11-21 09:24:15 +00:00
};
archivemount = fetchFromGitHub {
owner = "AnirudhG07";
repo = "archivemount.yazi";
hash = "sha256-gHk4PJDXq3OPUDD9sFZI+CcIFVDOxUzPLOezX3DDNVU=";
2024-11-22 10:54:28 +00:00
inherit rev;
};
yatline-githead = fetchFromGitHub {
owner = "imsi32";
repo = "yatline-githead.yazi";
hash = "sha256-SH2BDk8sHZT1L12gJjVbVBipiTwF/KARkuaJfNGdGXg=";
inherit rev;
2024-11-21 09:24:15 +00:00
};
};
# CUSTOM PLUGINS
xdg.configFile = {
"yazi/plugins/smart-enter.yazi/init.lua".text = ''
return {
entry = function()
local h = cx.active.current.hovered
ya.manager_emit(h and h.cha.is_dir and "enter" or "open", { hovered = true })
end,
}
'';
"yazi/plugins/smart-paste.yazi/init.lua".text = ''
return {
entry = function()
local h = cx.active.current.hovered
if h and h.cha.is_dir then
ya.manager_emit("enter", {})
ya.manager_emit("paste", {})
ya.manager_emit("leave", {})
else
ya.manager_emit("paste", {})
end
end,
}
'';
};
}