Skip to content

Potential Kitty Support? #43

@the10thWiz

Description

@the10thWiz

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions