Files
colorshell/swaync/scripts/control-center/bluetooth-toggle.sh
T

20 lines
342 B
Bash
Executable File

#!/usr/bin/env bash
Update_state() {
if [[ $(bluetoothctl show | grep "Powered" | sed "s/Powered: //" | xargs) == "yes" ]]
then
echo true
else
echo false
fi
}
Toggle_state() {
if [[ $SWAYNC_TOGGLE_STATE == "true" ]]
then
bluetoothctl power on
else
bluetoothctl power off
fi
}