summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--scripts/bts10
1 files changed, 7 insertions, 3 deletions
diff --git a/scripts/bts b/scripts/bts
index 87da5d4..3ee0ec5 100644
--- a/scripts/bts
+++ b/scripts/bts
@@ -1,10 +1,14 @@
+#!/bin/bash
status=$(systemctl status bluetooth | grep Active | cut -d " " -f 7)
case $status in
- "active")
+ "active")
bluetoothctl power on
bluetoothctl connect A1:B3:EC:B1:53:60 ;;
"inactive" | "failed")
- st -e sudo systemctl start bluetooth
+ SUDO_ASKPASS=.scripts/dpass sudo -A $(sudo systemctl start bluetooth|dmenu)
+ #st -e sudo systemctl start bluetooth
+ notify-send "Bluetooth daemon is running"
bluetoothctl power on
- bluetoothctl connect A1:B3:EC:B1:53:60;;
+ bluetoothctl connect A1:B3:EC:B1:53:60
+ notify-send "Bluetooth Device is connected";;
esac