Skip to main content

Overview

Zellij is a terminal workspace built with Rust, offering a modern alternative to Tmux. It features modal keybindings (similar to Vim), built-in session persistence, and a beautiful UI with discoverable features. The Gentleman.Dots configuration includes custom themes, layouts, and an innovative keybinding helper plugin.
Zellij uses a modal system with modes like locked, pane, tab, resize, etc. Press Ctrl+g to enter command mode, then a letter to switch modes.

Key Features

Modal Keybindings

Vim-like modes for different operations

Built-in Layouts

Pre-configured workspace layouts for different tasks

Auto Session Persistence

Sessions are automatically saved and can be restored

Zellij Forgot Plugin

Press Alt+y to see all keybindings

Installation

1

Install Zellij

cargo install zellij
You can also use Homebrew: brew install zellij
2

Copy Configuration

mkdir -p ~/.config/zellij
cp -r GentlemanZellij/zellij/* ~/.config/zellij/
3

Verify Installation

zellij --version
4

Start Zellij

zellij

Configuration Breakdown

Zellij uses a modal keybinding system. The default mode is locked, where most keys are passed through to your shell. Press Ctrl+g to unlock and enter command mode.
config.kdl
default_mode "locked"
Available modes:
  • locked - Normal terminal input (default)
  • pane - Pane management
  • tab - Tab management
  • resize - Resize panes
  • move - Move panes
  • scroll - Scroll mode
  • search - Search in scrollback
  • session - Session management

Themes

The configuration includes multiple beautiful themes:
config.kdl
themes {
    kanagawa_wave {
        fg "#DCD7BA"
        bg "#1F1F28"
        red "#C34043"
        green "#76946A"
        yellow "#C0A36E"
        blue "#7E9CD8"
        magenta "#957FB8"
        cyan "#6A9589"
        orange "#FFA066"
        black "#1F1F28"
        white "#DCD7BA"
    }
    
    kanagawa_dragon { ... }
    everforest { ... }
    rose_pine_moon { ... }
    sakura { ... }
    oldWorld { ... }
}

theme "kanagawa_wave"
To change themes, edit config.kdl and update the theme setting to one of: kanagawa_wave, kanagawa_dragon, everforest, rose_pine_moon, sakura, or oldWorld

Default Layout

The configuration uses a custom work layout:
config.kdl
default_layout "work_kanagawa"
Available layouts in ~/.config/zellij/layouts/:
  • work.kdl - Basic 2-tab setup (nvim + shell)
  • work_kanagawa.kdl - Kanagawa themed
  • work_everforest.kdl - Everforest themed
  • work_sakura.kdl - Sakura themed
  • work_oldWorld.kdl - OldWorld themed

Custom Plugins

Two WebAssembly plugins are included:
  1. zjstatus.wasm - Custom status bar with git integration
  2. zellij_forgot.wasm - Interactive keybinding helper

Zellij Forgot Plugin

Press Alt+y to launch the keybinding helper:
config.kdl
bind "Alt y" {
    LaunchOrFocusPlugin "file:~/.config/zellij/plugins/zellij_forgot.wasm" {
        "lock"                  "ctrl + g"
        "unlock"                "ctrl + g"
        "new pane"              "Alt + n || ctrl + g + p + n"
        "change focus of pane"  "Alt + arrow key || ctrl + g + p + arrow key"
        # ... more keybindings
        floating true
    }
}

Essential Keybindings

Mode Switching

KeybindingAction
Ctrl+gToggle locked/unlocked mode
Ctrl+qQuit Zellij
Esc or EnterReturn to locked mode
pSwitch to pane mode
tSwitch to tab mode
rSwitch to resize mode
mSwitch to move mode
sSwitch to scroll mode
oSwitch to session mode

Quick Actions (Work in Locked Mode)

KeybindingAction
Alt+nNew pane
Alt+h/j/k/lNavigate panes (Vim style)
Alt+←/↓/↑/→Navigate panes (Arrow keys)
Alt+fToggle floating pane
Alt+[Previous layout
Alt+]Next layout
Alt+iMove tab left
Alt+oMove tab right
Alt+yShow keybinding helper

Pane Mode (Ctrl+g then p)

KeybindingAction
nNew pane
rNew pane on the right
dNew pane below
xClose focused pane
fToggle fullscreen
wToggle floating panes
eToggle pane embed/float
zToggle pane frames
h/j/k/lMove focus
cRename pane
TabSwitch focus

Tab Mode (Ctrl+g then t)

KeybindingAction
nNew tab
xClose tab
rRename tab
h/j/k/lNavigate tabs
1-9Go to tab number
sToggle sync tab (send input to all panes)
bBreak pane to new tab
[Break pane left
]Break pane right
TabToggle between tabs

Resize Mode (Ctrl+g then r)

KeybindingAction
h/j/k/lIncrease size in direction
H/J/K/LDecrease size in direction
+ or =Increase size
-Decrease size
←/↓/↑/→Increase size in direction

Scroll Mode (Ctrl+g then s)

KeybindingAction
j/k or ↓/↑Scroll down/up
h/l or ←/→Page scroll
dHalf page down
uHalf page up
Ctrl+fPage down
Ctrl+bPage up
Ctrl+cScroll to bottom
fEnter search mode
eEdit scrollback in $EDITOR

Session Mode (Ctrl+g then o)

KeybindingAction
wOpen session manager
cOpen configuration
pOpen plugin manager
dDetach from session

Work Layout Breakdown

The default work.kdl layout creates a productive workspace:
work.kdl
layout {
    tab name="nvim" focus=true {
        pane
    }

    tab name="shell" {
        pane
    }

    default_tab_template {
        pane size=1 borderless=true {
            plugin location="file:~/.config/zellij/plugins/zjstatus.wasm" {
              format_left   "{mode} #[fg=#e0def4,bold]{session}{tabs}"
              format_right  "{command_git_branch} {datetime}"
              # Git branch indicator
              command_git_branch_command     "git rev-parse --abbrev-ref HEAD"
              command_git_branch_format      "#[fg=#3e8fb0] {stdout} "
              # Date and time
              datetime        "#[fg=#6e6a86,bold] {format} "
              datetime_format "%A, %d %b %Y %H:%M"
            }
        }
        children
        pane size=1 borderless=true  {
          plugin location="zellij:status-bar"
        }
    }
}
Features:
  • Two tabs: nvim (focused) and shell
  • Top status bar with git branch and date/time
  • Bottom status bar with mode indicator
  • Automatic git branch detection in the current directory

Advanced Usage

Creating Custom Layouts

Create a new layout file in ~/.config/zellij/layouts/:
my-layout.kdl
layout {
    tab name="code" {
        pane split_direction="vertical" {
            pane
            pane split_direction="horizontal" {
                pane
                pane
            }
        }
    }
    
    tab name="terminal" {
        pane
    }
}
Load it with:
zellij --layout my-layout

Session Management

List sessions:
zellij list-sessions
# or shorthand
zellij ls
Attach to session:
zellij attach <session-name>
# or shorthand
zellij a <session-name>
Create named session:
zellij --session my-project
Delete session:
zellij delete-session <session-name>

Session Persistence

Zellij automatically serializes sessions:
config.kdl
session_serialization true  # enabled by default
Sessions are saved to ~/.cache/zellij/ and can be restored after crashes or reboots.

Scrollback Editor

The configuration uses Neovim for editing scrollback:
config.kdl
scrollback_editor "nvim"
Press Ctrl+gse to edit scrollback in Neovim.

Customization Tips

Change Theme

Edit config.kdl and update the theme setting:
config.kdl
theme "everforest"  # or kanagawa_dragon, rose_pine_moon, sakura, oldWorld
To use a matching layout:
config.kdl
default_layout "work_everforest"

Disable Mouse Mode

config.kdl
mouse_mode false

Change Default Shell

config.kdl
default_shell "fish"  # or zsh, nu, bash

Adjust Scroll Buffer

config.kdl
scroll_buffer_size 50000  # default is 10000

Simplified UI (No Nerd Fonts)

config.kdl
simplified_ui true

Troubleshooting

If you installed with cargo install, ensure ~/.cargo/bin is in your PATH:
echo 'export PATH="$HOME/.cargo/bin:$PATH"' >> ~/.zshrc
# or for Fish
fish_add_path ~/.cargo/bin
Then restart your shell.
Make sure you’re in the correct mode. Press Ctrl+g to unlock from locked mode first.If using a terminal that captures certain key combinations, check your terminal’s keybinding settings.
Verify the theme name matches exactly (case-sensitive):
# Check available themes in config.kdl
grep -A 1 "^    [a-z_]* {" ~/.config/zellij/config.kdl
Then update the theme setting at the bottom of the file.
Ensure the plugin files exist:
ls ~/.config/zellij/plugins/
# Should show: zjstatus.wasm, zellij_forgot.wasm
If missing, recopy from the Gentleman.Dots repository.
The git branch only shows when you’re in a git repository. Navigate to a git project directory.If still not working, ensure git is in your PATH:
which git

Shell Integration

Gentleman.Dots includes shell integration to auto-start Zellij.

Zsh Integration

Edit ~/.zshrc:
.zshrc
WM_VAR="$ZELLIJ"
WM_CMD="zellij"

if [ -z "$WM_VAR" ]; then
    $WM_CMD
fi

Fish Integration

Edit ~/.config/fish/config.fish:
config.fish
if not set -q ZELLIJ
    zellij
end

Nushell Integration

Edit Nushell config:
config.nu
let MULTIPLEXER = "zellij"
let MULTIPLEXER_ENV_PREFIX = "ZELLIJ"

if ($env | get -i $MULTIPLEXER_ENV_PREFIX | is-empty) {
    ^$MULTIPLEXER
}

Comparison with Tmux

Advantages

  • More intuitive UI out of the box
  • Modal keybindings (less RSI from prefix key)
  • Built-in session persistence
  • Better default layouts
  • Discoverable features (Alt+y for help)
  • Modern codebase (Rust)

Trade-offs

  • Smaller plugin ecosystem
  • Fewer third-party resources
  • Rust toolchain required for building
  • Different muscle memory if coming from Tmux

Resources

Zellij Website

Official documentation and guides

Zellij GitHub

Source code and issue tracker

Layout Gallery

Example layouts and templates

Plugin System

Build custom WebAssembly plugins

Build docs developers (and LLMs) love