Fixed volume not working

This commit is contained in:
Tibo De Peuter 2022-04-29 13:47:52 +02:00
parent a7e75fb24d
commit 7a902309c4

View file

@ -13,10 +13,10 @@ while getopts ":bvm:" options; do
title="Brightness: ${value}" title="Brightness: ${value}"
;; ;;
v) v)
status=$(amixer get Master | grep "^ Front Left" | cut -d ' ' -f 8) value=$(pactl get-sink-volume 0 | cut -d '/' -f2 | grep -o '[0-9]*%')
if [[ $status == "[on]" ]] ; then # if [[ $status == "[on]" ]] ; then
value=$(amixer get Master | grep -o "[0-9]*%" | head -n 1) # value=$(amixer get Master | grep -o "[0-9]*%" | head -n 1)
fi # fi
title="Volume: ${value:-'0%'}" title="Volume: ${value:-'0%'}"
;; ;;
m) m)
@ -31,7 +31,8 @@ done
shift $((OPTIND - 1)) shift $((OPTIND - 1))
notify-send "${title:-${message}}" "${message}" \ notify-send "${title:-${message}}" "${message}" \
-t 2000 \
-c byMe \
-h int:value:"$(grep -o "[0-9]*" <<< "${value}")" \ -h int:value:"$(grep -o "[0-9]*" <<< "${value}")" \
-h string:x-canonical-private-synchronous:byMe # Replace if not yet gone -h string:x-canonical-private-synchronous:byMe # Replace if not yet gone
#-h geometry = "400x200-40-40" \