I found a new love on window management called Amethyst. With it, came a new appreciation for macOS spaces as well and now I’m using them more and more.
However, I can’t find a way to reliably open a new space via some scripting language that won’t require me disabling SIP, such as installing yabai.
I found this approach bellow, but since it relies on UI Scripting and the AXDescription
of a button, I guess that couldn’t be properly replicated on a non-English macOS install such as mine (at least, I couldn’t get it to work on my end).
do shell script "open -a 'Mission Control'"
delay 0.5
tell application "System Events" to ¬
click (every button whose value of ¬
attribute "AXDescription" is "add desktop") of ¬
group 2 of group 1 of group 1 of process "Dock"
delay 0.5
tell application "System Events" to key code 53
So I guess I could either:
- Fix this for my Brazilian Portuguese install by identifying the
AXDescription
of that button, but I have no idea how to find out this property. - Find another way/app to tie to an Keyboard Maestro Macro.