Zellij
Theme sync、status bar、fuzzy finder、pane bookmark を組み込んだ Zellij の設定。
Theme Sync
Section titled “Theme Sync”theme-switch command で Catppuccin / Tokyo Night / Nord を切り替えると、Zellij の layout と status bar の色も自動的に変わる。
Plugin
Section titled “Plugin”| Plugin | 説明 |
|---|---|
| Zjstatus | Git branch、時刻、mode 表示のある status bar |
| Monocle | pane / tab の fuzzy finder (Ctrl+q → f) |
| Harpoon | pane の bookmark 管理 (Ctrl+q → b) |
Keybindings
Section titled “Keybindings”prefix key は Ctrl+q。
Prefix なし
Section titled “Prefix なし”| Key | 操作 |
|---|---|
Ctrl+1-5 | tab 1-5 に切替 |
Prefix mode (Ctrl+q →)
Section titled “Prefix mode (Ctrl+q →)”| Key | 操作 |
|---|---|
h/j/k/l | pane 間の focus 移動 |
H/J/K/L | pane の resize |
Tab / Shift+Tab | 次 / 前の tab |
t | 新規 tab |
\ | 右に分割 |
- | 下に分割 |
x | pane を閉じる |
z | 全画面切替 |
w | floating 切替 |
e | 埋込/float 切替 |
[ | scroll/copy mode |
d | detach |
Plugin shortcut
Section titled “Plugin shortcut”| Key | Plugin | 説明 |
|---|---|---|
f | Monocle | pane/tab を検索して jump |
b | Harpoon | bookmark した pane に切替 |
Harpoon の操作
Section titled “Harpoon の操作”| Key | 操作 |
|---|---|
a | 現在の pane を bookmark に追加 |
j/k or ↑/↓ | list 内を移動 |
Enter | 選択した pane に jump |
d | bookmark から削除 |
Esc | 閉じる |
Zellij 0.38.0 以上と、Rust の wasm32-wasip1 target が必要。
rustup target add wasm32-wasip1plugin は自動で download される。Harpoon を手動 build する場合:
git clone https://github.com/Nacho114/harpoon.git /tmp/harpooncd /tmp/harpooncargo build --release --target wasm32-wasip1cp target/wasm32-wasip1/release/harpoon.wasm ~/.config/zellij/plugins/File 構成
Section titled “File 構成”~/.config/zellij/├── config.kdl # main の設定├── layouts/│ ├── catppuccin.kdl # Catppuccin theme│ ├── tokyonight.kdl # Tokyo Night theme│ ├── nord.kdl # Nord theme│ └── default.kdl # active theme への symlink└── plugins/ ├── zjstatus.wasm # status bar ├── monocle.wasm # fuzzy finder └── harpoon.wasm # pane 管理Status bar の表示内容
Section titled “Status bar の表示内容”- Mode indicator (色付き背景)
- Session 名
- Git branch (10 秒間隔で自動更新)
- 日時 (Asia/Tokyo timezone)
- 通知 alert
- Tab 表示 (番号と icon 付き)
Troubleshooting
Section titled “Troubleshooting”Plugin が読み込めない
Section titled “Plugin が読み込めない”- Zellij の version を確認:
zellij --version - plugin を source から rebuild
- cache を削除:
rm -rf ~/.cache/zellij/
テーマが反映されない
Section titled “テーマが反映されない”- file permission を確認:
ls -la ~/.config/zellij/layouts/ - session を再起動:
zellij kill-all-sessions - theme-switch script を確認:
which theme-switch
Harpoon が crash する
Section titled “Harpoon が crash する”wasm32-wasip1target が install 済みか確認- source から rebuild
- config に
move_to_focused_tab trueがあるか確認
Customize
Section titled “Customize”テーマの追加
Section titled “テーマの追加”layouts/theme-name.kdlを作成theme-switchscript に新テーマを追加- 既存テーマの color pattern に合わせて設定
Keybinding の変更
Section titled “Keybinding の変更”config.kdl を編集する。
bind "Your Key" { LaunchOrFocusPlugin "file:~/.config/zellij/plugins/plugin.wasm" { floating true } SwitchToMode "normal"}