diff --git a/.local/bin/polybar_scripts/bluetooth b/.local/bin/polybar_scripts/bluetooth new file mode 100755 index 00000000..2b12a462 --- /dev/null +++ b/.local/bin/polybar_scripts/bluetooth @@ -0,0 +1,13 @@ +#!/usr/bin/env sh + +if [ $(bluetoothctl show | grep "Powered: yes" | wc -c) -eq 0 ] +then + echo "%{F#66ffffff}" +else + if [ $(echo info | bluetoothctl | grep 'Device' | wc -c) -eq 0 ] + then + echo "" + fi + echo "%{F#2193ff}" +fi + diff --git a/.local/bin/polybar_scripts/toggle_bluetooth b/.local/bin/polybar_scripts/toggle_bluetooth new file mode 100755 index 00000000..02bacb0b --- /dev/null +++ b/.local/bin/polybar_scripts/toggle_bluetooth @@ -0,0 +1,8 @@ +#!/usr/bin/env sh + +if [ $(bluetoothctl show | grep "Powered: yes" | wc -c) -eq 0 ] +then + bluetoothctl power on +else + bluetoothctl power off +fi