mirror of
https://github.com/tiyn/dotfiles.git
synced 2025-03-25 20:47:45 +01:00
statusbar: removed volume number for color
This commit is contained in:
parent
50451fe26e
commit
62c161c3c1
@ -2,10 +2,12 @@
|
||||
|
||||
vol="$(wpctl get-volume @DEFAULT_AUDIO_SINK@ | awk '{print $2}' | sed -e 's/\.//g' | sed 's/^0*//')"
|
||||
|
||||
if [ "$vol" -eq "0" ]; then
|
||||
vol_info="^c#dfdfdf^ "
|
||||
if [ "$vol" -gt "100" ]; then
|
||||
vol_info="^c#ffff00^ "
|
||||
elif [ "$vol" -gt "70" ]; then
|
||||
vol_info="^c#dfdfdf^ "
|
||||
elif [ "$vol" -eq "0" ]; then
|
||||
vol_info="^c#dfdfdf^ "
|
||||
else
|
||||
vol_info="^c#dfdfdf^ "
|
||||
fi
|
||||
@ -19,4 +21,4 @@ else
|
||||
fi
|
||||
|
||||
vol=$(printf %3s $vol | tr ' ' ' ')
|
||||
printf "^b#282828^%s%s^d^ %s" "$mic" "$vol_info" "$vol%"
|
||||
printf "^b#282828^%s%s^d^" "$mic" "$vol_info"
|
||||
|
Loading…
x
Reference in New Issue
Block a user