Changes in blocks.

This commit is contained in:
Bartek Stalewski 2021-07-21 15:18:10 +02:00
parent 8c660ea2d0
commit a82c8cd2e8
3 changed files with 7 additions and 5 deletions

View file

@ -1,5 +1,8 @@
#!/bin/sh
[ $(pamixer --get-mute) = true ] && echo "^c#161616^^b#fd4285^mute^d^" && exit
vol="$(pamixer --get-volume)"
[ $(echo $vol | wc -c) -lt 4 ] && echo " ${vol}%" || echo "${vol}%"
device=$(pamixer --list-sources | awk '/Raven/ {print $1}')
[ $(echo $vol | wc -c) -lt 4 ] && svol=" ${vol}%" || svol="${vol}%"
[ $(pamixer --get-mute) = true ] && icon="🔇" || icon="🔊"
[ $(pamixer --source $device --get-mute) = true ] && micon="🔇" || micon="🎙️"
echo "${icon} ${svol} (mic ${micon})"