$ defaults read com.apple.systemuiserver { "__NSEnableTSMDocumentWindowLevel" = 1; "last-messagetrace-stamp" = "775063394.13825"; menuExtras = ( "/System/Library/CoreServices/Menu Extras/TimeMachine.menu", "/System/Library/CoreServices/Menu Extras/AirPort.menu", "/System/Library/CoreServices/Menu Extras/TextInput.menu", "/System/Library/CoreServices/Menu Extras/Volume.menu", "/System/Library/CoreServices/Menu Extras/Clock.menu" ); }
be cautious: in this command :menuExtra:1 refers to the second entry from the output of the previous command
$ /usr/libexec/PlistBuddy -c 'Delete :menuExtras:1' ~/Library/Preferences/com.apple.systemuiserver.plist $ killall SystemUIServer
the second command needs to be applied multiple times, at least some times :-)
Show WIFI menu-item:
$ defaults -currentHost write com.apple.controlcenter WiFi -int 18
Hide WIFI menu-item:
$ defaults -currentHost write com.apple.controlcenter WiFi -int 24
It works instantly, not even needed to killall SystemUIServer