From 51a9b58f3aea6ccdf28ad448c4a8e5a69014c80d Mon Sep 17 00:00:00 2001 From: Saumit Dinesan Date: Mon, 11 Dec 2023 20:22:34 +0530 Subject: .scripts: bts - replacing notify-send for dunstify --- .scripts/bts | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to '.scripts') diff --git a/.scripts/bts b/.scripts/bts index a33b04a..9722fce 100755 --- a/.scripts/bts +++ b/.scripts/bts @@ -13,21 +13,21 @@ case $option in "active") bluetoothctl power on && bluetoothctl connect $MAC && sleep 2 && [ $(bluetoothctl info $MAC | grep "Connected" | awk -F'[:][ ]' '/^[^#]/{print $2}') == "yes" ] && - notify-send "Connected" "Bluetooth Device is connected" || - notify-send "Unable to connect!" "Check whether the bluetooth device is switched on.";; + dunstify "Connected" "Bluetooth Device is connected" -i bluetooth || + dunstify "Unable to connect!" "Check whether the bluetooth device is switched on." -i bluetoothb ;; "inactive" | "failed") sudo -A systemctl start bluetooth notify-send "Bluetooth daemon is running" bluetoothctl power on bluetoothctl connect $MAC && sleep 1 && [ $(bluetoothctl info $MAC | grep "Connected" | awk -F'[:][ ]' '/^[^#]/{print $2}') == "yes" ] && - notify-send "Connected" "Bluetooth Device is connected" || - notify-send "Unable to connect!" "Check whether the bluetooth device is switched on.";; + dunstify "Connected" "Bluetooth Device is connected" -i bluetooth || + dunstify "Unable to connect!" "Check whether the bluetooth device is switched on." -i bluetoothb ;; esac;; "Disconnect") bluetoothctl power off && sudo -A systemctl stop bluetooth - notify-send "Disconnected" "Bluetooth Device is disconnected" || - notify-send "Unable to disconnect!" ;; + dunstify "Disconnected" "Bluetooth Device is disconnected" || + dunstify "Unable to disconnect!" ;; "Change profile") past_profile=$(pactl list | grep "Active Profile" | sed '2p;d' | cut -d ' ' -f 3) profile=$(echo -e "a2dp_sink(pure audio output)\nhandsfree_head_unit(inferior audio output + mic enable)" | tofi --prompt-text "Choose the profile for your sound card") -- cgit v1.2.3