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.

23 lines
444 B

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