From 53fb373e0c94e701abde35f7b5252e79eb9fa0b6 Mon Sep 17 00:00:00 2001 From: Lily Dayton Date: Sun, 23 Aug 2026 15:04:21 +0000 Subject: [PATCH] Manage the zellij config, with the session manager reachable from the keyboard zellij was installed by the Brewfile but its config was never tracked, so default_mode "locked" -- set at some point through zellij's own configuration plugin, which rewrote ~/.config/zellij/config.kdl into a 650-line expansion of every default -- broke the session manager with nothing in the repo to explain it. The manager would open and take mouse input but ignore the keyboard. A floating plugin pane only receives keys while zellij is in locked mode (zellij-org/zellij#4599, open). The stock session-mode binds end with SwitchToMode "normal", which is exactly the state where the plugin goes deaf, so each of the six now lands back in locked. The tracked file is the four settings that actually differ from stock rather than the generated dump: comparing the two mode-by-mode showed the dump was the defaults verbatim apart from those, and overriding without clear-defaults merges over them. Verified by driving zellij in a pty -- typing reaches the session manager, Esc closes it back to LOCKED, and Ctrl-t n still opens a tab. Claude-Session: https://claude.ai/code/session_01Nc82hT858iY2iLHJavHkib --- install.sh | 5 +++++ zellij/config.kdl | 57 +++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 62 insertions(+) create mode 100644 zellij/config.kdl 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" + } + } +}