change volume script

This commit is contained in:
Sakooooo 2023-07-25 16:04:16 +03:00
parent 9c0a9e39cc
commit 615f2cb5ac
Signed by: sako
GPG key ID: 3FD715D87D7725E0
2 changed files with 10 additions and 6 deletions

View file

@ -0,0 +1,10 @@
#!/bin/sh
vol=$(pamixer --get-volume)
mute=$(pamixer --get-mute)
if [ $mute = 'true' ]; then
echo MUTED
else
echo Vol: $vol%
fi

View file

@ -1,6 +0,0 @@
#!/bin/sh
# Get the maximum volume of any pulseaudio sink channel
# amixer get Master | egrep -o "[0-9]+%"
vol=$(amixer get Master | awk -F'[]%[]' '/%/ {if ($7 == "off") { print "MM" } else { print $2 }}' | head -n 1)
echo Vol: $vol%