Another copy of my dotfiles. Because I don't completely trust GitHub.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

20 lines
423 B

#!/bin/sh
power=$(timeout 1 bluetoothctl show | grep "Powered: yes" | wc -w)
if [ "$power" -eq 0 ]; then
echo "^c#81a1c1^^d^" # Add color
else
device="$(echo info | bluetoothctl | grep 'Name')"
if [ ! "$device" = "" ]; then
echo "^c#81a1c1^^d^ $(echo "$device" | head -n 1 | xargs | cut -c 7-)"
else
echo "^c#81a1c1^^d^"
fi
fi
case $BLOCK_BUTTON in
1) ~/.local/bin/dmenu-bluetooth;;
esac