Support microphone toggling
Use pactl and exwm KBDs to support toggling my microphone setting from Emacs.
This commit is contained in:
parent
ba1034a9c8
commit
25ce422abd
1 changed files with 9 additions and 1 deletions
|
@ -23,6 +23,12 @@
|
||||||
(shell-command "pactl set-sink-mute @DEFAULT_SINK@ toggle")
|
(shell-command "pactl set-sink-mute @DEFAULT_SINK@ toggle")
|
||||||
(message (string/format "[pulse-audio.el] Mute toggled.")))
|
(message (string/format "[pulse-audio.el] Mute toggled.")))
|
||||||
|
|
||||||
|
(defun pulse-audio/toggle-microphone ()
|
||||||
|
"Mute the default sink."
|
||||||
|
(interactive)
|
||||||
|
(shell-command "pactl set-source-mute @DEFAULT_SOURCE@ toggle")
|
||||||
|
(message (string/format "[pulse-audio.el] Microphone toggled.")))
|
||||||
|
|
||||||
(defun pulse-audio/lower-volume ()
|
(defun pulse-audio/lower-volume ()
|
||||||
"Low the volume output of the default sink."
|
"Low the volume output of the default sink."
|
||||||
(interactive)
|
(interactive)
|
||||||
|
@ -42,7 +48,9 @@
|
||||||
(exwm-input-set-key
|
(exwm-input-set-key
|
||||||
(kbd "<XF86AudioLowerVolume>") #'pulse-audio/lower-volume)
|
(kbd "<XF86AudioLowerVolume>") #'pulse-audio/lower-volume)
|
||||||
(exwm-input-set-key
|
(exwm-input-set-key
|
||||||
(kbd "<XF86AudioRaiseVolume>") #'pulse-audio/raise-volume))
|
(kbd "<XF86AudioRaiseVolume>") #'pulse-audio/raise-volume)
|
||||||
|
(exwm-input-set-key
|
||||||
|
(kbd "<XF86AudioMicMute>") #'pulse-audio/toggle-microphone))
|
||||||
|
|
||||||
(provide 'pulse-audio)
|
(provide 'pulse-audio)
|
||||||
;;; pulse-audio.el ends here
|
;;; pulse-audio.el ends here
|
||||||
|
|
Loading…
Reference in a new issue