feat: support kitty remote control along with tmux #11
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Hey there, thanks for this helpful package!
This is my attempt at adding support for the kitty (https://github.com/kovidgoyal/kitty) terminal emulator. I prefer kitty over tmux for being much more lightweight and less of a "hacky" solution (see kovidgoyal/kitty#2422)
Unfortunately, I couldn't find a way to "automagically" check if we're working inside a kitty instance, except for $TERMINAL or $TERMINFO environment variables which are, of course, set globally by the user irrespective of the current terminal effectively being used. If you have any suggestions on how to do this (or if the author of kitty will read this and have one), I'm happy to integrate it. However, with this PR, the user can set the "rvisidata.cmd" option to the string "kitty" to use the default cmd that I provided within the package, which opens visidata in a new tab. If you try to run a kitty remote cmd outside kitty, it simply goes on timeout after 10 secs, so we shouldn't worry too much about breaking things.
I hope this is of interest to you and the users of the package, and I look forward to hearing your thoughts about this :)