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

17 lines
351 B
Bash
Executable File

#!/bin/bash
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
fi