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
Configuration Breakdown
Modal System
Zellij uses a modal keybinding system. The default mode islocked, where most keys are passed through to your shell. Press Ctrl+g to unlock and enter command mode.
config.kdl
locked- Normal terminal input (default)pane- Pane managementtab- Tab managementresize- Resize panesmove- Move panesscroll- Scroll modesearch- Search in scrollbacksession- Session management
Themes
The configuration includes multiple beautiful themes:config.kdl
Default Layout
The configuration uses a custom work layout:config.kdl
~/.config/zellij/layouts/:
work.kdl- Basic 2-tab setup (nvim + shell)work_kanagawa.kdl- Kanagawa themedwork_everforest.kdl- Everforest themedwork_sakura.kdl- Sakura themedwork_oldWorld.kdl- OldWorld themed
Custom Plugins
Two WebAssembly plugins are included:- zjstatus.wasm - Custom status bar with git integration
- zellij_forgot.wasm - Interactive keybinding helper
Zellij Forgot Plugin
PressAlt+y to launch the keybinding helper:
config.kdl
Essential Keybindings
Mode Switching
| Keybinding | Action |
|---|---|
Ctrl+g | Toggle locked/unlocked mode |
Ctrl+q | Quit Zellij |
Esc or Enter | Return to locked mode |
p | Switch to pane mode |
t | Switch to tab mode |
r | Switch to resize mode |
m | Switch to move mode |
s | Switch to scroll mode |
o | Switch to session mode |
Quick Actions (Work in Locked Mode)
| Keybinding | Action |
|---|---|
Alt+n | New pane |
Alt+h/j/k/l | Navigate panes (Vim style) |
Alt+←/↓/↑/→ | Navigate panes (Arrow keys) |
Alt+f | Toggle floating pane |
Alt+[ | Previous layout |
Alt+] | Next layout |
Alt+i | Move tab left |
Alt+o | Move tab right |
Alt+y | Show keybinding helper |
Pane Mode (Ctrl+g then p)
| Keybinding | Action |
|---|---|
n | New pane |
r | New pane on the right |
d | New pane below |
x | Close focused pane |
f | Toggle fullscreen |
w | Toggle floating panes |
e | Toggle pane embed/float |
z | Toggle pane frames |
h/j/k/l | Move focus |
c | Rename pane |
Tab | Switch focus |
Tab Mode (Ctrl+g then t)
| Keybinding | Action |
|---|---|
n | New tab |
x | Close tab |
r | Rename tab |
h/j/k/l | Navigate tabs |
1-9 | Go to tab number |
s | Toggle sync tab (send input to all panes) |
b | Break pane to new tab |
[ | Break pane left |
] | Break pane right |
Tab | Toggle between tabs |
Resize Mode (Ctrl+g then r)
| Keybinding | Action |
|---|---|
h/j/k/l | Increase size in direction |
H/J/K/L | Decrease size in direction |
+ or = | Increase size |
- | Decrease size |
←/↓/↑/→ | Increase size in direction |
Scroll Mode (Ctrl+g then s)
| Keybinding | Action |
|---|---|
j/k or ↓/↑ | Scroll down/up |
h/l or ←/→ | Page scroll |
d | Half page down |
u | Half page up |
Ctrl+f | Page down |
Ctrl+b | Page up |
Ctrl+c | Scroll to bottom |
f | Enter search mode |
e | Edit scrollback in $EDITOR |
Session Mode (Ctrl+g then o)
| Keybinding | Action |
|---|---|
w | Open session manager |
c | Open configuration |
p | Open plugin manager |
d | Detach from session |
Work Layout Breakdown
The defaultwork.kdl layout creates a productive workspace:
work.kdl
- Two tabs:
nvim(focused) andshell - 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
Session Management
List sessions:Session Persistence
Zellij automatically serializes sessions:config.kdl
~/.cache/zellij/ and can be restored after crashes or reboots.
Scrollback Editor
The configuration uses Neovim for editing scrollback:config.kdl
Ctrl+g → s → e to edit scrollback in Neovim.
Customization Tips
Change Theme
Editconfig.kdl and update the theme setting:
config.kdl
config.kdl
Disable Mouse Mode
config.kdl
Change Default Shell
config.kdl
Adjust Scroll Buffer
config.kdl
Simplified UI (No Nerd Fonts)
config.kdl
Troubleshooting
Zellij not found after installation
Zellij not found after installation
If you installed with Then restart your shell.
cargo install, ensure ~/.cargo/bin is in your PATH:Keybindings not working
Keybindings not working
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.Themes not applying
Themes not applying
Verify the theme name matches exactly (case-sensitive):Then update the theme setting at the bottom of the file.
Status bar plugins not loading
Status bar plugins not loading
Ensure the plugin files exist:If missing, recopy from the Gentleman.Dots repository.
Git branch not showing in status bar
Git branch not showing in status bar
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:Shell Integration
Gentleman.Dots includes shell integration to auto-start Zellij.Zsh Integration
Edit~/.zshrc:
.zshrc
Fish Integration
Edit~/.config/fish/config.fish:
config.fish
Nushell Integration
Edit Nushell config:config.nu
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