rebased to pactl

main
The_miro 2024-11-28 16:48:51 +01:00
parent c7bf44f49c
commit b01159db4b
1 changed files with 3 additions and 10 deletions

View File

@ -1,12 +1,5 @@
#!/bin/sh
if command -v pamixer &>/dev/null; then
if [ true == $(pamixer --get-mute) ]; then
echo 0
exit
else
pamixer --get-volume
fi
else
amixer -D pulse sget Master | awk -F '[^0-9]+' '/Left:/{print $3}'
fi
perc=$(pactl get-sink-volume @DEFAULT_SINK@ | awk -F/ '{print $2}' | xargs)
num=$(echo ${perc::-1})
echo $num