aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorsinanmohd <pcmsinan@gmail.com>2022-04-13 22:10:11 +0530
committersinanmohd <pcmsinan@gmail.com>2023-01-11 18:42:33 +0530
commitbda43b365c8b98c3d7e516a61fa8e7249e355f75 (patch)
treefc14afc1f8fd4cfd966376f8530d98dd6a850b78
parent31073d88b89a5141242372fb7a9e22fee8f12da2 (diff)
support for media control keys
-rw-r--r--config.def.h16
1 files changed, 12 insertions, 4 deletions
diff --git a/config.def.h b/config.def.h
index 5235a2c..c29dae4 100644
--- a/config.def.h
+++ b/config.def.h
@@ -93,10 +93,14 @@ static const char *ytsearch[] = { "st", "ytfzf", "-tl", NULL };
static const char *ytsub[] = { "st", "ytfzf", "-tl", "--subs=4", NULL };
/* audio control */
-static const char *upvol[] = { "pamixer", "-i", "5", NULL };
-static const char *downvol[] = { "pamixer", "-d", "5", NULL };
-static const char *mutevol[] = { "pamixer", "-t", NULL };
-static const char *mutemic[] = { "mutemic", NULL };
+static const char *upvol[] = { "pamixer", "-i", "5", NULL };
+static const char *downvol[] = { "pamixer", "-d", "5", NULL };
+static const char *mutevol[] = { "pamixer", "-t", NULL };
+static const char *mutemic[] = { "mutemic", NULL };
+static const char *audiotoggle[] = { "mctl", "toggle", NULL };
+static const char *audiokill[] = { "mctl", "kill", NULL };
+static const char *audioprev[] = { "mctl", "prev", NULL };
+static const char *audionext[] = { "mctl", "next", NULL };
static const Key keys[] = {
/* modifier key function argument */
@@ -131,6 +135,10 @@ static const Key keys[] = {
{ 0, XK_XF86AudioLowerVolume, spawn, {.v = downvol } },
{ 0, XK_XF86AudioMute, spawn, {.v = mutevol } },
{ 0, XK_XF86AudioMicMute, spawn, {.v = mutemic } },
+ { 0, XK_XF86AudioPlay, spawn, {.v = audiotoggle } },
+ { 0, XK_XF86AudioStop, spawn, {.v = audiokill } },
+ { 0, XK_XF86AudioPrev, spawn, {.v = audioprev } },
+ { 0, XK_XF86AudioNext, spawn, {.v = audionext } },
{ MODKEY, XK_x, spawn, {.v = scrnlock } },
{ MODKEY, XK_s, spawn, {.v = scrnshotsel } },
{ MODKEY|ShiftMask, XK_s, spawn, {.v = scrnshot } },