diff options
author | self <george@gabbott.dev> | 2022-07-21 23:02:27 +0100 |
---|---|---|
committer | self <george@gabbott.dev> | 2022-07-21 23:02:27 +0100 |
commit | 21fca1f416203bb7387d8c5688c092202970d682 (patch) | |
tree | a70b3c87ef335fab5242f2b36ea8aca40cceaeb4 | |
parent | 7939d82a450c11f595ecb66c84712826c3855911 (diff) |
change audio
-rwxr-xr-x | scripts/change-audio | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/scripts/change-audio b/scripts/change-audio index 229c47f..2dafe73 100755 --- a/scripts/change-audio +++ b/scripts/change-audio @@ -6,11 +6,11 @@ msgTag="myvolume" # Change the volume using alsa(might differ if you use pulseaudio) -amixer -c 0 set Master "$@" > /dev/null +amixer -M -c 0 set Master "$@" > /dev/null # Query amixer for the current volume and whether or not the speaker is muted -volume="$(amixer -c 0 get Master | tail -1 | awk '{print $4}' | sed 's/[^0-9]*//g')" -mute="$(amixer -c 0 get Master | tail -1 | awk '{print $6}' | sed 's/[^a-z]*//g')" +volume="$(amixer -M -c 0 get Master | tail -1 | awk '{print $4}' | sed 's/[^0-9]*//g')" +mute="$(amixer -M -c 0 get Master | tail -1 | awk '{print $6}' | sed 's/[^a-z]*//g')" if [[ $volume == 0 || "$mute" == "off" ]]; then # Show the sound muted notification dunstify -a "changeVolume" -u low -i audio-volume-muted -h string:x-dunst-stack-tag:$msgTag "Volume muted" |