Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature req: Show/Hide wifi status in menu #85

Open
focusaurus opened this issue Oct 13, 2016 · 1 comment
Open

Feature req: Show/Hide wifi status in menu #85

focusaurus opened this issue Oct 13, 2016 · 1 comment

Comments

@focusaurus
Copy link
Contributor

Not sure if this is easy/hard/impossible, but I'd like a scripted way to toggle the "Show Wi-Fi status in menu bar" setting from the Network preferences screen. I think this uses the defaults system and updates something like NSStatusItem Visible com.apple.menuextra.airport" = 1; but I don't know the proper incantation to simulate the Preferences Pane behavior via command line.

  "com.apple.systemuiserver" =     {
        "NSStatusItem Visible Siri" = 0;
        "NSStatusItem Visible com.apple.menuextra.airport" = 1;
        "NSStatusItem Visible com.apple.menuextra.battery" = 1;
        "NSStatusItem Visible com.apple.menuextra.bluetooth" = 1;
        "NSStatusItem Visible com.apple.menuextra.clock" = 1;
        "NSStatusItem Visible com.apple.menuextra.textinput" = 1;
        "__NSEnableTSMDocumentWindowLevel" = 1;
        "last-messagetrace-stamp" = "497807700.002411";
        menuExtras =         (
            "/System/Library/CoreServices/Menu Extras/Clock.menu",
            "/System/Library/CoreServices/Menu Extras/TextInput.menu",
            "/System/Library/CoreServices/Menu Extras/Bluetooth.menu",
            "/System/Library/CoreServices/Menu Extras/Battery.menu",
            "/System/Library/CoreServices/Menu Extras/AirPort.menu"
        );
    };
@bensleveritt
Copy link
Collaborator

Thanks for raising this, and sorry it's taken so long to address. I think this would fit in well with the project.

Found this in someone's mac setup:

...
defaults write com.apple.systemuiserver "NSStatusItem Visible Siri" 0
defaults write com.apple.systemuiserver "NSStatusItem Visible com.apple.menuextra.airport" 1
defaults write com.apple.systemuiserver "NSStatusItem Visible com.apple.menuextra.battery" 1
defaults write com.apple.systemuiserver "NSStatusItem Visible com.apple.menuextra.bluetooth" 1
defaults write com.apple.systemuiserver "NSStatusItem Visible com.apple.menuextra.clock" 1
defaults write com.apple.systemuiserver "NSStatusItem Visible com.apple.menuextra.volume" 1
...

So should be doable. I'll take a look at it shortly 🤞

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants