A Zellij plugin for creating, managing, and quickly inserting command bookmarks into the terminal.
- Easily create and manage command bookmarks.
- Quickly filter, view, and insert commands into the terminal.
- Switch between bookmark and label modes for better organization.
- Navigation: Use
Up
andDown
to cycle through the bookmarks or labels list. - Insert Command: Press
Enter
to paste the selected bookmark into the terminal. - Search: Start typing to filter the list based on the current mode.
- Exit: Press
Esc
orCtrl + c
to exit the plugin. - Edit Bookmarks: Press
Ctrl + e
to open the bookmark configuration file for editing. - Reload Configuration: Press
Ctrl + r
to reload bookmarks after making changes. - Filter Modes: Use
Ctrl + f
to toggle filter modes (available only in bookmark mode). - Switch Modes: Press
Ctrl + l
to toggle between Bookmarks and Labels modes. - View Commands: Press
Ctrl + v
to display the command associated with the bookmark (only for bookmarks). - Usage Info: Press
Ctrl + u
to display usage instructions.
-
Install Rust and Cargo if you haven't already. Follow the installation guide here.
Additionally, install the
wasm32-wasip1
target by following the documentation here. -
Clone the repository:
git clone https://github.com/yaroslavborbat/zellij-bookmarks.git
-
Build the plugin:
task build
-
Install the plugin:
task install
For a quick installation, run the following command to download the plugin directly:
mkdir -p ~/.config/zellij/plugins && \
curl -L "https://github.com/yaroslavborbat/zellij-bookmarks/releases/latest/download/zellij-bookmarks.wasm" -o ~/.config/zellij/plugins/zellij-bookmarks.wasm
Note: You don't need to keep zellij-bookmarks.wasm at this specified location. It's just where I like to keep my zellij plugins.
Add the following configuration to your Zellij config inside the keybinds section:
shared_except "locked" {
bind "Alt M" {
LaunchOrFocusPlugin "file:~/.config/zellij/plugins/zellij-bookmarks.wasm" {
floating true
cwd "/home/<USER>/.config/zellij/"
};
}
}
Note: You likely already have a
shared_except "locked"
section in your configuration. Add thebind
command there.
Note: Make sure to replace <USER> in the cwd path with your actual username.
exec
: (default:false
) - Iftrue
, the command will execute immediately after pressingEnter
. This can be overridden per bookmark.ignore_case
: (default:true
) - When filtering, ignores case sensitivity in both the filter string and bookmark/label names.cwd
: (REQUIRED) - The absolute path where your bookmarks file will be stored.filename
: (default:.zellij_bookmarks.yaml
) - The name of the bookmarks file.
The bookmarks configuration is a YAML file that defines your bookmarks. Each bookmark has the following fields:
name
: A human-readable name for the bookmark.command
: The command to be inserted into the terminal.exec
: (optional) Whether the command should be executed immediately.label
: (optional) A category or tag for the bookmark.
bookmarks:
- name: "Bookmark #1"
command: "echo 'Your command #1'"
exec: true
label: echo
- name: "Bookmark #2"
command: |
echo 'Your command #2'
exec: false
label: echo
Found an issue or have a feature request? Feel free to open an issue on GitHub.