/ scripts / togglemute.sh
togglemute.sh
 1  volume=$(wpctl get-volume @DEFAULT_AUDIO_SINK@ | cut -d ' ' -f 2)
 2  if [[ $volume == "0.00" ]]; then
 3    if ! [ -n "$listeningvolume" ]; then
 4      export listeningvolume=0.1
 5    fi
 6    wpctl set-volume @DEFAULT_AUDIO_SINK@ ${listeningvolume}
 7  else
 8    export listeningvolume=$(wpctl get-volume @DEFAULT_AUDIO_SINK@ | cut -d ' ' -f 2)
 9    wpctl set-volume @DEFAULT_AUDIO_SINK@ 0.00
10  fi
11  echo $listeningvolume >~/vol