Use pactl to control muting/unmuting for compatibility.
This commit is contained in:
parent
1ff55c976f
commit
3ed6dd158b
@ -1,6 +1,7 @@
|
|||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
amixer set Capture toggle @> /dev/null
|
|
||||||
|
|
||||||
str=$(grep '\[on\]\|\[off\]' <<< $(amixer get Capture) | awk '{print $5}')
|
pactl set-source-mute @DEFAULT_SOURCE@ toggle
|
||||||
echo $str
|
str=$(pactl get-source-mute @DEFAULT_SOURCE@| awk '{print $2}')
|
||||||
notify-send "Microphone: $str"
|
|
||||||
|
[[ "$str" == "yes" ]] && notify-send "Microphone: off"
|
||||||
|
[[ "$str" == "no" ]] && notify-send "Microphone: on"
|
||||||
|
Loading…
Reference in New Issue
Block a user