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

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