summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorSaumit Dinesan <79687674+justsaumit@users.noreply.github.com>2022-02-06 06:30:13 +0530
committerGitHub <noreply@github.com>2022-02-06 06:30:13 +0530
commitae37615369460e6131f73006b22e86f6a8bd90dc (patch)
treeedb4c14706bc77bb7cfe8dc61bfc32dbc776f501 /scripts
parent8794cd15d34cf88ad3691718c18b5653ce14bd89 (diff)
Update bts
Diffstat (limited to 'scripts')
-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