4

I am trying to write an automation using either Bash or AppleScript, to enable / disable Stage Manager, and this looks quite difficult to achieve.

I cannot find much documentation around since in macOS Ventura the System Preferences have become System Settings, and there are not tabs anymore, so I ask whether anyone is able to achieve the task.

It looks like I have found a possible answer here. However I have difficulties in pointing at the right Switch. Here is my script which does not work. It looks like I am having the groups messed up...

do shell script "open x-apple.systempreferences:com.apple.Desktop-Settings.extension"

tell application "System Events"
    tell its application process "System Settings"
        repeat until UI element 4 of group 1 of scroll area 1 of group 1 of ¬
          group 2 of splitter group 1 of group 1 of window "Desktop & Dock" exists
            delay 0.1
          end repeat
            
          click checkbox "Stage Manager" of group 6 of scroll area 1 of group 1 of group 2 of splitter group 1 of group 1 of window "Desktop & Dock"
    end tell
end tell
0

1 Answer 1

5

To disable Stage Manager:

defaults write com.apple.WindowManager GloballyEnabled -bool false

To enable it:

defaults write com.apple.WindowManager GloballyEnabled -bool true

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .