summaryrefslogtreecommitdiff
path: root/.scripts/bts
diff options
context:
space:
mode:
authorSaumit Dinesan <justsaumit@protonmail.com>2023-12-11 20:22:34 +0530
committerSaumit Dinesan <justsaumit@protonmail.com>2023-12-11 20:22:34 +0530
commit51a9b58f3aea6ccdf28ad448c4a8e5a69014c80d (patch)
tree3602cee680d764f7ecc800b5a48398b66dd9963e /.scripts/bts
parente6f082b05c4b5c3205d7fc682b932a5a8136bedd (diff)
.scripts: bts - replacing notify-send for dunstify
Diffstat (limited to '.scripts/bts')
-rwxr-xr-x.scripts/bts12
1 files changed, 6 insertions, 6 deletions
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")