finestructure / Hummingbird

A macOS utility that makes window management a breeze
https://hbird.app
MIT License
218 stars 19 forks source link

CLI Support? #21

Closed cotfas closed 4 years ago

cotfas commented 4 years ago

Is it possible to have CLI support as well?

I do not want the app to be running in the status bar/dock (as I use other window manager app for other purpose)

I was thinking if the code app can support CLI as well?

I was thinking to map two keys from Karabinier for move and resize and when I press the key will execute the command line with args and based on what window is opened will do the move/resize.

Thank you

finestructure commented 4 years ago

I'm not sure I follow exactly - let me see if I can clarify :)

If you don't want to see the Hummingbird icon, I'd recommend a tool like Bartender to hide it. I'm actually using that myself.

However, it sounds it's not just the icon visibility. You want the app to run on demend, I believe. But for Hummingbird to work it has to be running - it needs to monitor keyboard events to see if the modifiers are pressed.

If you are worried that it might interfere with other "window managers" - don't be! I'm actually using both Hummingbird and Moom. They work great together.

Let me know if that helps or if I misunderstood.

Just to be clear, mapping keys to Karabiner and then triggering Hummingbird will not work. I'm not even sure that's possible in principle, let alone something that's within the scope of this project - sorry :)

cotfas commented 4 years ago

Hello,

I use the Bartender app and also Moom.

I was thinking more like a script or CLI that when the command is triggered to take the current screen and do the move/resize.

The karabinier eventviewer shows when the key is pressed key_down and when is released it triggers the key_up. I was thinking that somehow the code for moving/resizing can be reused in a CLI based app.

What do you think? :) (I have beginner knowledge in xcode/swift, that`s why I wanted to ask you)

finestructure commented 4 years ago

I'm afraid that won't work. Hummingbird has to track window size and position continuously, many times per second. It needs to be running for that to work. It would be way too slow to launch it every time and pass arguments across.

finestructure commented 4 years ago

Going to go ahead and close this issue then. Happy window hovering, whichever way you decide to do it :)