Better mic indicator in bar

This commit is contained in:
Daniel Flanagan 2020-01-28 11:35:39 -06:00
parent 4624d539dc
commit 959db1b24f
Signed by: lytedev
GPG Key ID: 5B2020A0F9921EF4
2 changed files with 5 additions and 4 deletions

View File

@ -58,7 +58,7 @@ border-size = 0
border-color = #00000000
padding-left = 0
padding-right = 2
padding-right = 0
module-margin-left = 1
module-margin-right = 1
@ -390,6 +390,7 @@ type = custom/script
exec = $DOTFILES_PATH/apps/de/polybar/mic.sh
tail = true
format = <label>
label-foreground = ${colors.icon}
label-foreground = ${colors.background}
label = %output%
click-left = kill -USR1 %pid%
format-margin = 0

View File

@ -14,10 +14,10 @@ cleanup() {
print_status() {
if amixer get Capture | grep -q '\[off\]'; then
# red means recording
echo "%{F$(xrdb -query | grep -Po 'color4:.*#\K\w[0-9a-f]+')}"
echo "%{B$(xrdb -query | grep -Po 'color4:.*#\K\w[0-9a-f]+')} "
else
# blue means nobody can hear you scream
echo "%{F$(xrdb -query | grep -Po 'color1:.*#\K\w[0-9a-f]+')}"
echo "%{B$(xrdb -query | grep -Po 'color1:.*#\K\w[0-9a-f]+')} "
fi
}