From 2316cb2d9c44a929961198d0fb2b92e4a69f4585 Mon Sep 17 00:00:00 2001 From: Tibo De Peuter Date: Tue, 3 Dec 2024 10:58:47 +0100 Subject: [PATCH] fix(notify): Switch to Pipewire --- scripts/notify.sh | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/scripts/notify.sh b/scripts/notify.sh index a9453d5..698993e 100755 --- a/scripts/notify.sh +++ b/scripts/notify.sh @@ -22,15 +22,15 @@ while getopts ":bvt:p:" options; do ;; v) # Get volume (don't use pamixer because that is way slower) - value=$( amixer sget 'Master' \ - | grep -o '\[[0-9]*%\]' \ - | tr -d '][%' \ - | head -n1 ) + value=$( pactl get-sink-volume @DEFAULT_SINK@ \ + | grep -o '[0-9]*%' \ + | tr -d '%' \ + | head -n1 ) title="Volume: ${value}%" category='sysinfo' # If audio disabled, set value to zero. - if [ "$( amixer sget 'Master' | grep -o '\[\(on\|off\)\]' | head -n1 )" == "[off]" ] ; then + if [ "$( pactl get-sink-mute @DEFAULT_SINK@ | grep -o '\(yes\|no\)' | head -n1 )" == 'yes' ] ; then title="Volume: ${value}% (Disabled)" value=0 fi