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

Add focus-pane-with-id CLI action #3747

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

topisani
Copy link

@topisani topisani commented Nov 8, 2024

Allows scripts to better control the pane focus. My use case is to avoid this horrible hack used in the kakoune zellij integration:
https://github.com/mawww/kakoune/blob/8c49c8ee404fecc110338c08eeed515b63caa93c/rc/windowing/zellij.kak#L46-L59

Instead, a pane can now be focused from its $ZELLIJ_PANE_ID environment variable.
Possibly a fix for #3190

@imsnif
Copy link
Member

imsnif commented Nov 8, 2024

Hey, I appreciate you putting the time into this but I'm afraid in Zellij-world we encourage users to perform such actions with plugins.

As you have discovered, the CLI is not aware of multiple clients and can never be (because multiple clients being focused on the terminal is a Zellij concept). Meaning that when there is more than one client connected to the session, the results of this action will be unexpected to all users involved.

Plugins are client aware. It's possible to write a plugin that does this and then load it into Zellij, have it communicate with kakoune and generally do the right thing.

Thank you for your understanding.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants