dots/polybar/scripts/toggle_bluetooth.sh

11 lines
152 B
Bash
Executable file

#!/bin/sh
value=$(bluetoothctl show | grep "Powered: yes" | wc -c)
if [ "$value" == 0 ]
then
bluetoothctl power on
else
bluetoothctl power off
fi