add some fixes for double digit notis
This commit is contained in:
@@ -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
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user