pull/34/head
E. Almqvist 3 years ago
parent 34ce082035
commit fc0bc8ec32
  1. 14
      src/config.h

@ -2,6 +2,7 @@
#include <X11/XF86keysym.h>
#define STATUSBAR "dwmblocks"
#define SHCMD(cmd) { .v = (const char*[]){ "/bin/sh", "-c", cmd, NULL } }
/* appearance */
static const unsigned int borderpx = 4; /* border pixel of windows */
@ -85,17 +86,12 @@ static const char *betterlockscreencmd[] = { "betterlockscreen", "--lock", "blur
static const char *screenshotcmd[] = { "flameshot", "gui", NULL };
static const char *cmuspausecmd[] = { "cmus-remote", "--pause", NULL };
static const char *mutecmd[] = { "amixer", "-q", "set", "Master", "toggle", NULL };
static const char *volupcmd[] = { "amixer", "-q", "set", "Master", "5%+", "unmute", NULL };
static const char *voldowncmd[] = { "amixer", "-q", "set", "Master", "5%-", "unmute", NULL };
static const char *miccmd[] = { "amixer", "set", "Capture", "toggle", NULL };
static Key keys[] = {
/* modifier key function argument */
{ MODKEY, XF86XK_AudioLowerVolume, spawn, {.v = voldowncmd} },
{ MODKEY, XF86XK_AudioRaiseVolume, spawn, {.v = volupcmd} },
{ MODKEY, XF86XK_AudioMute, spawn, {.v = mutecmd} },
{ MODKEY|ShiftMask, XF86XK_AudioMute, spawn, {.v = miccmd} },
{ MODKEY, XF86XK_AudioLowerVolume, spawn, SHCMD("amixer -q set Master 5%- unmute; pkill -RTMIN+1 dwmblocks") },
{ MODKEY, XF86XK_AudioRaiseVolume, spawn, SHCMD("amixer -q set Master 5%+ unmute; pkill -RTMIN+1 dwmblocks") },
{ MODKEY, XF86XK_AudioMute, spawn, SHCMD("amixer -q set Master toggle; pkill -RTMIN+1 dwmblocks") },
{ MODKEY|ShiftMask, XF86XK_AudioMute, spawn, SHCMD("amixer set Capture toggle") },
{ MODKEY, XK_d, spawn, {.v = dmenucmd } },
{ MODKEY, XK_Return, spawn, {.v = termcmd } },
{ MODKEY, XK_b, togglebar, {0} },

Loading…
Cancel
Save