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

Make current window id available #532

Closed
mawww opened this issue May 10, 2018 · 2 comments
Closed

Make current window id available #532

mawww opened this issue May 10, 2018 · 2 comments

Comments

@mawww
Copy link

mawww commented May 10, 2018

Hello,

while experimenting with kitty and kakoune integration, I failed to find a way to focus a given client. It seems the only way to know the id of a window is to read the output of kitty @ new-window ..., which is not very convenient, and does not work for the initial window.

I would be nice to have access to the window id through an environment variable, which is what for example iterm2 and tmux do (through respectively the ITERM_SESSION_ID and TMUX_PANE env vars).

This would allow for the following use case: kitty @ focus-window --match=id:$KITTY_WINDOW_ID to focus the current window programmatically.

@kovidgoyal
Copy link
Owner

kovidgoyal commented May 10, 2018

You dont need to specify --match at all. If no window is specified the window that the command is run in is focused. I'll add that to the --help for that command.

But, sure, it's useful to have th eenvironment variable available as well.

@mawww
Copy link
Author

mawww commented May 10, 2018

Thanks, in my use case its actually the server process (which might, or not be running under kitty) that is able to run this focus command, so I did need the environment variable from the client (clients do send environment variables to the server, but they are not equipped to run other processes).

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

No branches or pull requests

2 participants