1

I'd like to make a shortcut to quickly hide/show widgets on the desktop e.g. for when I'm sharing my screen. I was able to figure out that the checkboxes in Settings are linked to the "defaults" keys com.apple.WindowManager StandardHideWidgets and com.apple.WindowManager StageManagerHideWidgets. Toggling the checkboxes sees the changes reflected in defaults read, as expected. However, I don't seem to be able to do the reverse, i.e. change the setting by calling defaults write, which is my goal. The value of the key changes, but the setting seems to be unaffected (yes, even if I restart the Dock, Finder, or WindowManager processes)

2
  • Maybe its another process entirely other than the Dock, Finder or WindowManager processes.
    – IconDaemon
    Commented Oct 25, 2023 at 12:34
  • Well yes of course - if it is, I don’t know how to go about identifying it and am hoping someone does. My guess was the WindowManager process since that’s its defaults domain, but I’m not sure how to proceed given that doesn’t work
    – Caketray
    Commented Oct 25, 2023 at 15:42

1 Answer 1

3

Try using an int instead of a boolean. This works for me:

defaults write com.apple.WindowManager StandardHideWidgets -int 0

When using Stage Manager:

defaults write com.apple.WindowManager StageManagerHideWidgets -int 0

Credit to the notes found at WidgetToggler (which is a free and open-source app I haven't tried yet).

Note: When I use this method, the widgets are hidden if there is a window in the foreground but will show when you click on (reveal) the desktop. I'm not sure how to disable them completely.

You must log in to answer this question.

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