From c47c8720b345ecbfd35db66c84437a51a0902245 Mon Sep 17 00:00:00 2001 From: Philip Wittamore Date: Mon, 9 Jun 2025 10:07:40 +0200 Subject: update --- dmenu-audio | 27 +++++++++++++++++++++------ 1 file changed, 21 insertions(+), 6 deletions(-) (limited to 'dmenu-audio') diff --git a/dmenu-audio b/dmenu-audio index ccad8c1..7600422 100755 --- a/dmenu-audio +++ b/dmenu-audio @@ -1,17 +1,22 @@ #!/usr/bin/env bash -choices="Connect BT headset\nSelect Output\nSelect Input\nExit" +choices="󰂯 Connect BT headset\n󰂲 Disconnect BT headset\n Select Output\n Select Input\n󰝚 Play Music\n󰐎 Pause/Play Music\nExit" -result=$(echo -e $choices | dmenu -bw 4 -c -i -l 5 -p "Audio") +result=$(echo -e $choices | dmenu -bw 4 -c -i -l 7 -p "Audio") case $result in - "Connect BT headset") + "󰂯 Connect BT headset") headset="E8:07:BF:3C:5F:65" bluetoothctl connect $headset &> /dev/null ;; - "Select Input") + "󰂲 Disconnect BT headset") + headset="E8:07:BF:3C:5F:65" + bluetoothctl disconnect $headset &> /dev/null + ;; + + " Select Input") choices=$(pactl list short sources | cut -f2) choices="$choices Exit" @@ -24,7 +29,7 @@ case $result in ;; - "Select Output") + " Select Output") choices=$(pactl list short sinks | cut -f2) choices="$choices Exit" @@ -34,9 +39,19 @@ case $result in fi pactl set-default-sink $result notify-send -t 2000 -u normal "Audio output set to $result" - echo $result + exit 0 + ;; + + "󰝚 Play Music") + dmenu-playmusic + exit 0 ;; + "󰐎 Pause/Play Music") + playerctl play-pause + exit 0 + ;; + *) exit 0 ;; -- cgit v1.2.3