add i3bar indicator for microphone status

This commit is contained in:
Franzi 2022-02-14 20:17:20 +01:00
parent 0a9ca8b889
commit 0599466e2c
Signed by: kunsi
GPG key ID: 12E3D2136B818350
3 changed files with 17 additions and 1 deletions

View file

@ -14,6 +14,12 @@ status.register("pulseaudio",
format_muted="♪D -∞dB",
step="2",
sink="@DEFAULT_SINK@")
status.register("shell",
format="{output}",
hints = {"markup": "pango"},
command="/home/kunsi/.config/i3pystatus/microphone-status.sh",
on_rightclick="pactl set-source-mute alsa_input.pci-0000_07_00.6.HiFi__hw_acp__source toggle",
interval=1)
status.register("backlight",
format="{percentage}%",

View file

@ -0,0 +1,10 @@
#!/bin/bash
OUT="$(pactl get-source-mute alsa_input.pci-0000_07_00.6.HiFi__hw_acp__source | cut -d' ' -f2)"
if [ "$OUT" = "yes" ]
then
echo '<span color="#00FF00">M</span>'
else
echo '<span color="#FF0000">Microphone unmuted</span>'
fi