add i3bar indicator for microphone status
This commit is contained in:
parent
0a9ca8b889
commit
0599466e2c
3 changed files with 17 additions and 1 deletions
|
@ -132,7 +132,7 @@ bindsym $mod+Next exec pactl set-sink-volume @DEFAULT_SINK@ -2%; exec pactl set-
|
|||
bindsym XF86AudioRaiseVolume exec pactl set-sink-volume @DEFAULT_SINK@ +2%; exec pactl set-sink-mute @DEFAULT_SINK@ 0
|
||||
bindsym XF86AudioLowerVolume exec pactl set-sink-volume @DEFAULT_SINK@ -2%; exec pactl set-sink-mute @DEFAULT_SINK@ 0
|
||||
bindsym XF86AudioMute exec pactl set-sink-mute @DEFAULT_SINK@ toggle
|
||||
bindsym XF86AudioMicMute exec pactl set-source-mute alsa_input.pci-0000_00_1f.3.analog-stereo toggle
|
||||
bindsym XF86AudioMicMute exec pactl set-source-mute alsa_input.pci-0000_07_00.6.HiFi__hw_acp__source toggle
|
||||
|
||||
bindsym XF86MonBrightnessUp exec sudo light -A 5
|
||||
bindsym XF86MonBrightnessDown exec sudo light -U 5
|
||||
|
|
|
@ -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}%",
|
||||
|
|
10
.config/i3pystatus/microphone-status.sh
Executable file
10
.config/i3pystatus/microphone-status.sh
Executable 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
|
Loading…
Reference in a new issue