{ pkgs, ... }: let 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"; rev = "251da6930ca8b7ee0384810086c3bf644caede3e"; hash = "sha256-yLt9aY6hUIOdBI5bMdCs7VYFJGyD3WIkmPxvWKNCskA="; }; glow = fetchFromGitHub { owner = "Reledia"; repo = "glow.yazi"; rev = "4e016fa2357e5e7e9b1a4881e1492d73a0a2f2cc"; hash = "sha256-d73C8s8p85c0xfq8Nfzlnp83JUakMPbviQDFCX0G+qE="; }; ffmpeg = fetchFromGitHub { owner = "Tyarel8"; repo = "video-ffmpeg.yazi"; rev = "fe26a18f9b32880e10b686df5c4559d9af2bce6b"; hash = "sha256-PIsetF42mlxDv7hEBgjt4FdryDhWTAF/o0Z3Z1G8HJE="; }; relative = fetchFromGitHub { owner = "dedukun"; repo = "relative-motions.yazi"; rev = "89d0cb9c84a7bba98d2e7ca4bac706d2458d0c06"; hash = "sha256-qtjAgH+NS4YFVIwq+x2sC90y4vDSXNI8pGXIZ3FuQMU="; }; enter = fetchFromGitHub { owner = "ourongxing"; repo = "fast-enter.yazi"; rev = "dd498123cb0696d7fa50b32d2268fb8c2084a4a4"; hash = "sha256-jjluqFboFXV4yqBMvW7WhO61Urn2FQ/O31PqlaCxB2c="; }; yatline = fetchFromGitHub { owner = "imsi32"; repo = "yatline.yazi"; rev = "7b56434864d6a0b5d547fed2339b99346a018522"; hash = "sha256-4qxBAXFyPBQhSU24xL7fzhgM5e8Cq7BigEp4GPxSjD4="; }; archivemount = fetchFromGitHub { owner = "AnirudhG07"; repo = "archivemount.yazi"; rev = "e82e38eda858716a1328b5e0c34382547777cb28"; hash = "sha256-gHk4PJDXq3OPUDD9sFZI+CcIFVDOxUzPLOezX3DDNVU="; }; }; # 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, } ''; }; }