1 #!/bin/sh 2 3 # amount=$(echo "$1" | cut -d " " -f 2) 4 # amount=$2 5 6 # send_notification() { 7 # dunstify -r 13123 "$2 Volume $1%" -t 1750 8 # } 9 # 10 # get_icon() { 11 # if [ "$mute" == "true" ] | [ "$curr" -eq "0" ]; then 12 # icon="🔇" 13 # break; 14 # elif [ "$curr" -gt "50" ]; then 15 # icon="🔊" 16 # elif [ "$curr" -lt "25" ]; then 17 # icon="🔈" 18 # else 19 # icon="🔉" 20 # fi 21 # } 22 23 pamixer $1 $2 && kill -35 $(pidof dwmblocks) 24 # sleep 1 25 # pamixer $1 $2 && pkill -RTMIN+1 dwmblocks 26 27 # curr=$(pamixer --get-volume) 28 # mute=$(pamixer --get-mute) 29 30 # get_icon 31 # send_notification $curr $icon
