volume: implement mic toggle as well

This commit is contained in:
Vincent Bernat 2020-03-08 00:02:07 +01:00
parent 13c4698c5b
commit 02e16874c9
2 changed files with 5 additions and 0 deletions

View file

@ -50,6 +50,10 @@ function toggle()
change("toggle")
end
function mictoggle()
os.execute("amixer -q -D pulse sset Capture toggle", false)
end
-- run pavucontrol
function mixer()
awful.util.spawn("pavucontrol", false)

View file

@ -253,6 +253,7 @@ config.keys.global = awful.util.table.join(
awful.key({ }, "XF86AudioRaiseVolume", volume.increase),
awful.key({ }, "XF86AudioLowerVolume", volume.decrease),
awful.key({ }, "XF86AudioMute", volume.toggle),
awful.key({ }, "XF86AudioMicMute", volume.mictoggle),
awful.key({ }, "XF86AudioPlay", music.playpause),
awful.key({ }, "XF86AudioPause", music.pause),