From c5d9337187d21a649d01cca09859f41db03e8a27 Mon Sep 17 00:00:00 2001 From: Mao Nakamoto <41178744+maonakamoto@users.noreply.github.com> Date: Fri, 28 Aug 2026 09:42:03 +0200 Subject: [PATCH] chore(zellij): pin new tabs/panes to home directory MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit New tabs inherited the focused pane's cwd, so opening a tab while sitting in dotfiles or a repo worktree started the new shell (and any agent session in it) there too — how files meant for another project ended up written into dotfiles. default_cwd pins new tabs/panes to $HOME so every new tab starts neutral. Co-Authored-By: Claude Sonnet 5 --- .config/zellij/config.kdl | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/.config/zellij/config.kdl b/.config/zellij/config.kdl index a02885c..4fafa10 100644 --- a/.config/zellij/config.kdl +++ b/.config/zellij/config.kdl @@ -17,3 +17,10 @@ session_serialization false // instead of the parent shell. Replace ALL resurrected commands with bash so panes // get working shells. Claude's memory handles session context, not zellij. post_command_discovery_hook "echo /bin/bash" + +// Without this, a new tab/pane inherits the focused pane's cwd — so opening a +// tab while sitting in dotfiles or a repo worktree silently starts the new +// shell (and any agent session in it) there too. That's how files meant for +// another project ended up written into dotfiles. Pin new tabs/panes to home +// so every new tab starts neutral; cd into a project explicitly. +default_cwd "/home/g"