1
0
Fork 0
dotfiles/files/.config/polybar/bluetooth.bash

17 lines
350 B
Bash
Raw Normal View History

2018-03-10 04:04:29 +00:00
#!/bin/bash
2018-09-11 18:53:54 +00:00
if which rfkill >/dev/null && [[ -f /dev/rfkill ]]; then
if rfkill list bluetooth | grep "yes" >/dev/null; then
if [[ "$1" == "toggle" ]]; then
rfkill unblock bluetooth
fi
echo "$ICO_BLU_OFF"
else
if [[ "$1" == "toggle" ]]; then
rfkill block bluetooth
fi
echo "$ICO_BLU_ON"
fi
2018-03-10 04:04:29 +00:00
fi