feat(yazi): New yazi conf

This commit is contained in:
Black_Raven committed 2025-12-24 21:05:07 +03:00
1 parent f6d4ca5d7d
commit be16e9a8e8
3 files changed
+157 -22

No files matched your search

Generated
+92 -1
View File
@@ -233,6 +233,24 @@
"type": "github" "type": "github"
} }
}, },
"flake-utils": {
"inputs": {
"systems": "systems_3"
},
"locked": {
"lastModified": 1731533236,
"narHash": "sha256-l0KFg5HjrsfsO/JpG+r7fRrqm12kzFHyUHqHCVpMMbI=",
"owner": "numtide",
"repo": "flake-utils",
"rev": "11707dc2f618dd54ca8739b309ec4fc024de578b",
"type": "github"
},
"original": {
"owner": "numtide",
"repo": "flake-utils",
"type": "github"
}
},
"fromYaml": { "fromYaml": {
"flake": false, "flake": false,
"locked": { "locked": {
@@ -794,6 +812,22 @@
"type": "github" "type": "github"
} }
}, },
"nixpkgs_7": {
"locked": {
"lastModified": 1763806073,
"narHash": "sha256-FHsEKDvfWpzdADWj99z7vBk4D716Ujdyveo5+A048aI=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "878e468e02bfabeda08c79250f7ad583037f2227",
"type": "github"
},
"original": {
"owner": "NixOS",
"ref": "nixpkgs-unstable",
"repo": "nixpkgs",
"type": "github"
}
},
"nur": { "nur": {
"inputs": { "inputs": {
"flake-parts": [ "flake-parts": [
@@ -853,7 +887,29 @@
"nixpkgs-fixed": "nixpkgs-fixed", "nixpkgs-fixed": "nixpkgs-fixed",
"nixpkgs-stable": "nixpkgs-stable", "nixpkgs-stable": "nixpkgs-stable",
"sops-nix": "sops-nix", "sops-nix": "sops-nix",
"stylix": "stylix" "stylix": "stylix",
"yazi": "yazi"
}
},
"rust-overlay": {
"inputs": {
"nixpkgs": [
"yazi",
"nixpkgs"
]
},
"locked": {
"lastModified": 1763952169,
"narHash": "sha256-+PeDBD8P+NKauH+w7eO/QWCIp8Cx4mCfWnh9sJmy9CM=",
"owner": "oxalica",
"repo": "rust-overlay",
"rev": "ab726555a9a72e6dc80649809147823a813fa95b",
"type": "github"
},
"original": {
"owner": "oxalica",
"repo": "rust-overlay",
"type": "github"
} }
}, },
"sops-nix": { "sops-nix": {
@@ -936,6 +992,21 @@
"type": "github" "type": "github"
} }
}, },
"systems_3": {
"locked": {
"lastModified": 1681028828,
"narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=",
"owner": "nix-systems",
"repo": "default",
"rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e",
"type": "github"
},
"original": {
"owner": "nix-systems",
"repo": "default",
"type": "github"
}
},
"tinted-foot": { "tinted-foot": {
"flake": false, "flake": false,
"locked": { "locked": {
@@ -1057,6 +1128,26 @@
"repo": "xdg-desktop-portal-hyprland", "repo": "xdg-desktop-portal-hyprland",
"type": "github" "type": "github"
} }
},
"yazi": {
"inputs": {
"flake-utils": "flake-utils",
"nixpkgs": "nixpkgs_7",
"rust-overlay": "rust-overlay"
},
"locked": {
"lastModified": 1766141198,
"narHash": "sha256-8oZTaxMknO2C/ojPp+ZI5XZi/J7TEeczYp7I4F5x/E8=",
"owner": "sxyazi",
"repo": "yazi",
"rev": "329c5d28f097dc78c10b436e3df2ab5086d382e7",
"type": "github"
},
"original": {
"owner": "sxyazi",
"repo": "yazi",
"type": "github"
}
} }
}, },
"root": "root", "root": "root",
+3
View File
@@ -8,6 +8,7 @@
"https://hyprland.cachix.org" "https://hyprland.cachix.org"
"https://ezkea.cachix.org" "https://ezkea.cachix.org"
"https://risdeveau.cachix.org" "https://risdeveau.cachix.org"
"https://yazi.cachix.org"
]; ];
extra-trusted-public-keys = [ extra-trusted-public-keys = [
"nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs=" "nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs="
@@ -15,6 +16,7 @@
"hyprland.cachix.org-1:a7pgxzMz7+chwVL3/pzj6jIBMioiJM7ypFP8PwtkuGc=" "hyprland.cachix.org-1:a7pgxzMz7+chwVL3/pzj6jIBMioiJM7ypFP8PwtkuGc="
"ezkea.cachix.org-1:ioBmUbJTZIKsHmWWXPe1FSFbeVe+afhfgqgTSNd34eI=" "ezkea.cachix.org-1:ioBmUbJTZIKsHmWWXPe1FSFbeVe+afhfgqgTSNd34eI="
"risdeveau.cachix.org-1:TsoFSVeLl7iKtUYGX7qsvKPjf2vbNLfLC5v3SAdU8r0=" "risdeveau.cachix.org-1:TsoFSVeLl7iKtUYGX7qsvKPjf2vbNLfLC5v3SAdU8r0="
"yazi.cachix.org-1:Dcdz63NZKfvUCbDGngQDAZq6kOroIrFoyO064uvLh8k="
]; ];
}; };
@@ -28,6 +30,7 @@
nixpkgs-stable.url = "github:nixos/nixpkgs/nixos-25.11"; nixpkgs-stable.url = "github:nixos/nixpkgs/nixos-25.11";
sops-nix.url = "github:Mic92/sops-nix"; sops-nix.url = "github:Mic92/sops-nix";
stylix.url = "github:danth/stylix"; stylix.url = "github:danth/stylix";
yazi.url = "github:sxyazi/yazi";
hyprland.url = "github:hyprwm/Hyprland/v0.52.1-b"; hyprland.url = "github:hyprwm/Hyprland/v0.52.1-b";
hyprland-plugins = { hyprland-plugins = {
+62 -21
View File
@@ -1,18 +1,12 @@
{ pkgs, lib, ... }: let { pkgs, lib, inputs, ... }: {
yazi-plugins = pkgs.fetchFromGitHub { home.packages = with pkgs; [
owner = "yazi-rs"; ( ouch.override { enableUnfree = true; } )
repo = "plugins"; ];
rev = "864a0210d9ba1e8eb925160c2e2a25342031d8d3";
hash = "sha256-m3709h7/AHJAtoJ3ebDA40c77D+5dCycpecprjVqj/k=";
};
starship = pkgs.fetchFromGitHub {
owner = "Rolv-Apneseth";
repo = "starship.yazi";
rev = "6fde3b2d9dc9a12c14588eb85cf4964e619842e6";
sha256 = "sha256-+CSdghcIl50z0MXmFwbJ0koIkWIksm3XxYvTAwoRlDY=";
};
in {
programs.yazi = { programs.yazi = {
package = inputs.yazi.packages
.${pkgs.stdenv.hostPlatform.system}.default
.override { _7zz = pkgs._7zz-rar; };
enable = true; enable = true;
enableZshIntegration = true; enableZshIntegration = true;
shellWrapperName = "y"; shellWrapperName = "y";
@@ -25,35 +19,82 @@ in {
max_width = 1000; max_width = 1000;
max_height = 1000; max_height = 1000;
}; };
plugin = {
preloaders = [
{ name = "*.crdownload"; run = "noop"; }
];
prepend_previewers = [
{ mime = "application/xz"; run = "ouch"; }
{ mime = "application/zip"; run = "ouch"; }
{ mime = "application/rar"; run = "ouch"; }
{ mime = "application/gzip"; run = "ouch"; }
{ mime = "application/7z-compressed"; run = "ouch"; }
];
prepend_fetchers = [
{ id = "git"; mime = "*"; run = "git"; }
];
};
}; };
plugins = { plugins = with pkgs.yaziPlugins; {
chmod = "${yazi-plugins}/chmod.yazi"; inherit
full-border = "${yazi-plugins}/full-border.yazi"; chmod
# max-preview = "${yazi-plugins}/max-preview.yazi"; ouch
starship = starship; full-border
starship
mount
git
toggle-pane
;
}; };
initLua = '' initLua = ''
require("git"):setup()
require("full-border"):setup() require("full-border"):setup()
require("starship"):setup() require("starship"):setup()
Status:children_add(function()
local h = cx.active.current.hovered
if not h or ya.target_family() ~= "unix" then
return ""
end
return ui.Line {
ui.Span(ya.user_name(h.cha.uid) or tostring(h.cha.uid)):fg("magenta"),
":",
ui.Span(ya.group_name(h.cha.gid) or tostring(h.cha.gid)):fg("magenta"),
" ",
}
end, 500, Status.RIGHT)
''; '';
keymap = { keymap = {
mgr.prepend_keymap = [ mgr.prepend_keymap = [
{ {
on = "T"; on = "T";
run = "plugin --sync max-preview"; run = "plugin toggle-pane max-preview";
desc = "Maximize or restore the preview pane"; desc = "Maximize or restore the preview pane";
} }
{
on = "Y";
run = ''shell -- for path in "$@"; do echo "file://$path"; done | wl-copy -t text/uri-list'';
desc = "Copy files into system clipboard";
}
{ {
on = ["c" "m"]; on = ["c" "m"];
run = "plugin chmod"; run = "plugin chmod";
desc = "Chmod on selected files"; desc = "Chmod on selected files";
} }
{
on = ["M"];
run = "plugin mount";
desc = "Open mount menu";
}
{ {
on = [ "<C-n>" ]; on = [ "<C-n>" ];
run = ''shell '${lib.getExe pkgs.dragon-drop} -x -i -T "$@"' --confirm''; run = "shell '${lib.getExe pkgs.dragon-drop} -x -i -T %h'";
} }
{ {
on = [ "g" "<S-d>" ]; on = [ "g" "<S-d>" ];