{ pkgs, config, lib, ... }: with lib; let cfg = config.eboskma.programs.zellij; in { options.eboskma.programs.zellij = { enable = mkEnableOption "zellij"; }; config = mkIf (cfg.enable) { programs.zellij = { enable = true; settings = { theme = "dracula"; copy_command = "${pkgs.wl-clipboard}/bin/wl-copy"; scrollback_editor = "${config.eboskma.programs.emacs.package}/bin/emacsclient"; pane_frames = false; keybinds = { normal = [ { unbind = [ { Alt = "h"; } { Alt = "Left"; } { Alt = "l"; } { Alt = "Right"; } { Alt = "j"; } { Alt = "Down"; } { Alt = "k"; } { Alt = "Up"; } { Ctrl = "n"; } { Alt = "n"; } { Ctrl = "b"; } ]; } { action = [{ SwitchToMode = "Resize"; }]; key = [{ Ctrl = "m"; }]; } { action = [{ SwitchToMode = "Tmux"; }]; key = [{ Ctrl = "a"; }]; } { action = [{ MoveFocusOrTab = "Left"; }]; key = [{ Alt = "h"; } { Alt = "Left"; }]; } { action = [{ MoveFocusOrTab = "Right"; }]; key = [{ Alt = "i"; } { Alt = "Right"; }]; } { action = [{ MoveFocus = "Down"; }]; key = [{ Alt = "n"; } { Alt = "Down"; }]; } { action = [{ MoveFocus = "Up"; }]; key = [{ Alt = "e"; } { Alt = "Up"; }]; } { action = [{ NewPane = null; }]; key = [{ Alt = "c"; }]; } ]; resize = [ { unbind = [ { Char = "h"; } "Left" { Char = "l"; } "Right" { Char = "j"; } "Down" { Char = "k"; } "Up" { Alt = "h"; } { Alt = "Left"; } { Alt = "l"; } { Alt = "Right"; } { Alt = "j"; } { Alt = "Down"; } { Alt = "k"; } { Alt = "Up"; } ]; } { action = [{ Resize = "Left"; }]; key = [{ Char = "h"; } "Left"]; } { action = [{ Resize = "Right"; }]; key = [{ Char = "i"; } "Right"]; } { action = [{ Resize = "Down"; }]; key = [{ Char = "n"; } "Down"]; } { action = [{ Resize = "Up"; }]; key = [{ Char = "e"; } "Up"]; } { action = [{ MoveFocusOrTab = "Left"; }]; key = [{ Alt = "h"; } { Alt = "Left"; }]; } { action = [{ MoveFocusOrTab = "Right"; }]; key = [{ Alt = "i"; } { Alt = "Right"; }]; } { action = [{ MoveFocus = "Down"; }]; key = [{ Alt = "n"; } { Alt = "Down"; }]; } { action = [{ MoveFocus = "Up"; }]; key = [{ Alt = "e"; } { Alt = "Up"; }]; } ]; pane = [ { unbind = [ { Char = "h"; } "Left" { Char = "l"; } "Right" { Char = "j"; } "Down" { Char = "k"; } "Up" { Char = "n"; } { Alt = "h"; } { Alt = "Left"; } { Alt = "l"; } { Alt = "Right"; } { Alt = "j"; } { Alt = "Down"; } { Alt = "k"; } { Alt = "Up"; } { Char = "f"; } { Alt = "n"; } { Char = "c"; } { Ctrl = "n"; } ]; } { action = [{ SwitchToMode = "Resize"; }]; key = [{ Ctrl = "m"; }]; } { action = [{ MoveFocus = "Left"; }]; key = [{ Char = "h"; } "Left"]; } { action = [{ MoveFocus = "Right"; }]; key = [{ Char = "i"; } "Right"]; } { action = [{ MoveFocus = "Down"; }]; key = [{ Char = "n"; } "Down"]; } { action = [{ MoveFocus = "Up"; }]; key = [{ Char = "e"; } "Up"]; } { action = [{ NewPane = null; } { SwitchToMode = "Normal"; }]; key = [{ Char = "c"; }]; } { action = [ "TogglePaneFrames" { SwitchToMode = "Normal"; } ]; key = [{ Char = "z"; }]; } { action = [ "ToggleFloatingPanes" { SwitchToMode = "Normal"; } ]; key = [{ Char = "w"; }]; } { action = [ "TogglePaneEmbedOrFloating" { SwitchToMode = "Normal"; } ]; key = [{ Char = "f"; }]; } { action = [{ NewPane = null; }]; key = [{ Alt = "c"; }]; } { action = [{ MoveFocusOrTab = "Left"; }]; key = [{ Alt = "h"; } { Alt = "Left"; }]; } { action = [{ MoveFocusOrTab = "Right"; }]; key = [{ Alt = "i"; } { Alt = "Right"; }]; } { action = [{ MoveFocus = "Down"; }]; key = [{ Alt = "n"; } { Alt = "Down"; }]; } { action = [{ MoveFocus = "Up"; }]; key = [{ Alt = "e"; } { Alt = "Up"; }]; } { action = [{ SwitchToMode = "RenamePane"; } { PaneNameInput = [ 0 ]; }]; key = [{ Char = "m"; }]; } ]; move = [ { unbind = [ { Char = "h"; } "Left" { Char = "l"; } "Right" { Char = "j"; } "Down" { Char = "k"; } "Up" { Alt = "h"; } { Alt = "Left"; } { Alt = "l"; } { Alt = "Right"; } { Alt = "j"; } { Alt = "Down"; } { Alt = "k"; } { Alt = "Up"; } { Alt = "n"; } { Char = "n"; } { Ctrl = "n"; } ]; } { action = [{ SwitchToMode = "Resize"; }]; key = [{ Ctrl = "m"; }]; } { action = [{ MovePane = null; }]; key = [{ Char = "c"; }]; } { action = [{ MovePane = "Left"; }]; key = [{ Char = "h"; } "Left"]; } { action = [{ MovePane = "Right"; }]; key = [{ Char = "i"; } "Right"]; } { action = [{ MovePane = "Down"; }]; key = [{ Char = "n"; } "Down"]; } { action = [{ MovePane = "Up"; }]; key = [{ Char = "e"; } "Up"]; } { action = [{ NewPane = null; }]; key = [{ Alt = "c"; }]; } { action = [{ MoveFocusOrTab = "Left"; }]; key = [{ Alt = "h"; } { Alt = "Left"; }]; } { action = [{ MoveFocusOrTab = "Right"; }]; key = [{ Alt = "i"; } { Alt = "Right"; }]; } { action = [{ MoveFocus = "Down"; }]; key = [{ Alt = "n"; } { Alt = "Down"; }]; } { action = [{ MoveFocus = "Up"; }]; key = [{ Alt = "e"; } { Alt = "Up"; }]; } ]; tab = [ { unbind = [ { Char = "h"; } "Left" { Char = "l"; } "Right" { Char = "j"; } "Down" { Char = "k"; } "Up" { Alt = "h"; } { Alt = "Left"; } { Alt = "l"; } { Alt = "Right"; } { Alt = "j"; } { Alt = "Down"; } { Alt = "k"; } { Alt = "Up"; } { Char = "n"; } { Alt = "n"; } { Ctrl = "n"; } ]; } { action = [{ SwitchToMode = "Resize"; }]; key = [{ Ctrl = "m"; }]; } { action = [ "GoToPreviousTab" ]; key = [{ Char = "h"; } "Left" "Up" { Char = "e"; }]; } { action = [ "GoToNextTab" ]; key = [{ Char = "i"; } "Right" "Down" { Char = "n"; }]; } { action = [{ NewTab = null; } { SwitchToMode = "Normal"; }]; key = [{ Char = "c"; }]; } { action = [{ NewPane = null; }]; key = [{ Alt = "c"; }]; } { action = [{ MoveFocusOrTab = "Left"; }]; key = [{ Alt = "h"; } { Alt = "Left"; }]; } { action = [{ MoveFocusOrTab = "Right"; }]; key = [{ Alt = "i"; } { Alt = "Right"; }]; } { action = [{ MoveFocus = "Down"; }]; key = [{ Alt = "n"; } { Alt = "Down"; }]; } { action = [{ MoveFocus = "Up"; }]; key = [{ Alt = "e"; } { Alt = "Up"; }]; } ]; scroll = [ { unbind = [ { Char = "h"; } "Left" { Char = "l"; } "Right" { Char = "j"; } "Down" { Char = "k"; } "Up" { Alt = "h"; } { Alt = "Left"; } { Alt = "l"; } { Alt = "Right"; } { Alt = "j"; } { Alt = "Down"; } { Alt = "k"; } { Alt = "Up"; } { Char = "e"; } { Ctrl = "n"; } ]; } { action = [{ SwitchToMode = "Resize"; }]; key = [{ Ctrl = "m"; }]; } { action = [ "EditScrollback" { SwitchToMode = "Normal"; } ]; key = [{ Char = "a"; }]; } { action = [ "ScrollDown" ]; key = [{ Char = "n"; } "Down"]; } { action = [ "ScrollUp" ]; key = [{ Char = "e"; } "Up"]; } { action = [ "PageScrollDown" ]; key = [{ Ctrl = "f"; } "PageDown" "Right" { Char = "i"; }]; } { action = [ "PageScrollUp" ]; key = [{ Ctrl = "b"; } "PageUp" "Left" { Char = "h"; }]; } { action = [{ NewPane = null; }]; key = [{ Alt = "c"; }]; } { action = [{ MoveFocusOrTab = "Left"; }]; key = [{ Alt = "h"; } { Alt = "Left"; }]; } { action = [{ MoveFocusOrTab = "Right"; }]; key = [{ Alt = "i"; } { Alt = "Right"; }]; } { action = [{ MoveFocus = "Down"; }]; key = [{ Alt = "n"; } { Alt = "Down"; }]; } { action = [{ MoveFocus = "Up"; }]; key = [{ Alt = "e"; } { Alt = "Up"; }]; } { action = [{ SwitchToMode = "EnterSearch"; } { SearchInput = [ 0 ]; }]; key = [{ Char = "s"; }]; } ]; entersearch = [ { unbind = [ { Char = "h"; } "Left" { Char = "l"; } "Right" { Char = "j"; } "Down" { Char = "k"; } "Up" { Alt = "h"; } { Alt = "Left"; } { Alt = "l"; } { Alt = "Right"; } { Alt = "j"; } { Alt = "Down"; } { Alt = "k"; } { Alt = "Up"; } { Char = "e"; } { Ctrl = "c"; } { Alt = "n"; } ]; } { action = [{ SearchInput = [ 27 ]; } { SwitchToMode = "Scroll"; }]; key = [{ Ctrl = "s"; } "Esc"]; } { action = [{ NewPane = null; }]; key = [{ Alt = "c"; }]; } { action = [{ MoveFocusOrTab = "Left"; }]; key = [{ Alt = "h"; } { Alt = "Left"; }]; } { action = [{ MoveFocusOrTab = "Right"; }]; key = [{ Alt = "i"; } { Alt = "Right"; }]; } { action = [{ MoveFocus = "Down"; }]; key = [{ Alt = "n"; } { Alt = "Down"; }]; } { action = [{ MoveFocus = "Up"; }]; key = [{ Alt = "e"; } { Alt = "Up"; }]; } ]; search = [ { unbind = [ { Char = "h"; } "Left" { Char = "l"; } "Right" { Char = "j"; } "Down" { Char = "k"; } "Up" { Alt = "h"; } { Alt = "Left"; } { Alt = "l"; } { Alt = "Right"; } { Alt = "j"; } { Alt = "Down"; } { Alt = "k"; } { Alt = "Up"; } { Char = "e"; } { Ctrl = "c"; } { Alt = "n"; } { Ctrl = "n"; } { Char = "n"; } { Char = "p"; } ]; } { action = [{ SwitchToMode = "Resize"; }]; key = [{ Ctrl = "m"; }]; } { action = [ "ScrollDown" ]; key = [{ Char = "n"; } "Down"]; } { action = [ "ScrollUp" ]; key = [{ Char = "e"; } "Up"]; } { action = [ "PageScrollDown" ]; key = [{ Ctrl = "f"; } "PageDown" "Right" { Char = "i"; }]; } { action = [ "PageScrollUp" ]; key = [{ Ctrl = "b"; } "PageUp" "Left" { Char = "h"; }]; } { action = [{ NewPane = null; }]; key = [{ Alt = "c"; }]; } { action = [{ MoveFocusOrTab = "Left"; }]; key = [{ Alt = "h"; } { Alt = "Left"; }]; } { action = [{ MoveFocusOrTab = "Right"; }]; key = [{ Alt = "i"; } { Alt = "Right"; }]; } { action = [{ MoveFocus = "Down"; }]; key = [{ Alt = "n"; } { Alt = "Down"; }]; } { action = [{ MoveFocus = "Up"; }]; key = [{ Alt = "e"; } { Alt = "Up"; }]; } { action = [{ Search = "Down"; }]; key = [{ Char = "k"; }]; } { action = [{ Search = "Up"; }]; key = [{ Char = "j"; }]; } ]; renametab = [ { unbind = [ { Alt = "h"; } { Alt = "Left"; } { Alt = "l"; } { Alt = "Right"; } { Alt = "j"; } { Alt = "Down"; } { Alt = "k"; } { Alt = "Up"; } { Alt = "n"; } ]; } { action = [{ NewPane = null; }]; key = [{ Alt = "c"; }]; } { action = [{ MoveFocusOrTab = "Left"; }]; key = [{ Alt = "h"; } { Alt = "Left"; }]; } { action = [{ MoveFocusOrTab = "Right"; }]; key = [{ Alt = "i"; } { Alt = "Right"; }]; } { action = [{ MoveFocus = "Down"; }]; key = [{ Alt = "n"; } { Alt = "Down"; }]; } { action = [{ MoveFocus = "Up"; }]; key = [{ Alt = "e"; } { Alt = "Up"; }]; } ]; renamepane = [ { unbind = [ { Alt = "h"; } { Alt = "Left"; } { Alt = "l"; } { Alt = "Right"; } { Alt = "j"; } { Alt = "Down"; } { Alt = "k"; } { Alt = "Up"; } { Alt = "n"; } ]; } { action = [{ NewPane = null; }]; key = [{ Alt = "c"; }]; } { action = [{ MoveFocusOrTab = "Left"; }]; key = [{ Alt = "h"; } { Alt = "Left"; }]; } { action = [{ MoveFocusOrTab = "Right"; }]; key = [{ Alt = "i"; } { Alt = "Right"; }]; } { action = [{ MoveFocus = "Down"; }]; key = [{ Alt = "n"; } { Alt = "Down"; }]; } { action = [{ MoveFocus = "Up"; }]; key = [{ Alt = "e"; } { Alt = "Up"; }]; } ]; session = [ { unbind = [ { Alt = "h"; } { Alt = "Left"; } { Alt = "l"; } { Alt = "Right"; } { Alt = "j"; } { Alt = "Down"; } { Alt = "k"; } { Alt = "Up"; } { Alt = "n"; } { Ctrl = "n"; } ]; } { action = [{ SwitchToMode = "Resize"; }]; key = [{ Ctrl = "m"; }]; } { action = [{ NewPane = null; }]; key = [{ Alt = "c"; }]; } { action = [{ MoveFocusOrTab = "Left"; }]; key = [{ Alt = "h"; } { Alt = "Left"; }]; } { action = [{ MoveFocusOrTab = "Right"; }]; key = [{ Alt = "i"; } { Alt = "Right"; }]; } { action = [{ MoveFocus = "Down"; }]; key = [{ Alt = "n"; } { Alt = "Down"; }]; } { action = [{ MoveFocus = "Up"; }]; key = [{ Alt = "e"; } { Alt = "Up"; }]; } ]; tmux = [ { unbind = [ { Char = "h"; } "Left" { Char = "l"; } "Right" { Char = "j"; } "Down" { Char = "k"; } "Up" { Alt = "h"; } { Alt = "Left"; } { Alt = "l"; } { Alt = "Right"; } { Alt = "j"; } { Alt = "Down"; } { Alt = "k"; } { Alt = "Up"; } { Alt = "n"; } { Ctrl = "n"; } ]; } { action = [{ SwitchToMode = "Resize"; }]; key = [{ Ctrl = "m"; }]; } { action = [{ MoveFocus = "Left"; } { SwitchToMode = "Normal"; }]; key = [{ Char = "h"; }]; } { action = [{ MoveFocus = "Right"; } { SwitchToMode = "Normal"; }]; key = [{ Char = "i"; }]; } { action = [{ MoveFocus = "Down"; } { SwitchToMode = "Normal"; }]; key = [{ Char = "n"; }]; } { action = [{ MoveFocus = "Up"; } { SwitchToMode = "Normal"; }]; key = [{ Char = "e"; }]; } { action = [{ NewPane = null; }]; key = [{ Alt = "n"; }]; } { action = [{ MoveFocusOrTab = "Left"; }]; key = [{ Alt = "h"; } { Alt = "Left"; }]; } { action = [{ MoveFocusOrTab = "Right"; }]; key = [{ Alt = "i"; } { Alt = "Right"; }]; } { action = [{ MoveFocus = "Down"; }]; key = [{ Alt = "n"; } { Alt = "Down"; }]; } { action = [{ MoveFocus = "Up"; }]; key = [{ Alt = "e"; } { Alt = "Up"; }]; } ]; }; }; }; }; }