Add support for turning the microphone on/off
This commit is contained in:
parent
307f026e9d
commit
ac0926cf32
3 changed files with 16 additions and 0 deletions
|
@ -32,6 +32,7 @@ $bindsym $mod+Shift+e exec nwg-bar -x
|
||||||
$bindsym --locked XF86AudioRaiseVolume exec $volume_up
|
$bindsym --locked XF86AudioRaiseVolume exec $volume_up
|
||||||
$bindsym --locked XF86AudioLowerVolume exec $volume_down
|
$bindsym --locked XF86AudioLowerVolume exec $volume_down
|
||||||
$bindsym --locked XF86AudioMute exec $volume_mute
|
$bindsym --locked XF86AudioMute exec $volume_mute
|
||||||
|
$bindsym --locked XF86AudioMicMute exec $mic_mute
|
||||||
$bindsym --locked XF86AudioPlay exec playerctl play-pause
|
$bindsym --locked XF86AudioPlay exec playerctl play-pause
|
||||||
$bindsym --locked XF86AudioNext exec playerctl next
|
$bindsym --locked XF86AudioNext exec playerctl next
|
||||||
$bindsym --locked XF86AudioPrev exec playerctl previous
|
$bindsym --locked XF86AudioPrev exec playerctl previous
|
||||||
|
|
|
@ -44,6 +44,7 @@ set $brightness_down light -r -U $($brightness_step) && $brightness_bar
|
||||||
set $volume_down pulsemixer --change-volume -5 && $volume_bar
|
set $volume_down pulsemixer --change-volume -5 && $volume_bar
|
||||||
set $volume_up pulsemixer --change-volume +5 && $volume_bar
|
set $volume_up pulsemixer --change-volume +5 && $volume_bar
|
||||||
set $volume_mute pulsemixer --toggle-mute && $volume_bar
|
set $volume_mute pulsemixer --toggle-mute && $volume_bar
|
||||||
|
set $mic_mute /usr/share/sway/scripts/mic-mute.sh
|
||||||
|
|
||||||
# Clipboard history
|
# Clipboard history
|
||||||
set $clipboard cliphist list | rofi -dmenu -font "$gui-font" -p "Select item to copy:" -lines 10 -width 35 | cliphist decode | wl-copy
|
set $clipboard cliphist list | rofi -dmenu -font "$gui-font" -p "Select item to copy:" -lines 10 -width 35 | cliphist decode | wl-copy
|
||||||
|
|
14
usr/share/sway/scripts/mic-mute.sh
Executable file
14
usr/share/sway/scripts/mic-mute.sh
Executable file
|
@ -0,0 +1,14 @@
|
||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
set -e
|
||||||
|
|
||||||
|
MIC="${1:-'Capture'}"
|
||||||
|
|
||||||
|
amixer sset "$MIC" toggle
|
||||||
|
|
||||||
|
STATE="$(amixer sget "$MIC",0 | sed -E -e '0,/^.*\[(on|off)\].*$/d' -e 's/^.*\[(\w+)\].*$/\1/')"
|
||||||
|
|
||||||
|
test -n "$STATE" && notify-send \
|
||||||
|
--app-name sway \
|
||||||
|
--expire-time 800 \
|
||||||
|
"Microphone is $STATE"
|
Loading…
Add table
Reference in a new issue