-
-
Notifications
You must be signed in to change notification settings - Fork 644
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
Dispatching keybound actions into plugins #662
Comments
Thanks @arefem-project for taking the time writing this issue down! The plugin side looks good to me personally, but I am not that familiar with it. |
Ah yeah I realize now that I was logged into the wrong account while posting this issue @a-kenji. Both #661 and #662 are me.
It could be reworked to go into the plugin configuration: plugins:
- path: sticky-cwd.wasm
tag: sticky-cwd
keybinds:
pane:
- action: [ NewPane: Right, ]
key: [ Char: 'm', ] Honestly that pull request is already large enough that I was trying to break things into smaller chunks! |
Oh no, I like that it is split up, I was actually suggesting you two I thought briefly about binding the invocation of the plugin actions I would like to get input from more people on here preferably. I like the 2nd option you proposed more personally, because then |
It would be nice if plugins could handle actions dispatched from keybindings. This would enable plugins to customize Zellij's default behavior for actions.
An example use case might be a plugin that wants to keep the current directory when creating a new pane. This plugin would need a way to handle "NewPane" actions dispatched from Zellij. The API for handling dispatched actions from inside plugins might look like this:
While the config file would look like this:
This above config would dispatch an Action::NewPane(Direction::Right) enum into the plugin when the "m" key is pressed inside the pane mode. The above presupposes that we have a way to associate the "sticky-cwd" tag with the running StickyCWD plugin.
The text was updated successfully, but these errors were encountered: