A Zellij plugin for opening single or multi tabs layouts within an existing zellij session.
For example if you are using a terminal text editor (helix, neovim, etc), you can use zellij layouts to open mulitple repo in your editor in separate tabs.
zellij-workspace
allows to list all of your layouts in a .zellij-workspace
file, fuzzy find layout, and apply the layout to the existing session.
Select a layout:
Apply layout to session:
Zellij version v0.38.0
or later.
Zellij | zellij-workspace |
---|---|
v0.38.x |
v0.1.0 |
v0.41.1 |
v0.2.0 |
Permission | Why |
---|---|
ReadApplicationState |
Subscribe to Pane and tab events |
ChangeApplicationState |
Setting plugin pane name, creating new tabs |
Zellij maps the folder where Zellij was started to /host
path on the plugin (e.g. your home dir or default_cwd
in your zellij or the current dir where you started your zellij session).
The plugin will look for a /host/.zellij-workspace
file (i.e. at the root of the dir of you current zellij session) to load a list of zellij layouts (relative path from your zellij session cwd
).
Example of a .ghost
file:
.config/zellij/layouts/my_custom_layout.kdl
## this is a comment starting with '#'
# this is also a comment
## empty lines are also ignored
.config/zellij/layouts/another_layout.kdl
- Download
zellij-workspace.wasm
binary from release page. - Verify binary signature with cosign (see instruction bellow)
- copy binary to zellij plugin dir:
mv target/wasm32-wasi/release/zellij-workspace.wasm ~/.config/zellij/plugins/
Make sure you have cosign
installed locally (see Cosign Install).
Then you can use the ./verify_signature.sh
in this repo:
./verify_signature.sh PATH_TO_DOWNLOADED_ARCHIVE TAG_VERSION
for example
$ ./verify_signature.sh ~/Downloads/zellij-workspace.wasm v0.1.0
Checking Signature for version: v0.1.0
Verified OK
WARNING: requires to have rust installed and wasm
rustup target add wasm32-wasi
git clone git@github.com:vdbulcke/zellij-workspace.git
cd zellij-workspace
cargo build --release
mv target/wasm32-wasi/release/zellij-workspace.wasm ~/.config/zellij/plugins/
shared_except "locked" {
bind "Ctrl y" {
LaunchOrFocusPlugin "file:~/.config/zellij/plugins/zellij-workspace.wasm" {
floating true
debug false // display debug info, config, parse command etc
}
}
}
zellij action launch-or-focus-plugin --floating "file:$HOME/.config/zellij/plugins/zellij-workspace.wasm"