diff --git a/install.sh b/install.sh index fc37d56..f980896 100755 --- a/install.sh +++ b/install.sh @@ -109,6 +109,11 @@ link "$DOTFILES/atuin/config.toml" "$HOME/.config/atuin/config.toml" link "$DOTFILES/starship/starship.toml" "$HOME/.config/starship.toml" +# Saving from zellij's own configuration plugin (Ctrl-o c) rewrites config.kdl in place as a +# ~650-line expansion of every default. Through the link that lands in the repo, where the +# diff is at least visible and revertible -- but edit the tracked file instead. +link "$DOTFILES/zellij/config.kdl" "$HOME/.config/zellij/config.kdl" + # settings.json is generated, not linked. Claude Code writes into it, and a tracked file it # writes to needed a clean filter to keep `model` out of commits plus skip-worktree to silence # what the filter could not -- and skip-worktree makes git ignore the file outright, which is diff --git a/zellij/config.kdl b/zellij/config.kdl new file mode 100644 index 0000000..40ed72c --- /dev/null +++ b/zellij/config.kdl @@ -0,0 +1,57 @@ +// Locked by default: keystrokes go to whatever is running in the pane, not to zellij. +// Ctrl-g unlocks. +default_mode "locked" +default_layout "compact" +show_startup_tips false + +// A floating plugin pane only receives keyboard input while zellij is in locked mode +// (zellij-org/zellij#4599), so the stock "SwitchToMode normal" ending each of these binds +// leaves the session manager mouse-only -- it opens, it takes clicks, and it ignores the +// keyboard. Landing back in locked is what lets typing reach the plugin. These are the only +// keybinds overridden, so no clear-defaults here: everything else stays zellij's default. +keybinds { + session { + bind "a" { + LaunchOrFocusPlugin "zellij:about" { + floating true + move_to_focused_tab true + } + SwitchToMode "locked" + } + bind "c" { + LaunchOrFocusPlugin "configuration" { + floating true + move_to_focused_tab true + } + SwitchToMode "locked" + } + bind "l" { + LaunchOrFocusPlugin "zellij:layout-manager" { + floating true + move_to_focused_tab true + } + SwitchToMode "locked" + } + bind "p" { + LaunchOrFocusPlugin "plugin-manager" { + floating true + move_to_focused_tab true + } + SwitchToMode "locked" + } + bind "s" { + LaunchOrFocusPlugin "zellij:share" { + floating true + move_to_focused_tab true + } + SwitchToMode "locked" + } + bind "w" { + LaunchOrFocusPlugin "session-manager" { + floating true + move_to_focused_tab true + } + SwitchToMode "locked" + } + } +}