Zellij notes

Zellij is rich tool for terminal based workspace management

I am a heavy user of tmux for many years and it has been good experience. However, I thought of doing some experiments with zellij and see what it offers and can be more effective for my usecase. So here I will note some findings as I go along the way.

Setting it it easier, install standard package from your distro, on Mac e.g. there is brew formula so its straight forward.

the config is stored in ~/.config/zellij/config.kdl

Right now my config.kdl is just this

   theme "catppuccin-latte"

but I am sure I will add some tmux key pressed :slight_smile: soon.

starting a session

zellij

Detaching from session Ctrl+o d

Resuming an existing session zellij a

I have read through few things on Screencasts & Tutorials

and here is what my current session looks like. I am pretty happy thus far.

1 Like

Locking the jellij interface menu seems to immensely help in avoiding keymapping conflicts with underlying applications running in pane e.g. helix, weechat etc.

Default ( unlocked )

To lock

Ctrl + g

1 Like

I like Zellij a lot! Especially editing the scrollback and easy navigation – very nice. One keybinding conflict with Helix that I did notice is Ctrl-b, which I use for scroll-back a lot. In Zellij, Ctrl-g is used to switch to tmux mode, which I don’t want to use, so I disabled it with the following in ~/.config/zellij/config.kdl:

keybinds {
	shared_except "tmux" "locked" {
	//  bind "Ctrl b" { SwitchToMode "Tmux"; }
	    unbind "Ctrl b"
	}
}

Getting conflicts with Ctrl-o in helix (pop back up navigation stack) and Ctrl-t in tio. So ended up setting my keybindings so the movement keys work even in locked mode – this way I can keep it locked most of the time when working, and just enter Zellij unlocked mode to configure new tabs, look at scrollback, etc.

keybinds {
	shared_except "tmux" "locked" {
	//  bind "Ctrl b" { SwitchToMode "Tmux"; }
	    unbind "Ctrl b"
	}

	shared {
		bind "Alt h" "Alt Left" { MoveFocusOrTab "Left"; }
		bind "Alt l" "Alt Right" { MoveFocusOrTab "Right"; }
		bind "Alt j" "Alt Down" { MoveFocus "Down"; }
		bind "Alt k" "Alt Up" { MoveFocus "Up"; }
		bind "Alt m" { ToggleFloatingPanes; }
	}
}

(from a thread)

Also noticed that if I detach from a session, change the config, and re-attach, the config changes seem to stick – I think tmux required an entire restart when changing anything.

To re-order tabs:

  • bind “Alt i” { MoveTab “Left”; }
  • bind “Alt o” { MoveTab “Right”; }

The pane layout can be switched from vertical split to horizontal split with “Alt ]”

Adjusting pane size:

  • bind “Alt =” “Alt +” { Resize “Increase”; }
  • bind “Alt -” { Resize “Decrease”; }

Zellij remembers your sessions and tabs even after reboot and offers to start the program that was running when you quit Zellij – pretty slick!

Neat project and some remappings to avoid zellij and helix conflicts: