Add mic-mute.sh for toggling microphone on/off
This commit is contained in:
parent
0bf9521a3c
commit
d8d1f022c0
3 changed files with 24 additions and 0 deletions
6
debian/changelog
vendored
6
debian/changelog
vendored
|
@ -1,3 +1,9 @@
|
||||||
|
tileos-settings-river (1.2.0~tileos) unstable; urgency=medium
|
||||||
|
|
||||||
|
* Add mic-mute.sh script for toggling microphone on/off
|
||||||
|
|
||||||
|
-- Aleksey Samoilov <samoilov.lex@gmail.com> Sat, 19 Oct 2024 23:41:50 +0400
|
||||||
|
|
||||||
tileos-settings-river (1.1.5~tileos) unstable; urgency=medium
|
tileos-settings-river (1.1.5~tileos) unstable; urgency=medium
|
||||||
|
|
||||||
* Updates from Sway edition
|
* Updates from Sway edition
|
||||||
|
|
|
@ -12,6 +12,9 @@ launcher="eval rofi -show combi -combi-modi 'drun,run' -terminal $term -ssh-comm
|
||||||
# Volume changing notify
|
# Volume changing notify
|
||||||
volume_bar="/usr/share/river/scripts/volume-notify.sh"
|
volume_bar="/usr/share/river/scripts/volume-notify.sh"
|
||||||
|
|
||||||
|
# Mic volume mute
|
||||||
|
mic_mute="/usr/share/river/scripts/mic-mute.sh"
|
||||||
|
|
||||||
# Brightness changing notify
|
# Brightness changing notify
|
||||||
brightness_bar="/usr/share/river/scripts/brightness-notify.sh"
|
brightness_bar="/usr/share/river/scripts/brightness-notify.sh"
|
||||||
|
|
||||||
|
@ -153,6 +156,7 @@ do
|
||||||
riverctl map $mode None XF86AudioRaiseVolume spawn "pulsemixer --change-volume +5 && $volume_bar"
|
riverctl map $mode None XF86AudioRaiseVolume spawn "pulsemixer --change-volume +5 && $volume_bar"
|
||||||
riverctl map $mode None XF86AudioLowerVolume spawn "pulsemixer --change-volume -5 && $volume_bar"
|
riverctl map $mode None XF86AudioLowerVolume spawn "pulsemixer --change-volume -5 && $volume_bar"
|
||||||
riverctl map $mode None XF86AudioMute spawn "pulsemixer --toggle-mute && $volume_bar"
|
riverctl map $mode None XF86AudioMute spawn "pulsemixer --toggle-mute && $volume_bar"
|
||||||
|
riverctl map $mode None XF86AudioMicMute spawn "$mic_mute"
|
||||||
|
|
||||||
# Control MPRIS aware media players with playerctl (https://github.com/altdesktop/playerctl)
|
# Control MPRIS aware media players with playerctl (https://github.com/altdesktop/playerctl)
|
||||||
riverctl map $mode None XF86AudioMedia spawn 'playerctl play-pause'
|
riverctl map $mode None XF86AudioMedia spawn 'playerctl play-pause'
|
||||||
|
|
14
usr/share/river/scripts/mic-mute.sh
Executable file
14
usr/share/river/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 river \
|
||||||
|
--expire-time 800 \
|
||||||
|
"Microphone is $STATE"
|
Loading…
Add table
Reference in a new issue