2021-01-18 15:22:42 +01:00

24 lines
381 B
Bash
Executable File

#!/bin/sh
[ "$(amixer sget Master | awk 'NR==5 { print $6 }')" = "[off]" ] && {
echo " mut" && exit 1
}
level=$(amixer sget Master | awk -F"[][]" '/dB/ { print $2 }')
revel="${level%?}"
v1=""
v2=""
v3=""
if [ "$revel" -lt 35 ]; then
printf "$v1 "
elif [ "$revel" -lt 60 ]; then
printf "$v2 "
elif [ "$revel" -lt 100 ]; then
printf "$v3 "
fi
echo "$level"