feature(yazi): Add yazi plugins
This commit is contained in:
parent
fb2507afe7
commit
28d08a5c8a
4 changed files with 34 additions and 16 deletions
|
|
@ -79,6 +79,7 @@ in {
|
||||||
"zen.theme.accent-color" = "#b4bbff";
|
"zen.theme.accent-color" = "#b4bbff";
|
||||||
"extensions.autoDisableScopes" = 0;
|
"extensions.autoDisableScopes" = 0;
|
||||||
"cookiebanners.service.mode" = 2;
|
"cookiebanners.service.mode" = 2;
|
||||||
|
"widget.use-xdg-desktop-portal.file-picker" = 1;
|
||||||
};
|
};
|
||||||
isDefault = true;
|
isDefault = true;
|
||||||
id = 0;
|
id = 0;
|
||||||
|
|
@ -95,6 +96,7 @@ in {
|
||||||
"zen.view.welcome-screen.seen" = true;
|
"zen.view.welcome-screen.seen" = true;
|
||||||
"zen.theme.accent-color" = "#b4bbff";
|
"zen.theme.accent-color" = "#b4bbff";
|
||||||
"extensions.autoDisableScopes" = 0;
|
"extensions.autoDisableScopes" = 0;
|
||||||
|
"widget.use-xdg-desktop-portal.file-picker" = 1;
|
||||||
};
|
};
|
||||||
isDefault = false;
|
isDefault = false;
|
||||||
id = 1;
|
id = 1;
|
||||||
|
|
|
||||||
|
|
@ -193,16 +193,17 @@ in {
|
||||||
) "$mod SUPERSHIFT,F,exec,${browserName} -p special")
|
) "$mod SUPERSHIFT,F,exec,${browserName} -p special")
|
||||||
"$mod SUPER,T,exec,kitty -1"
|
"$mod SUPER,T,exec,kitty -1"
|
||||||
"$mod SUPER,E,exec,nautilus -w"
|
"$mod SUPER,E,exec,nautilus -w"
|
||||||
|
(lib.mkIf config.mods.yazi.enable "$mod SUPER,Y,exec, EDITOR='neovide --no-fork' kitty yazi")
|
||||||
"$mod SUPER,N,exec,neovide"
|
"$mod SUPER,N,exec,neovide"
|
||||||
(lib.mkIf (config.mods.anyrun.enable) "$mod SUPER,R,exec,anyrun")
|
(lib.mkIf config.mods.anyrun.enable "$mod SUPER,R,exec,anyrun")
|
||||||
(lib.mkIf (config.mods.oxi.oxirun.enable) "$mod SUPER,R,exec,oxirun")
|
(lib.mkIf config.mods.oxi.oxirun.enable "$mod SUPER,R,exec,oxirun")
|
||||||
(lib.mkIf (config.mods.oxi.oxidash.enable) "$mod SUPER,M,exec,oxidash")
|
(lib.mkIf config.mods.oxi.oxidash.enable "$mod SUPER,M,exec,oxidash")
|
||||||
(lib.mkIf (config.mods.oxi.oxicalc.enable) "$mod SUPER,G,exec,oxicalc")
|
(lib.mkIf config.mods.oxi.oxicalc.enable "$mod SUPER,G,exec,oxicalc")
|
||||||
(lib.mkIf (config.mods.oxi.oxishut.enable) "$mod SUPER,D,exec,oxishut")
|
(lib.mkIf config.mods.oxi.oxishut.enable "$mod SUPER,D,exec,oxishut")
|
||||||
(lib.mkIf (config.mods.oxi.oxipaste.enable) "$mod SUPER,A,exec,oxipaste")
|
(lib.mkIf config.mods.oxi.oxipaste.enable "$mod SUPER,A,exec,oxipaste")
|
||||||
(lib.mkIf (config.mods.oxi.hyprdock.enable) "$mod SUPERSHIFT,P,exec,hyprdock --gui")
|
(lib.mkIf config.mods.oxi.hyprdock.enable "$mod SUPERSHIFT,P,exec,hyprdock --gui")
|
||||||
(lib.mkIf (config.mods.hypr.hyprlock.enable) "$mod SUPERSHIFT,L,exec, playerctl -a pause & hyprlock & systemctl suspend")
|
(lib.mkIf config.mods.hypr.hyprlock.enable "$mod SUPERSHIFT,L,exec, playerctl -a pause & hyprlock & systemctl suspend")
|
||||||
(lib.mkIf (config.mods.hypr.hyprlock.enable) "$mod SUPERSHIFT,K,exec, playerctl -a pause & hyprlock & systemctl hibernate")
|
(lib.mkIf config.mods.hypr.hyprlock.enable "$mod SUPERSHIFT,K,exec, playerctl -a pause & hyprlock & systemctl hibernate")
|
||||||
|
|
||||||
# media keys
|
# media keys
|
||||||
(lib.mkIf config.mods.scripts.audioControl ",XF86AudioMute,exec, audioControl mute")
|
(lib.mkIf config.mods.scripts.audioControl ",XF86AudioMute,exec, audioControl mute")
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,5 @@
|
||||||
{
|
{
|
||||||
|
pkgs,
|
||||||
lib,
|
lib,
|
||||||
config,
|
config,
|
||||||
options,
|
options,
|
||||||
|
|
@ -35,16 +36,26 @@
|
||||||
type = with lib.types; attrsOf anything;
|
type = with lib.types; attrsOf anything;
|
||||||
description = "Additional keymap for yazi";
|
description = "Additional keymap for yazi";
|
||||||
};
|
};
|
||||||
|
plugins = lib.mkOption {
|
||||||
|
default = {
|
||||||
|
inherit (pkgs.yaziPlugins) piper diff gitui;
|
||||||
|
};
|
||||||
|
example = {};
|
||||||
|
type = with lib.types; attrsOf anything;
|
||||||
|
description = "Additional keymap for yazi";
|
||||||
|
};
|
||||||
};
|
};
|
||||||
config = let
|
config = let
|
||||||
conf = import ./yazi.nix;
|
conf = import ./yazi.nix;
|
||||||
in
|
in
|
||||||
lib.optionalAttrs (options ? home.packages) (
|
lib.optionalAttrs (options ? home.packages) (
|
||||||
lib.mkIf config.mods.yazi.enable {
|
lib.mkIf config.mods.yazi.enable {
|
||||||
|
home.packages = [pkgs.glow];
|
||||||
programs.yazi = {
|
programs.yazi = {
|
||||||
enable = conf.enable;
|
enable = conf.enable;
|
||||||
settings = conf.settings // config.mods.yazi.additionalKeymap;
|
settings = conf.settings // config.mods.yazi.additionalKeymap;
|
||||||
keymap = conf.keymap // config.mods.yazi.additionalConfig;
|
keymap = conf.keymap // config.mods.yazi.additionalConfig;
|
||||||
|
plugins = config.mods.yazi.plugins;
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
|
|
|
||||||
|
|
@ -85,19 +85,23 @@
|
||||||
};
|
};
|
||||||
plugin = {
|
plugin = {
|
||||||
prepend_previewers = [
|
prepend_previewers = [
|
||||||
|
{
|
||||||
|
name = "*.tar";
|
||||||
|
run = ''piper --format=url -- tar tf "$1"'';
|
||||||
|
}
|
||||||
{
|
{
|
||||||
name = "*.md";
|
name = "*.md";
|
||||||
run = "glow";
|
run = ''piper -- CLICOLOR_FORCE=1 glow -w=$w -s=dark "$1"'';
|
||||||
}
|
}
|
||||||
{
|
{
|
||||||
mime = "text/csv";
|
mime = "text/csv";
|
||||||
run = "miller";
|
run = ''piper -- bat -p --color=always "$1"'';
|
||||||
}
|
}
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
keymap = {
|
keymap = {
|
||||||
manager.keymap = [
|
mgr.keymap = [
|
||||||
{
|
{
|
||||||
on = ["<Esc>"];
|
on = ["<Esc>"];
|
||||||
run = "escape";
|
run = "escape";
|
||||||
|
|
@ -368,13 +372,13 @@
|
||||||
desc = "Cancel the ongoing search";
|
desc = "Cancel the ongoing search";
|
||||||
}
|
}
|
||||||
{
|
{
|
||||||
on = ["z"];
|
on = ["Z"];
|
||||||
run = "jump zoxide";
|
run = "plugin zoxide";
|
||||||
desc = "Jump to a directory using zoxide";
|
desc = "Jump to a directory using zoxide";
|
||||||
}
|
}
|
||||||
{
|
{
|
||||||
on = ["Z"];
|
on = ["z"];
|
||||||
run = "jump fzf";
|
run = "plugin fzf";
|
||||||
desc = "Jump to a directory or reveal a file using fzf";
|
desc = "Jump to a directory or reveal a file using fzf";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue