#!/bin/bash status=$(systemctl status bluetooth | grep Active | cut -d " " -f 7) case $status in "active") bluetoothctl power on bluetoothctl connect A1:B3:EC:B1:53:60 notify-send "Bluetooth Device is connected";; "inactive" | "failed") 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 notify-send "Bluetooth Device is connected";; esac