diff --git a/config.h b/config.h index 610349f..41c4e83 100644 --- a/config.h +++ b/config.h @@ -89,6 +89,7 @@ static const Key keys[] = { { 0, XF86XK_AudioRaiseVolume, vene_inc_vol, {0} }, { 0, XF86XK_AudioLowerVolume, vene_dec_vol, {0} }, { 0, XF86XK_AudioMute, vene_toggle_vol, {0} }, + { 0, XF86XK_AudioMicMute, vene_toggle_mic, {0} }, #if HAS_SW_BACKLIGHT { 0, XF86XK_MonBrightnessUp, spawn, {.v = bright_up } }, { 0, XF86XK_MonBrightnessDown,spawn, {.v = bright_down } }, diff --git a/vene.cpp b/vene.cpp index c54a974..7a75bf6 100644 --- a/vene.cpp +++ b/vene.cpp @@ -340,4 +340,11 @@ extern "C" child = toggle_vol.detach(); has_child = true; } + + void vene_toggle_mic(const Arg*) + { + Cmd toggle_mic(amixer + "-q" + "set" + "Capture" + "toggle"); + child = toggle_mic.detach(); + has_child = true; + } } diff --git a/vene.h b/vene.h index edb08f8..c3536af 100644 --- a/vene.h +++ b/vene.h @@ -22,6 +22,7 @@ void vene_webbookmark(); void vene_inc_vol(const Arg*); void vene_dec_vol(const Arg*); void vene_toggle_vol(const Arg*); +void vene_toggle_mic(const Arg*); #ifdef __cplusplus }