-
Notifications
You must be signed in to change notification settings - Fork 9
5 ‐ Pipes
With version 0.40.0, zellij introduces pipes for plugins, which allow to pipe arbitrary data to plugins. This allows us to implement a handler, that processes arbitrary commands from outside of zjstatus. As a result we gain some remote control features.
Important
Make sure you are using zellij 0.40.0 or newer!
Here's an example of how to send a command to zjstatus. Run the following command within the same zellij session:
zellij pipe "zjstatus::notify::Hello, World!"
The following commands are currently supported.
Command notify
Arguments message
Example zjstatus::notify::Hello, World!
Displays a notification with the given body in the notification widget.
Command rerun
Arguments command_name
Example zjstatus::rerun::command_pwd
Force to run the command with the given name again.
As the name indicate, the protocol sends messages via lines. This means, that each line will try to be interpreted as one command. Each line has the following structure:
{{prefix}}::{{command}}::{{args}}
{{prefix}}
is always zjstatus
, such that zjstatus will be able to distinguish between messages for other plugins and itself. {{command}}
is the command you want to transmit to zjstatus. The third part is variadic and can provide arguments to the command to run. In case of rerun it is the command name as written in the layouts (e.g. command_date
).