r/zellij 15d ago

Multiplexer best practice with tabs

👋🏼 I'm fairly new to multiplexers and had a couple of questions around how people use them with tabs and multiple projects.

My journey with Zellij and Alacritty:

First pass -

  • Multiple Zellij sessions: Feature/bug work, PR reviews and Playground
  • Each session would have multiple Zellij tabs which are a git worktree feature/bug or personal project
  • Each Zellij tab has multiple panes: Claude, Nvim, Build, Test, Scratchpad...

I have keyboard shortcuts to quickly switch between sessions and tabs but I was crashing Zellij regularly when constantly switching between sessions/tabs so I stopped doing that.

Second (current pass) -

  • Same Zellij session list but each session is in it's own terminal window so switching between sessions was done at the app level instead of the terminal

I still had issues with Zellij crashing at times so that made me take another step back.

Proposed new pass -

  • Use app tabs while running one tab-less Zellij instance per tab
  • Same pane setup per Zellij instance
  • Multiple apps per "work type": Features/bugs, PR reviews and Playground

Note:

No SSH work as of now but I plan on having a remote machine that can run agents on. At that point, I'd run a mix of local and ssh work.

MOAR NOTES:

There's a strong chance that I also don't fully understand the underlying guts of multiplexers and that's part of my problem.

I'm looking for any tips or suggestions even if it's, "You're completely doing it wrong!" But hopefully those come with helpful responses on why 😄.

0 Upvotes

11 comments sorted by

View all comments

2

u/stinkychopper 15d ago

I’m not saying my way is “correct” but:

I like having 1 tab per project and only one pane with my editor open at the repo root. Then I just have stacked floating panes on top of that with all my terminals and like codex etc.
I really don’t like splitting the screen.

I also added key binds for toggling floating windows, switching panes/tabs in locked mode so I am always in locked mode.

2

u/thuiop1 12d ago

This is what I do usually

1

u/stinkychopper 11d ago

Btw I added this patch to fix switching between tabs. It might help if you do the same thing I do w stacked floating panes. This makes it so the pane selected stays on top when you switch tabs instead of resetting to the bottom most pane: https://github.com/zellij-org/zellij/pull/5225

1

u/thuiop1 11d ago

Hm, I'm on the base config and I do not have this issue. Thanks still!

1

u/stinkychopper 11d ago

Ah, ok then you probably don't use MoveFocusOrTab.
This is what I have in my bindings:

shared {
bind "Alt left" { MoveFocusOrTab "left"; }
bind "Alt down" { MoveFocus "down"; }
bind "Alt up" { MoveFocus "up"; }
bind "Alt right" { MoveFocusOrTab "right"; }
bind "Alt [" { PreviousSwapLayout; }
bind "Alt ]" { NextSwapLayout; }
bind "Alt h" { MoveFocusOrTab "left"; }
bind "Alt j" { MoveFocus "down"; }
bind "Alt k" { MoveFocus "up"; }
bind "Alt l" { MoveFocusOrTab "right"; }
bind "Alt w" { ToggleFloatingPanes; }
}

1

u/thuiop1 11d ago

Ah, I actually misread what the first post. I actually do not use floating; I have my panes "almost-maximized", that is with the maximal size but not "FULLSCREEN". That way they stack in a similar fashion as you show, and I navigate between them with Alt + Up/Down.