zellij-org / zellij

A terminal workspace with batteries included
https://zellij.dev
MIT License
19.99k stars 626 forks source link

Plugin: Add action that can send data to a plugin #874

Closed a-kenji closed 3 months ago

a-kenji commented 2 years ago

Add an action that can send structured/unstructured data to a plugin.

TheLostLambda commented 2 years ago

Hi @a-kenji ! Are you thinking of sending something like an event?

This sort of thing? https://github.com/zellij-org/zellij/blob/639566df1540b2a80f6fdf27d7eb2ce823fa03e5/zellij-tile/src/data.rs#L46-L55

a-kenji commented 2 years ago

Hey @TheLostLambda, Yes! For example:

SendJson(Json),
SendText(String),

So that zellij could send clipboard contents, output of commands, input of commands, or the pane contents to plugins.

hiasr commented 3 months ago

I think this would be very helpful to enable useful background plugins and would be willing to implement this. Do we just want to enable unstructured text to be sent, or also allow plugins to register their own actions? The first is more flexible, the latter is more consistent and is the most similar to other systems. The first would also already solve the issue of knowing which plugin to send the data to.

imsnif commented 3 months ago

This has been implemented with pipes.