You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hey, thanks for this plugin first off, it's been really great for me especially, since I tend to be a little bit too zealous with pressing my quit bind (and forgetting I had a download or update running in another tab 🙃)!
One thing I was wondering whether it'd be possible to do was to only quit the current focus or tab with a confirmation message, since right now zj-quit is only able to quit the entire session at once. This obviously won't be a big issue for most people, but if you wanted to say, replace your native terminal's tabs and splits with zellij then you may want for it to warn you when you are about to close an important tab, as well.
One possible idea I've had here was to add a "scope" config option which defines what kind of quit message is sent back to zellij ultimately, i.e.
zjquit location="https://github.com/cristiand391/zj-quit/releases/download/0.3.1/zj-quit.wasm" {
confirm_key "y"
cancel_key "Esc"
scope "Session" // can also be "Focus" or "Tab", "Session" is the default to preserve existing behaviour
}
That way, if I for example wanted to have different quit prompts for certain keybinds, I would just import the plugin three times with different aliases and configs. I've already tried to tinker with the plugin a little bit to get this to work locally, though I think for the tab and focus scopes we need to save which pane was active before the plugin was invoked (if that's even possible? Sorry I'm... not exactly the most knowledgeable person when it comes to the inner workings of zellij), since the focus obviously shifts when the prompt is launched.
The text was updated successfully, but these errors were encountered:
I've been thinking about this for a while (I'm mostly interested in tabs, panes could work tho) but as a separate plugin, was waiting for support for headless plugin (added in 0.41.0) and for someone to ask for this 😁
Dumping thoughts/ideas out of my brain:
This should be a new headless plugin, you update your keybinds to close current tab/pane to send msg to it (AFAIK there's no way to intercept API calls, that's why zj-quit requires you to redefine the Quit keybind), features:
Allow to "pin" a tab/pane so it can't be accidentally deleted (so, no prompts like in zj-quit)
Allow to re-open a closed tab (plugin can dump the current layout, keep the tab layout in memory for a bit so you can CTRL + SHIFT + T to recover it)
maybe a UI like this? (screenshot from firefox's Recent browsing tab:
Hey, thanks for this plugin first off, it's been really great for me especially, since I tend to be a little bit too zealous with pressing my quit bind (and forgetting I had a download or update running in another tab 🙃)!
One thing I was wondering whether it'd be possible to do was to only quit the current focus or tab with a confirmation message, since right now zj-quit is only able to quit the entire session at once. This obviously won't be a big issue for most people, but if you wanted to say, replace your native terminal's tabs and splits with zellij then you may want for it to warn you when you are about to close an important tab, as well.
One possible idea I've had here was to add a "scope" config option which defines what kind of quit message is sent back to zellij ultimately, i.e.
That way, if I for example wanted to have different quit prompts for certain keybinds, I would just import the plugin three times with different aliases and configs. I've already tried to tinker with the plugin a little bit to get this to work locally, though I think for the tab and focus scopes we need to save which pane was active before the plugin was invoked (if that's even possible? Sorry I'm... not exactly the most knowledgeable person when it comes to the inner workings of zellij), since the focus obviously shifts when the prompt is launched.
The text was updated successfully, but these errors were encountered: