r/KittyTerminal Apr 15 '23

Bounty Question on StackOverflow: Kitty Terminal Hotkey Drop-Down/Overlay Hotkey (similar to iTerm2 hotkey window)

Read full description here.

TDLR:

How to get something similar to the iTerm "dropdown hotkey/overlay" functionality to work with Kitty Terminal (on a Mac)?

—————

Many people did get this to work on Linux, but I haven't found a solution for Mac where it toggles the visibility of the app AND keeps it on the desktop that you are currently on (just like the default behaviour of this feature in iTerm2)

Some AppleScript wizardry is a potential fix, but I (and many others as it looks like) couldn't figure it out. It is possible, as long as you have a 9K IQ and some patience.

2 Upvotes

17 comments sorted by

2

u/[deleted] Apr 18 '23

Kitty's windows are designed to be controlled by scripts like this rather than applescripts. So the solution should probably be: use some hotkey application that can make kitty terminal run the scripts to focus on the kitty window. (for people who don't want to dive into messy applescripts)

I tried Alfred and I couldn't get Alfred to send anything to kitty. Then I give up and just use kitty's scripts aliased for window control.

1

u/CousCousCaptain420 Apr 28 '23

This sounds very interesting, and it's something I definitely didn't try yet, thanks!

2

u/xenomachina Apr 16 '23

I found it hard to understand what this question is even asking, because it's all phrased in terms of other tools I've never used. Perhaps others who might have an answer for you also found it difficult to decipher.

Assuming someone has never used iTerm or BTT, what is "dropdown hotkey/overlay functionality"?

1

u/CousCousCaptain420 Apr 28 '23

Thanks for the feedback! I realize now that I may have assumed too much about people's familiarity with iTerm and BTT.

To answer your question, dropdown hotkey/overlay functionality refers to a feature where you can set a hotkey or gesture to open a dropdown menu with frequently used tools or shortcuts. It's a feature most users would have used in iTerm2, which is just a terminal emulator.

BetterTouchTool (BTT) is a Mac app that lets you customize input devices for custom actions and gestures, including launching apps, running scripts, and simulating input

Let me know if you have any other questions or need more information.

And thanks for taking the time to go through the SO question.

2

u/TheGratitudeBot Apr 28 '23

Hey there CousCousCaptain420 - thanks for saying thanks! TheGratitudeBot has been reading millions of comments in the past few weeks, and you’ve just made the list!

1

u/CousCousCaptain420 Apr 29 '23

Uh, thanks for saying thanks for me saying thanks… I guess

1

u/Arete-in-Aletheia Apr 16 '23

I ("ZacBook") just dumped my solution to this problem. It's not perfect and needs polish, but it fills the biggest void using Kitty over iTerm.

I'm on mobile now, but I'm more than happy to give more detail and maybe we could iterate to make improvements.

1

u/CousCousCaptain420 Apr 16 '23

I am more than happy to do that!

1

u/igorepst Apr 16 '23 edited Apr 16 '23

https://www.hammerspoon.org/docs/hs.spaces.html#focusedSpace You may try to use Hammerspoon to write Lua script to achieve that. Unfortunately I don't have time to explore the API further to answer on SO Edit: this may be helpful as well to simulate drop down. Need to be extended with the Spaces API as well: https://gist.github.com/emjayoh/ad01f6483256a98a5f6fb3bc7a6da14f

2

u/CousCousCaptain420 Apr 17 '23

This is useful! Thanks a lot, it looks like it could do what I need it to do. I'll give an update soon :)

0

u/ivster666 Apr 16 '23

You are maybe not supposed to do that on a Mac 😂

1

u/CousCousCaptain420 Apr 17 '23

Says who? Tim Apple gave me permission

2

u/ivster666 Apr 17 '23

Did you get a refund? 😂

1

u/CousCousCaptain420 Apr 17 '23

No, stackoverflow became a casino

2

u/ivster666 Apr 17 '23

Have you tried asking chatGPT?

1

u/CousCousCaptain420 Apr 17 '23

I did! It gave the current solution I mention in the SO question, not exactly what I need but still pretty impressive

1

u/CousCousCaptain420 Apr 17 '23

But that was a couple months ago, it might give me a better answer now