From 21fca1f416203bb7387d8c5688c092202970d682 Mon Sep 17 00:00:00 2001 From: self Date: Thu, 21 Jul 2022 23:02:27 +0100 Subject: change audio --- scripts/change-audio | 6 +++--- 1 file 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" -- cgit v1.2.1