Useful macOS defaults: Control Centre

com.apple.controlcenter controls which items appear in Control Centre and the menu bar on macOS Ventura and later.

Each Control Centre module can appear in three places: only in Control Centre, in the menu bar, or not at all.

The values for menu bar visibility are:

(The exact numbers vary by module. Check the current values first with defaults read.)

Show Bluetooth in the menu bar

defaults write com.apple.controlcenter "NSStatusItem Visible Bluetooth" -bool true

Show Sound in the menu bar

defaults write com.apple.controlcenter "NSStatusItem Visible Sound" -bool true

Show Battery percentage in the menu bar

defaults -currentHost write com.apple.controlcenter BatteryShowPercentage -bool true

Note the -currentHost flag. Some Control Centre settings are per-machine rather than per-user.

Show the clock with seconds

To show seconds in the menu bar clock:

defaults write com.apple.menuextra.clock ShowSeconds -bool true

Use a 24-hour clock

defaults write com.apple.menuextra.clock Show24Hour -bool true

Show the day of the week in the clock

defaults write com.apple.menuextra.clock ShowDayOfWeek -bool true

Show the date in the clock

defaults write com.apple.menuextra.clock ShowDate -int 1

Values: 0 = when space allows, 1 = always, 2 = never.

Reading current settings

defaults read com.apple.controlcenter
defaults read com.apple.menuextra.clock

Notes

After changing clock or menu bar settings, restart the SystemUIServer:

killall SystemUIServer

Most of these settings are also available in System Settings, then Control Centre. The defaults commands are handy for scripting or setting up several Macs at once.


Enjoyed this post?

Well, you could share the post with others, follow me with RSS Feeds and/or send me a comment via email.


Tags

Category:

Year: