diff --git a/volume.sh b/volume.sh index bbd808c..5704b35 100755 --- a/volume.sh +++ b/volume.sh @@ -9,9 +9,9 @@ readonly CHECK_MUTE_CMD="pactl get-sink-mute @DEFAULT_SINK@" ACTION="$1" check_if_active_notification () { - if makoctl list | grep -q -E 'Notification.*Volume:' + if makoctl list | grep -q -E 'Notification[[:space:]].*Volume' then - makoctl list | grep -E 'Notification.*Volume:' | cut -f 1 -d":" | cut -f 2 -d" " + makoctl list | grep -E 'Notification[[:space:]].*Volume' | cut -f 1 -d":" | cut -f 2 -d" " fi } @@ -41,9 +41,9 @@ send_notification () { current_volume=$(get_current_volume) active_notification=$(check_if_active_notification) if [ -z "$active_notification" ]; then - notify-send -t 2000 "Volume: ${current_volume}" + notify-send -t 2000 "Volume" "${current_volume}" else - notify-send -r ${active_notification} -t 2000 "Volume: ${current_volume}" + notify-send -r ${active_notification} -t 2000 "Volume" "${current_volume}" fi }