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

Potential Kitty Support? #43

Open
the10thWiz opened this issue Mar 13, 2021 · 0 comments
Open

Potential Kitty Support? #43

the10thWiz opened this issue Mar 13, 2021 · 0 comments

Comments

@the10thWiz
Copy link

The kitty terminal implements a remote control protocol that allows programs running within a kitty window to control a kitty instance.

It would be nice to implement this in vim-ghost, as an alternative to xdotool for auto-focusing the vim window. The following code snippet raises the current window, although it does require Kitty to be configured for remote control (obviously) and to listen on a specific port. The port kitty is listening on is provided via the environment variable, but it would be ideal if we can also avoid this dependency.

function! Focus()
  if getenv('KITTY_LISTEN_ON') != v:null
    silent ! kitty @ focus-window
    return v:true
  else
    return v:false
  endif
endfunction

This should be reasonably easy to port to Python, and we may be able to remove the reliance on kitty listening.

I am willing to work on this. The idea is that this would be checked before attempting to use xdotool, and should only require the user to enable remote control in kitty.

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

1 participant