fix toggle mute

This commit is contained in:
davidovski 2023-12-12 23:10:12 +00:00
parent 6ed4306119
commit 7b3aa701e2
3 changed files with 1003 additions and 7 deletions

View File

@ -40,14 +40,14 @@ modules-right = time
[bar/ws] [bar/ws]
inherit = bar/base inherit = bar/base
width = 1870 width = 2510
offset-x = 25 offset-x = 25
offset-y = 10 offset-y = 10
modules-left = workspaces xwindow modules-left = workspaces xwindow
modules-right = mpd temperature memory network battery pulseaudio microphone time modules-right = mpd temperature memory network battery pulseaudio microphone time
tray-position = right tray-position = right
background = ${color.bga} background = ${color.bga}
border-size = 2 border-size = 0
border-color = ${color.fg3} border-color = ${color.fg3}
fg = ${color.fg1} fg = ${color.fg1}
@ -138,9 +138,9 @@ label-muted = "%{T3} %{T-}--%"
[module/microphone] [module/microphone]
type = custom/script type = custom/script
exec = pactl list sources | grep -qi 'Mute: yes' && echo "" || echo "" exec = amixer get Capture | tail -2 | grep -q off && && echo "" || echo ""
interval = 1 interval = 1
click-left = $HOME/.scripts/toggle-mic.sh click-left = $HOME/.scripts/toggle-mute.sh
[module/vpn] [module/vpn]
type = custom/script type = custom/script

View File

@ -1,4 +1,2 @@
#!/bin/sh #!/bin/sh
# amixer set Capture toggle
pactl list sources | grep -qi 'Mute: yes' && pactl set-source-mute 0 false || pactl set-source-mute 0 true

File diff suppressed because it is too large Load Diff