nixos-config/modules/home-manager/zellij.nix

36 lines
835 B
Nix
Raw Normal View History

{ config, lib, ... }:
2023-12-17 05:59:09 +00:00
with lib;
let
cfg = config.custom-hm.zellij;
in
{
options.custom-hm.zellij = {
2023-12-17 05:59:09 +00:00
enable = mkEnableOption "zellij configurations";
};
config = {
programs.zellij = mkIf cfg.enable {
enable = true;
settings = {
default_shell = "fish";
};
};
xdg.configFile."zellij/config.kdl".text = ''
keybinds {
shared_except "pane" "locked" {
bind "Ctrl b" { SwitchToMode "Pane"; }
}
shared_except "locked" {
bind "Ctrl h" { MoveFocusOrTab "Left"; }
bind "Ctrl l" { MoveFocusOrTab "Right"; }
bind "Ctrl j" { MoveFocus "Down"; }
bind "Ctrl k" { MoveFocus "Up"; }
unbind "Alt h" "Alt l" "Alt j" "Alt k"
}
unbind "Ctrl p" "Ctrl n"
}
'';
2023-12-17 05:59:09 +00:00
};
}