mirror of https://github.com/tiyn/dotfiles
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
23 lines
594 B
23 lines
594 B
5 years ago
|
#!/bin/sh
|
||
|
|
||
1 year ago
|
vol="$(wpctl get-volume @DEFAULT_AUDIO_SINK@ | awk '{print $2}' | sed -e 's/\.//g' | sed 's/^0*//')"
|
||
5 years ago
|
|
||
1 year ago
|
if [ "$vol" -eq "0" ]; then
|
||
1 year ago
|
vol_info="^c#dfdfdf^ ^d^"
|
||
1 year ago
|
elif [ "$vol" -gt "70" ]; then
|
||
1 year ago
|
vol_info="^c#dfdfdf^ ^d^"
|
||
5 years ago
|
else
|
||
1 year ago
|
vol_info="^c#dfdfdf^ ^d^"
|
||
5 years ago
|
fi
|
||
|
|
||
1 year ago
|
$(wpctl get-volume @DEFAULT_AUDIO_SINK@ | grep -q '\[MUTED\]') && vol_info="^c#ff0000^ ^d^"
|
||
1 year ago
|
|
||
1 year ago
|
if wpctl get-volume @DEFAULT_SOURCE@ | grep -q '\[MUTED\]'; then
|
||
1 year ago
|
mic="^b#282828^^c#ff0000^ "
|
||
1 year ago
|
else
|
||
|
mic="^b#282828^^c#dfdfdf^ "
|
||
1 year ago
|
fi
|
||
|
|
||
1 year ago
|
vol=$(printf %3s $vol | tr ' ' ' ')
|
||
|
printf "%s %s %s %s\\n" "$mic" "$vol_info" "$vol%"
|