showcase.webm
zellij-choose-tree is a plugin for zellij that allows users to quickly switch between sessions.
It is inspired by tmux choose-tree accessible with Ctrl+b s by default.
- Up/Down k/j arrow keys to navigate
- Left/Right h/l to fold/unfold to reveal tabs/panes
xto delete selected session (tab/pane deletion not supported yet)Enterto switch to selected session/tab/pane1-9A-Zto switch to session/tab/pane without navigating
Download zellij-choose-tree.wasm from the latest release and place it in your zellij plugins folder.
mkdir -p ~/.config/zellij/plugins
wget https://github.com/laperlej/zellij-choose-tree/releases/latest/download/zellij-choose-tree.wasm -O ~/.config/zellij/plugins/zellij-choose-tree.wasmAdd the plugin to a keybinding in your config.toml.
In this example, the keybinding is bound to s in tmux mode.
tmux {
# other keybinds here ...
bind "s" { LaunchOrFocusPlugin "file:~/.config/zellij/plugins/zellij-choose-tree.wasm" {
floating true
move_to_focused_tab true
show_plugins false
}; SwitchToMode "Locked";
}
}Optional arguments:
show_plugins true|false: display/hide the plugin panes, default isfalse
This plugin can also act as a sessionpicker when called through a pipe.
In your config file:
plugins {
// other plugins here ...
sessionpicker location="file:~/.config/zellij/plugins/zellij-choose-tree.wasm"
}From the command line:
zellij pipe --plugin sessionpickerThe name of the selected session will be returned.
Other plugins can also call this plugin through a pipe in the same way.
Contributions are welcome. Please open an issue or a pull request.
This project is licensed under the MIT License - see the LICENSE file for details.