yazi: set up plugins
This commit is contained in:
Generated
+92
-1
@@ -230,6 +230,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": {
|
||||||
@@ -738,6 +756,22 @@
|
|||||||
"type": "github"
|
"type": "github"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"nixpkgs_8": {
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1756288264,
|
||||||
|
"narHash": "sha256-Om8adB1lfkU7D33VpR+/haZ2gI5r3Q+ZbIPzE5sYnwE=",
|
||||||
|
"owner": "NixOS",
|
||||||
|
"repo": "nixpkgs",
|
||||||
|
"rev": "ddd1826f294a0ee5fdc198ab72c8306a0ea73aa9",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "NixOS",
|
||||||
|
"ref": "nixpkgs-unstable",
|
||||||
|
"repo": "nixpkgs",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
"nur": {
|
"nur": {
|
||||||
"inputs": {
|
"inputs": {
|
||||||
"flake-parts": [
|
"flake-parts": [
|
||||||
@@ -797,7 +831,8 @@
|
|||||||
"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": {
|
"rust-overlay": {
|
||||||
@@ -818,6 +853,27 @@
|
|||||||
"type": "github"
|
"type": "github"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"rust-overlay_2": {
|
||||||
|
"inputs": {
|
||||||
|
"nixpkgs": [
|
||||||
|
"yazi",
|
||||||
|
"nixpkgs"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1756348497,
|
||||||
|
"narHash": "sha256-xJp3VnoYh4kpsaKFO/7SsGbwOz7pI1ZmjbqpXEuR2cw=",
|
||||||
|
"owner": "oxalica",
|
||||||
|
"repo": "rust-overlay",
|
||||||
|
"rev": "0adf92c70d23fb4f703aea5d3ebb51ac65994f7f",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "oxalica",
|
||||||
|
"repo": "rust-overlay",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
"sops-nix": {
|
"sops-nix": {
|
||||||
"inputs": {
|
"inputs": {
|
||||||
"nixpkgs": "nixpkgs_6"
|
"nixpkgs": "nixpkgs_6"
|
||||||
@@ -898,6 +954,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": {
|
||||||
@@ -1019,6 +1090,26 @@
|
|||||||
"repo": "xdg-desktop-portal-hyprland",
|
"repo": "xdg-desktop-portal-hyprland",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
"yazi": {
|
||||||
|
"inputs": {
|
||||||
|
"flake-utils": "flake-utils",
|
||||||
|
"nixpkgs": "nixpkgs_8",
|
||||||
|
"rust-overlay": "rust-overlay_2"
|
||||||
|
},
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1756394761,
|
||||||
|
"narHash": "sha256-mQShrxSE95ChGn8vuMEOaHV2NdbvvHO105CCskLupJw=",
|
||||||
|
"owner": "sxyazi",
|
||||||
|
"repo": "yazi",
|
||||||
|
"rev": "eb537733a2c5b09649b56284b74dbdd4e70006ec",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "sxyazi",
|
||||||
|
"repo": "yazi",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"root": "root",
|
"root": "root",
|
||||||
|
|||||||
@@ -26,6 +26,7 @@
|
|||||||
sops-nix.url = "github:Mic92/sops-nix";
|
sops-nix.url = "github:Mic92/sops-nix";
|
||||||
stylix.url = "github:danth/stylix";
|
stylix.url = "github:danth/stylix";
|
||||||
ags.url = "github:Aylur/ags/3ed9737bdbc8fc7a7c7ceef2165c9109f336bff6";
|
ags.url = "github:Aylur/ags/3ed9737bdbc8fc7a7c7ceef2165c9109f336bff6";
|
||||||
|
yazi.url = "github:sxyazi/yazi";
|
||||||
|
|
||||||
hyprland.url = "github:hyprwm/Hyprland";
|
hyprland.url = "github:hyprwm/Hyprland";
|
||||||
hyprland-plugins = {
|
hyprland-plugins = {
|
||||||
|
|||||||
+37
-20
@@ -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 = "e95c7b384e7b0a9793fe1471f0f8f7810ef2a7ed";
|
|
||||||
hash = "sha256-TUS+yXxBOt6tL/zz10k4ezot8IgVg0/2BbS8wPs9KcE=";
|
|
||||||
};
|
|
||||||
starship = pkgs.fetchFromGitHub {
|
|
||||||
owner = "Rolv-Apneseth";
|
|
||||||
repo = "starship.yazi";
|
|
||||||
rev = "a63550b2f91f0553cc545fd8081a03810bc41bc0";
|
|
||||||
sha256 = "sha256-PYeR6fiWDbUMpJbTFSkM57FzmCbsB4W4IXXe25wLncg=";
|
|
||||||
};
|
|
||||||
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";
|
||||||
@@ -29,17 +23,35 @@ in {
|
|||||||
preloaders = [
|
preloaders = [
|
||||||
{ name = "*.crdownload"; run = "noop"; }
|
{ 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()
|
||||||
'';
|
'';
|
||||||
@@ -48,7 +60,7 @@ in {
|
|||||||
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";
|
||||||
}
|
}
|
||||||
{
|
{
|
||||||
@@ -56,6 +68,11 @@ in {
|
|||||||
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.xdragon} -x -i -T "$@"' --confirm'';
|
run = ''shell '${lib.getExe pkgs.xdragon} -x -i -T "$@"' --confirm'';
|
||||||
|
|||||||
Reference in New Issue
Block a user