zellij: now mod key is based on config profile
This commit is contained in:
parent
bedec6e2e4
commit
b30258f247
|
@ -6,7 +6,7 @@ let
|
||||||
url = "https://github.com/cristiand391/zj-quit/releases/download/0.3.0/zj-quit.wasm";
|
url = "https://github.com/cristiand391/zj-quit/releases/download/0.3.0/zj-quit.wasm";
|
||||||
hash = "sha256-f1D3cDuLRZ5IqY3IGq6UYSEu1VK54TwmkmwWaxVQD2A=";
|
hash = "sha256-f1D3cDuLRZ5IqY3IGq6UYSEu1VK54TwmkmwWaxVQD2A=";
|
||||||
};
|
};
|
||||||
zstatus = pkgs.fetchurl {
|
zj-status = pkgs.fetchurl {
|
||||||
url = "https://github.com/dj95/zjstatus/releases/download/v0.17.0/zjstatus.wasm";
|
url = "https://github.com/dj95/zjstatus/releases/download/v0.17.0/zjstatus.wasm";
|
||||||
hash = "sha256-IgTfSl24Eap+0zhfiwTvmdVy/dryPxfEF7LhVNVXe+U";
|
hash = "sha256-IgTfSl24Eap+0zhfiwTvmdVy/dryPxfEF7LhVNVXe+U";
|
||||||
};
|
};
|
||||||
|
@ -52,7 +52,11 @@ in
|
||||||
''
|
''
|
||||||
);
|
);
|
||||||
|
|
||||||
home.file.".config/zellij/config.kdl".text = /*kdl*/ ''
|
home.file.".config/zellij/config.kdl".text =
|
||||||
|
let
|
||||||
|
mod = cfg.mod;
|
||||||
|
in
|
||||||
|
/*kdl*/ ''
|
||||||
theme "catppuccin-mocha";
|
theme "catppuccin-mocha";
|
||||||
|
|
||||||
plugins {
|
plugins {
|
||||||
|
@ -69,11 +73,11 @@ in
|
||||||
}
|
}
|
||||||
|
|
||||||
normal {
|
normal {
|
||||||
bind "Ctrl a" { SwitchToMode "tmux"; }
|
bind "${mod}" { SwitchToMode "tmux"; }
|
||||||
}
|
}
|
||||||
|
|
||||||
locked {
|
locked {
|
||||||
bind "Ctrl a" { SwitchToMode "normal"; }
|
bind "${mod}" { SwitchToMode "normal"; }
|
||||||
}
|
}
|
||||||
|
|
||||||
tmux {
|
tmux {
|
||||||
|
@ -220,7 +224,7 @@ in
|
||||||
}
|
}
|
||||||
|
|
||||||
pane size=1 borderless=true {
|
pane size=1 borderless=true {
|
||||||
plugin location="file:${plugins.zstatus}" {
|
plugin location="file:${plugins.zj-status}" {
|
||||||
format_left "{mode}#[fg=black,bg=blue,bold]{session} #[fg=blue,bg=#181825]{tabs}"
|
format_left "{mode}#[fg=black,bg=blue,bold]{session} #[fg=blue,bg=#181825]{tabs}"
|
||||||
format_right "#[fg=#181825,bg=#b1bbfa]{datetime}"
|
format_right "#[fg=#181825,bg=#b1bbfa]{datetime}"
|
||||||
format_space "#[bg=#181825]"
|
format_space "#[bg=#181825]"
|
||||||
|
|
|
@ -89,6 +89,11 @@
|
||||||
# Also, there is resurrections features that zellij offers.
|
# Also, there is resurrections features that zellij offers.
|
||||||
# So desktop user can just resurrect the session if they want to.
|
# So desktop user can just resurrect the session if they want to.
|
||||||
autoAttach = lib.mkEnableOption "zellij autoAttach";
|
autoAttach = lib.mkEnableOption "zellij autoAttach";
|
||||||
|
mod = lib.mkOption {
|
||||||
|
type = lib.types.str;
|
||||||
|
default = "Ctrl a";
|
||||||
|
description = "Mod key to use for zellij to enter tmux mode and exits locked mode.";
|
||||||
|
};
|
||||||
};
|
};
|
||||||
foot.enable = lib.mkEnableOption "foot";
|
foot.enable = lib.mkEnableOption "foot";
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in a new issue