Replies: 2 comments 1 reply
-
|
Why don't you use the hotkey module? It's much easier: hs.hotkey.bind("ctrl-alt", "-", "Make window smaller", function() changeWindowSize(-10) end)
hs.hotkey.bind("ctrl-alt", "=", "Make window larger", function() changeWindowSize(10) end) |
Beta Was this translation helpful? Give feedback.
1 reply
-
|
Yes, the two lines replace the whole As a bonus tipp, try: hs.hotkey.showHotkeys("ctrl-alt", "/")That shows an overlay with all your defined shortcuts while holding Ctrl-Alt-/ down (or whatever binding you choose). Docs are here. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
I'm trying to replicate the workflow I have in other tools but in Hammerspoon. One of them is resizing by making a window larger or smaller, having its pivot in the window's center. I have it but if I hold down the keys the window starts to dance around, the same doesn't happen if I go step by step, I mean, releasing one of the keys in each step.
Here's the code I'm using:
Please, let me know if it's me or an Hammerspoon/Lua limitation.
Thanks
Beta Was this translation helpful? Give feedback.
All reactions