-
-
Notifications
You must be signed in to change notification settings - Fork 658
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Add commands for controlling Mission Control #147
Comments
One additional thought: if you could somehow hook into the listener for this on the Docks side, it would no longer be necessary to check whether Mission Control is active (if the scripting addition is installed). |
Would this trigger mission control without any animation? |
I mean since this can kind of be implemented via applescript and binding it in skhd I would think it would be unnecessary? Or is there some sort of benefit I'm not seeing. |
AppleScript does not expose these events. Best you can do is You cannot trigger these without binding them to keyboard shortcuts in the System Preferences. These cannot be set in your dotfiles and and thus cannot be used in portable scripts. |
You're absolutely correct. I just double checked and most solutions are just sending keycodes via apple script. Good call and I'd love this kind of functionality since I use it often. |
Sounds fine to me. Do you have an idea what these commands would be? I don't see which domain they would go under at the moment. Introduce a new one? |
# should also focus selected space?
yabai -m space [<sel>] --toggle mission-control
yabai -m space [<sel>] --toggle show-desktop
# should also focus selected window?
yabai -m window [<sel>] --toggle app-expose I'm not sure if the launchpad one needs to be a thing really. It's covered by |
Listening to "com.apple.dock.prefchanged" from I can't figure out what notification center |
It doesn't talk to any notification center. It uses mach_msg to talk to |
Added the following commands:
All commands focus their respective entity before signalling the Dock. We also listen for |
The only way you can do that is by moving the cursor up there and back down. You can do that using cliclick quite easily. yabai -m space --toggle mission-control && cliclick -r m:0,0
# you might need to sleep shortly for consistency
yabai -m space --toggle mission-control && cliclick -r w:10 m:0,0 |
does this feature require SA injection? |
This will require the scripting-addition to be installed for it to be able to apply the given space selector, so that it can trigger mission-control expose for the given space. Without the scripting-addition installed, it should still be able to trigger expose for the currently actve space. |
For me this didn't work. But the below line did :).
I think the animation requires time after which mouse movement will be identified |
Discussion / Feature request
There is currently no way to control Mission Control from the command line, unless you're setting the Mission Control keyboard shortcuts. yabai could expose these notifications through its command line to make them scriptable (the current workaround being
skhd --key ...
, but that requires indirection and is not necessarily portable).Working example, compile with
clang -framework CoreFoundation -framework ApplicationServices path/to/file.c
:Known notifications are:
Do you think this is a useful addition, or does this fall out of scope?
The text was updated successfully, but these errors were encountered: