1
0
mirror of https://github.com/tiyn/dotfiles.git synced 2025-10-09 19:11:15 +02:00

scripts: cleaned up scripts and refined volume script

This commit is contained in:
2023-10-13 23:24:38 +02:00
parent b14a6f31cb
commit a51b50849f
5 changed files with 15 additions and 31 deletions

View File

@@ -1,15 +1,21 @@
#!/bin/sh
[ "$(pulsemixer --get-mute)" = "1" ] && printf "\\n" && exit
vol=$(pulsemixer --get-volume | awk '{print $1}')
if [ "$vol" -gt "70" ]; then
icon=""
elif [ "$vol" -lt "30" ]; then
icon=""
if [ "$vol" -eq "0" ]; then
icon=""
elif [ "$vol" -gt "70" ]; then
icon=""
else
icon=""
fi
printf "%s %s\\n" "$vol" "$icon"
[ "$(pulsemixer --get-mute)" = "1" ] && icon="" && vol="M"
if amixer get Capture | tail -2 | grep -q '\[on\]'; then
mic=""
else
mic=""
fi
printf "%s %s %s\\n" "$vol" "$icon" "$mic"