tconfig.h: add bindings to change remote mpd volume - dwm - [fork] customized build of dwm, the dynamic window manager
(HTM) git clone git://src.adamsgaard.dk/dwm
(DIR) Log
(DIR) Files
(DIR) Refs
(DIR) README
(DIR) LICENSE
---
(DIR) commit 057aa5489df93ea77b3ac0bef82bff35987f6a86
(DIR) parent ee171ddf2a1224a8d24a0e5055cbd6b50524b827
(HTM) Author: Anders Damsgaard <anders@adamsgaard.dk>
Date: Fri, 6 Nov 2020 12:47:31 +0100
config.h: add bindings to change remote mpd volume
Diffstat:
M config.h | 6 ++++++
1 file changed, 6 insertions(+), 0 deletions(-)
---
(DIR) diff --git a/config.h b/config.h
t@@ -142,6 +142,9 @@ static const char *mpd_remote_nextcmd[] = {"mpc", "next", "-q", "-h", MPD_RE
static const char *mpd_remote_prevcmd[] = {"mpc", "prev", "-q", "-h", MPD_REMOTE, NULL};
static const char *mpd_remote_stopcmd[] = {"mpc", "stop", "-q", "-h", MPD_REMOTE, NULL};
+static const char *mpdremotevolupcmd[] = {"mpc", "-q", "-h", MPD_REMOTE, "volume", "+10", NULL};
+static const char *mpdremotevoldncmd[] = {"mpc", "-q", "-h", MPD_REMOTE, "volume", "-10", NULL};
+
static const char *audioextvolupcmd[] = {"sndioctl", "output.level=+0.05", NULL};
static const char *audioextvoldncmd[] = {"sndioctl", "output.level=-0.05", NULL};
static const char *audioextmutecmd[] = {"sndioctl", "output.mute=!", NULL};
t@@ -197,6 +200,9 @@ static Key keys[] = {
{ ShiftMask, XF86XK_AudioLowerVolume, spawn, {.v = audioextvoldncmd } },
{ ShiftMask, XF86XK_AudioMute, spawn, {.v = audioextmutecmd } },
+ { ControlMask|ShiftMask, XF86XK_AudioRaiseVolume, spawn, {.v = mpdremotevolupcmd } },
+ { ControlMask|ShiftMask, XF86XK_AudioLowerVolume, spawn, {.v = mpdremotevoldncmd } },
+
{ MODKEY, XK_F1, spawn, {.v = mancmd } },
{ MODKEY, XK_F7, spawn, {.v = displaycmd } },
{ MODKEY|ShiftMask, XK_F7, spawn, {.v = displayintcmd } },