Bluetooth and wifi Toggle (+possible colour change to reflect on/off status)

Useful on a MacBook Pro to help conserve battery power. Toggles to switch Bluetooth and WiFi on and off.

I was able to set up an automator script for WiFi and apply a keyboard shortcut which I then assigned a button to but have not been able to do the same with Bluetooth.

Also, though maybe not possible, is it possible to have the colour of the Touch Bar button change depending on whether the toggle is currently on or off?

Many thanks for the excellent app. My touch bar is a thing of greatness thanks to your efforts.

Hi! I was able to do bluetooth switch somehow a little while ago, but not WIFI :slight_smile: Lol

Anyway built in solution would be great. I'd share you my snippet which toggles bluetooth (it has different icons depending on toggle state) but it's really dirty JXA underneath and it's language dependant (there are string comparisions for "Turn on Bluetooth" or similar), so you'd have to tweak it yourself anyway :confused:

I created this script in automator and then assigned it to a keyboard shortcut.

if [[ networksetup -getairportpower en0 == *On ]]
then
networksetup -setairportpower en0 off
else
networksetup -setairportpower en0 on
fi

Depending on your Mac the Airport may be en1 or en0. The original script I found was en1 but I had to edit it to en0 for it to work on my system.

1 Like

Any chance of a vote? Just to raise this to be implemented maybe in the future.

Thanks

1 Like

Aso a Location Services toggle would be good. Kind of like what you get at the top of an Android/iOS phone.

An all in one power saving toggle that does all of the above and perhaps some more power saving options would be great.

I used this solution here, in case anyone ends up down same rabbit hole: https://community.folivora.ai/t/disconnect-from-wifi-button