add some fixes for double digit notis

This commit is contained in:
2026-03-07 20:54:48 -07:00
parent 6556a2c07e
commit 19d6c7e071

View File

@@ -9,9 +9,9 @@ readonly CHECK_MUTE_CMD="pactl get-sink-mute @DEFAULT_SINK@"
ACTION="$1" ACTION="$1"
check_if_active_notification () { check_if_active_notification () {
if makoctl list | grep -q -E 'Notification.*Volume:' if makoctl list | grep -q -E 'Notification[[:space:]].*Volume'
then 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 fi
} }
@@ -41,9 +41,9 @@ send_notification () {
current_volume=$(get_current_volume) current_volume=$(get_current_volume)
active_notification=$(check_if_active_notification) active_notification=$(check_if_active_notification)
if [ -z "$active_notification" ]; then if [ -z "$active_notification" ]; then
notify-send -t 2000 "Volume: ${current_volume}" notify-send -t 2000 "Volume" "${current_volume}"
else else
notify-send -r ${active_notification} -t 2000 "Volume: ${current_volume}" notify-send -r ${active_notification} -t 2000 "Volume" "${current_volume}"
fi fi
} }