From ae37615369460e6131f73006b22e86f6a8bd90dc Mon Sep 17 00:00:00 2001 From: Saumit Dinesan <79687674+justsaumit@users.noreply.github.com> Date: Sun, 6 Feb 2022 06:30:13 +0530 Subject: Update bts --- scripts/bts | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) (limited to 'scripts') 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 -- cgit v1.2.3