{ pkgs, ... }: let rev = "main"; 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="; inherit rev; }; glow = fetchFromGitHub { owner = "Reledia"; repo = "glow.yazi"; hash = "sha256-d73C8s8p85c0xfq8Nfzlnp83JUakMPbviQDFCX0G+qE="; inherit rev; }; ffmpeg = fetchFromGitHub { owner = "Tyarel8"; repo = "video-ffmpeg.yazi"; hash = "sha256-PIsetF42mlxDv7hEBgjt4FdryDhWTAF/o0Z3Z1G8HJE="; inherit rev; }; relative = fetchFromGitHub { owner = "dedukun"; repo = "relative-motions.yazi"; hash = "sha256-qtjAgH+NS4YFVIwq+x2sC90y4vDSXNI8pGXIZ3FuQMU="; inherit rev; }; enter = fetchFromGitHub { owner = "ourongxing"; repo = "fast-enter.yazi"; hash = "sha256-jjluqFboFXV4yqBMvW7WhO61Urn2FQ/O31PqlaCxB2c="; inherit rev; }; yatline = fetchFromGitHub { owner = "imsi32"; repo = "yatline.yazi"; hash = "sha256-4qxBAXFyPBQhSU24xL7fzhgM5e8Cq7BigEp4GPxSjD4="; inherit rev; }; archivemount = fetchFromGitHub { owner = "AnirudhG07"; repo = "archivemount.yazi"; hash = "sha256-gHk4PJDXq3OPUDD9sFZI+CcIFVDOxUzPLOezX3DDNVU="; inherit rev; }; yatline-githead = fetchFromGitHub { owner = "imsi32"; repo = "yatline-githead.yazi"; hash = "sha256-SH2BDk8sHZT1L12gJjVbVBipiTwF/KARkuaJfNGdGXg="; inherit rev; }; }; # 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, } ''; }; }