From 7a902309c4b095a14ac96c74b4e3b283414f0c3c Mon Sep 17 00:00:00 2001 From: tdpeuter Date: Fri, 29 Apr 2022 13:47:52 +0200 Subject: [PATCH] Fixed volume not working --- scripts/notify.sh | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/scripts/notify.sh b/scripts/notify.sh index 382619b..9a315be 100755 --- a/scripts/notify.sh +++ b/scripts/notify.sh @@ -13,10 +13,10 @@ while getopts ":bvm:" options; do title="Brightness: ${value}" ;; v) - status=$(amixer get Master | grep "^ Front Left" | cut -d ' ' -f 8) - if [[ $status == "[on]" ]] ; then - value=$(amixer get Master | grep -o "[0-9]*%" | head -n 1) - fi + value=$(pactl get-sink-volume 0 | cut -d '/' -f2 | grep -o '[0-9]*%') + # if [[ $status == "[on]" ]] ; then + # value=$(amixer get Master | grep -o "[0-9]*%" | head -n 1) + # fi title="Volume: ${value:-'0%'}" ;; m) @@ -31,7 +31,8 @@ done shift $((OPTIND - 1)) notify-send "${title:-${message}}" "${message}" \ + -t 2000 \ + -c byMe \ -h int:value:"$(grep -o "[0-9]*" <<< "${value}")" \ -h string:x-canonical-private-synchronous:byMe # Replace if not yet gone - #-h geometry = "400x200-40-40" \