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

**URL:** <https://community.folivora.ai/t/bluetooth-and-wifi-toggle-possible-colour-change-to-reflect-on-off-status/2131>\
**Category:** Feature Requests\
**Tags:** touch-bar\
**Created:** [July 4, 2018, 12:50pm UTC](https://community.folivora.ai/t/bluetooth-and-wifi-toggle-possible-colour-change-to-reflect-on-off-status/2131 "2018-07-04T12:50:26Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![Mr-Misfit](https://community.folivora.ai/letter_avatar_proxy/v4/letter/m/f6c823/32.png) [@Mr-Misfit](https://community.folivora.ai/u/Mr-Misfit)\
**Post date:** [July 4, 2018, 12:50pm UTC](https://community.folivora.ai/t/bluetooth-and-wifi-toggle-possible-colour-change-to-reflect-on-off-status/2131/1 "2018-07-04T12:50:26Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![Worie](https://community.folivora.ai/user_avatar/community.folivora.ai/worie/32/35_2.png) [@Worie](https://community.folivora.ai/u/Worie)\
**Post date:** [July 4, 2018, 1:07pm UTC](https://community.folivora.ai/t/bluetooth-and-wifi-toggle-possible-colour-change-to-reflect-on-off-status/2131/2 "2018-07-04T13:07:48Z")

</div>

Hi! I was able to do bluetooth switch somehow a little while ago, but not WIFI 🙂 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 😕

---

<div class="post-metadata">

**Author:** ![Mr-Misfit](https://community.folivora.ai/letter_avatar_proxy/v4/letter/m/f6c823/32.png) [@Mr-Misfit](https://community.folivora.ai/u/Mr-Misfit)\
**Post date:** [July 4, 2018, 6:06pm UTC](https://community.folivora.ai/t/bluetooth-and-wifi-toggle-possible-colour-change-to-reflect-on-off-status/2131/3 "2018-07-04T18:06:54Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![Mr-Misfit](https://community.folivora.ai/letter_avatar_proxy/v4/letter/m/f6c823/32.png) [@Mr-Misfit](https://community.folivora.ai/u/Mr-Misfit)\
**Post date:** [July 4, 2018, 6:09pm UTC](https://community.folivora.ai/t/bluetooth-and-wifi-toggle-possible-colour-change-to-reflect-on-off-status/2131/4 "2018-07-04T18:09:52Z")

</div>

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

Thanks

---

<div class="post-metadata">

**Author:** ![Mr-Misfit](https://community.folivora.ai/letter_avatar_proxy/v4/letter/m/f6c823/32.png) [@Mr-Misfit](https://community.folivora.ai/u/Mr-Misfit)\
**Post date:** [July 4, 2018, 6:46pm UTC](https://community.folivora.ai/t/bluetooth-and-wifi-toggle-possible-colour-change-to-reflect-on-off-status/2131/5 "2018-07-04T18:46:03Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![SiMcCaffrey](https://community.folivora.ai/user_avatar/community.folivora.ai/simccaffrey/32/20635_2.png) [@SiMcCaffrey](https://community.folivora.ai/u/SiMcCaffrey)\
**Post date:** [April 14, 2023, 12:33pm UTC](https://community.folivora.ai/t/bluetooth-and-wifi-toggle-possible-colour-change-to-reflect-on-off-status/2131/6 "2023-04-14T12:33:47Z")

</div>

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