With the next release, zellij introduces pipes for plugins, which allow to pipe arbitrary data to plugins. This allows us to implement a handler, that picks up the lines piped to zjstatus, such that it will be able to receive some commands.
In the first iteration zjstatus will gain the capability to rerun command widgets by sending a specific string through the pipe. To send such a message, simply run zellij pipe "zjstatus::rerun::command_name" in the session where the command should be refreshed. Please note the appending specification for the protocol to communicate with zjstatus.
[!IMPORTANT]
This pull request can only be merged as soon as zellij releases its new version!
Protocol description
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. As of now, only rerun is possible. 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).
Commands
rerun
Argumentscommand_name
Triggers a command run for the widget with the given name.
notify
Argumentsmessage
Displays a notification with the given body in the notification widget.
With the next release, zellij introduces pipes for plugins, which allow to pipe arbitrary data to plugins. This allows us to implement a handler, that picks up the lines piped to zjstatus, such that it will be able to receive some commands.
In the first iteration zjstatus will gain the capability to rerun command widgets by sending a specific string through the pipe. To send such a message, simply run
zellij pipe "zjstatus::rerun::command_name"
in the session where the command should be refreshed. Please note the appending specification for the protocol to communicate with zjstatus.Protocol description
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}}
is alwayszjstatus
, 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. As of now, onlyrerun
is possible. The third part is variadic and can provide arguments to the command to run. In case ofrerun
it is the command name as written in the layouts (e.g.command_date
).Commands
rerun
Arguments
command_name
Triggers a command run for the widget with the given name.
notify
Arguments
message
Displays a notification with the given body in the notification widget.