Zellij

What this config does

Zellij uses the repo config from conf/modules/zellij. Home Manager copies that directory to ~/.config/zellij.

Nix location

  • conf/shared.nix: installs zellij
  • conf/shared.nix: copies conf/modules/zellij
  • conf/modules/zellij/config.kdl: shared config
  • conf/modules/zellij/layouts/*.kdl: layouts
  • conf/modules/zellij/themes/*.kdl: themes

Portable setup

Install Zellij, then copy the config:

mkdir -p ~/.config
cp -r conf/modules/zellij ~/.config/zellij

Validate it:

ZELLIJ_CONFIG_FILE="$HOME/.config/zellij/config.kdl" \
  ZELLIJ_CONFIG_DIR="$HOME/.config/zellij" \
  zellij setup --check

Layouts

Available local layouts:

LayoutNotes
defaultsingle pane plus compact bar
classiclarge left pane, two stacked right panes, compact bar
idestrider file explorer, Neovim pane, execution and VCS panes
ide-stackNeovim-style top pane with a lower terminal pane
ide-stack-2Neovim-style pane, side pane, and testing pane

Run a layout by name:

zellij --layout ide
zellij -l ide-stack

Run a layout by path while editing it:

zellij --layout ~/.config/zellij/layouts/classic.kdl

Keys

Shared config starts in locked mode. Press Ctrl-g to toggle locked and normal mode.

Common bindings:

  • Alt-h, Alt-j, Alt-k, Alt-l: move focus
  • Alt-[, Alt-]: cycle swap layouts
  • Alt-n: new pane
  • Alt-f: toggle floating panes

Check it

zellij --version
zellij setup --check