Skip to content

Commit

Permalink
Microphone control
Browse files Browse the repository at this point in the history
  • Loading branch information
fare committed Sep 13, 2020
1 parent bde5b14 commit f9b9308
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 2 deletions.
8 changes: 8 additions & 0 deletions commands.lisp
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,14 @@
(run-shell-command "amixer sset Master 100+ on")
(volume-status))

(defun microphone-status ()
(message (uiop:run-program `("amixer" "get" "Capture") :input nil :output :string :error-output nil)))

(defcommand toggle-microphone () ()
"toggle microphone"
(run-shell-command "amixer set Capture toggle")
(microphone-status))

;;; Brightness

;; TODO: (1) move that to fare-scripts (2) make it work automatically on non-intel video cards.
Expand Down
5 changes: 3 additions & 2 deletions keys.lisp
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,9 @@
("XF86AudioMute" . "toggle-volume")
("XF86AudioLowerVolume" . "lower-volume")
("XF86AudioRaiseVolume" . "raise-volume")
("S-XF86AudioLowerVolume" . "minimize-sound")
("S-XF86AudioRaiseVolume" . "maximize-sound")
("C-XF86AudioLowerVolume" . "minimize-sound")
("C-XF86AudioRaiseVolume" . "maximize-sound")
("XF86AudioMicMute" . "toggle-microphone")
("XF86MonBrightnessDown" . "brightness-down")
("XF86MonBrightnessUp" . "brightness-up"))
"alist of keyboard commands for *top-map*")
Expand Down

0 comments on commit f9b9308

Please sign in to comment.