toggle_bluetooth.sh 188 B

12345678
  1. #!/bin/bash
  2. # ~/.config/polybar/scripts/toggle_bluetooth.sh
  3. if [ $(bluetoothctl show | grep "Powered: yes" | wc -c) -eq 0 ]; then
  4. bluetoothctl power on
  5. else
  6. bluetoothctl power off
  7. fi