Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
a-kenji opened this issue Nov 16, 2021 · 4 comments
Closed

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

a-kenji opened this issue Nov 16, 2021 · 4 comments
Labels
action Issues related to actions plugin system Enhancement or fixes related to plugin system

Comments

@a-kenji
Copy link
Contributor

a-kenji commented Nov 16, 2021

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

@a-kenji a-kenji added action Issues related to actions plugin system Enhancement or fixes related to plugin system labels Nov 16, 2021
@a-kenji a-kenji mentioned this issue Nov 16, 2021
12 tasks
@TheLostLambda
Copy link
Member

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

This sort of thing?

pub enum Event {
ModeUpdate(ModeInfo),
TabUpdate(Vec<TabInfo>),
Key(Key),
Mouse(Mouse),
Timer(f64),
CopyToClipboard,
InputReceived,
Visible(bool),
}

@a-kenji
Copy link
Contributor Author

a-kenji commented Nov 23, 2021

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
Copy link
Contributor

hiasr commented Apr 29, 2024

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
Copy link
Member

imsnif commented Apr 29, 2024

This has been implemented with pipes.

@imsnif imsnif closed this as completed Apr 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
action Issues related to actions plugin system Enhancement or fixes related to plugin system
Projects
None yet
Development

No branches or pull requests

4 participants