コンテンツにスキップ

Zellij

Theme sync、status bar、fuzzy finder、pane bookmark を組み込んだ Zellij の設定。

theme-switch command で Catppuccin / Tokyo Night / Nord を切り替えると、Zellij の layout と status bar の色も自動的に変わる。

Plugin説明
ZjstatusGit branch、時刻、mode 表示のある status bar
Monoclepane / tab の fuzzy finder (Ctrl+qf)
Harpoonpane の bookmark 管理 (Ctrl+qb)

prefix key は Ctrl+q

Key操作
Ctrl+1-5tab 1-5 に切替
Key操作
h/j/k/lpane 間の focus 移動
H/J/K/Lpane の resize
Tab / Shift+Tab次 / 前の tab
t新規 tab
\右に分割
-下に分割
xpane を閉じる
z全画面切替
wfloating 切替
e埋込/float 切替
[scroll/copy mode
ddetach
KeyPlugin説明
fMonoclepane/tab を検索して jump
bHarpoonbookmark した pane に切替
Key操作
a現在の pane を bookmark に追加
j/k or /list 内を移動
Enter選択した pane に jump
dbookmark から削除
Esc閉じる

Zellij 0.38.0 以上と、Rust の wasm32-wasip1 target が必要。

Terminal window
rustup target add wasm32-wasip1

plugin は自動で download される。Harpoon を手動 build する場合:

Terminal window
git clone https://github.com/Nacho114/harpoon.git /tmp/harpoon
cd /tmp/harpoon
cargo build --release --target wasm32-wasip1
cp target/wasm32-wasip1/release/harpoon.wasm ~/.config/zellij/plugins/
~/.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 管理
  • Mode indicator (色付き背景)
  • Session 名
  • Git branch (10 秒間隔で自動更新)
  • 日時 (Asia/Tokyo timezone)
  • 通知 alert
  • Tab 表示 (番号と icon 付き)
  1. Zellij の version を確認: zellij --version
  2. plugin を source から rebuild
  3. cache を削除: rm -rf ~/.cache/zellij/
  1. file permission を確認: ls -la ~/.config/zellij/layouts/
  2. session を再起動: zellij kill-all-sessions
  3. theme-switch script を確認: which theme-switch
  1. wasm32-wasip1 target が install 済みか確認
  2. source から rebuild
  3. config に move_to_focused_tab true があるか確認
  1. layouts/theme-name.kdl を作成
  2. theme-switch script に新テーマを追加
  3. 既存テーマの color pattern に合わせて設定

config.kdl を編集する。

bind "Your Key" {
LaunchOrFocusPlugin "file:~/.config/zellij/plugins/plugin.wasm" {
floating true
}
SwitchToMode "normal"
}