|
|
@ -73,44 +73,32 @@ static const Layout layouts[] = { |
|
|
|
#define SHCMD(cmd) { .v = (const char*[]){ "/bin/sh", "-c", cmd, NULL } } |
|
|
|
#define SHCMD(cmd) { .v = (const char*[]){ "/bin/sh", "-c", cmd, NULL } } |
|
|
|
|
|
|
|
|
|
|
|
/* commands */ |
|
|
|
/* commands */ |
|
|
|
|
|
|
|
static const char *dmenucmd[] = { "dmenu_run", "-fn", dmenufont, "-nb", col_gray1, "-nf", col_gray3, "-sb", col_cyan, "-sf", col_gray4, NULL }; |
|
|
|
/* I use rofi instead of dmenu
|
|
|
|
|
|
|
|
* static const char *dmenucmd[] = { "dmenu_run", "-fn", dmenufont, "-nb", col_gray1, "-nf", col_gray3, "-sb", col_cyan, "-sf", col_gray4, NULL }; |
|
|
|
|
|
|
|
*/ |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
static const char *roficmd[] = { "rofi", "-show", "run", NULL }; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
static const char *termcmd[] = { "st", NULL }; |
|
|
|
static const char *termcmd[] = { "st", NULL }; |
|
|
|
|
|
|
|
|
|
|
|
/* up volume */ |
|
|
|
static const char *volupcmd[] = |
|
|
|
static const char *upvolcmd[] = |
|
|
|
|
|
|
|
{ "/usr/bin/amixer", "set", "Master", "5%+", NULL }; |
|
|
|
{ "/usr/bin/amixer", "set", "Master", "5%+", NULL }; |
|
|
|
/* down volume */ |
|
|
|
static const char *voldowncmd[] = |
|
|
|
static const char *downvolcmd[] = |
|
|
|
|
|
|
|
{ "/usr/bin/amixer", "set", "Master", "5%-", NULL }; |
|
|
|
{ "/usr/bin/amixer", "set", "Master", "5%-", NULL }; |
|
|
|
/* toggle volume */ |
|
|
|
static const char *mutevolcmd[] = |
|
|
|
static const char *togglevolcmd[] = |
|
|
|
|
|
|
|
{ "/usr/bin/amixer", "set", "Master", "toggle", NULL }; |
|
|
|
{ "/usr/bin/amixer", "set", "Master", "toggle", NULL }; |
|
|
|
/* toggle microphone */ |
|
|
|
static const char *mutemiccmd[] = |
|
|
|
static const char *togglemiccmd[] = |
|
|
|
|
|
|
|
{ "/usr/bin/amixer", "set", "Capture", "toggle", NULL }; |
|
|
|
{ "/usr/bin/amixer", "set", "Capture", "toggle", NULL }; |
|
|
|
/* brightness up */ |
|
|
|
static const char *brightnessupcmd[] = { "xbacklight", "-inc", "10", NULL }; |
|
|
|
static const char *brightness_upcmd[] = { "xbacklight", "-inc", "10", NULL }; |
|
|
|
static const char *brightnessdowncmd[] = { "xbacklight", "-dec", "10", NULL }; |
|
|
|
/* brightness down */ |
|
|
|
|
|
|
|
static const char *brightness_downcmd[] = { "xbacklight", "-dec", "10", NULL }; |
|
|
|
|
|
|
|
/* screenshot */ |
|
|
|
|
|
|
|
static const char *screenshotcmd[] = { "flameshot", "gui", NULL }; |
|
|
|
static const char *screenshotcmd[] = { "flameshot", "gui", NULL }; |
|
|
|
|
|
|
|
|
|
|
|
static const Key keys[] = { |
|
|
|
static const Key keys[] = { |
|
|
|
/* modifier key function argument */ |
|
|
|
/* modifier key function argument */ |
|
|
|
{ 0, XF86XK_AudioRaiseVolume, spawn, { .v = upvolcmd } }, |
|
|
|
{ 0, XF86XK_AudioRaiseVolume, spawn, { .v = volupcmd } }, |
|
|
|
{ 0, XF86XK_AudioLowerVolume, spawn, { .v = downvolcmd } }, |
|
|
|
{ 0, XF86XK_AudioLowerVolume, spawn, { .v = voldowncmd } }, |
|
|
|
{ 0, XF86XK_AudioMute, spawn, { .v = togglevolcmd } }, |
|
|
|
{ 0, XF86XK_AudioMute, spawn, { .v = mutevolcmd } }, |
|
|
|
{ 0, XF86XK_AudioMicMute, spawn, { .v = togglemiccmd } }, |
|
|
|
{ 0, XF86XK_AudioMicMute, spawn, { .v = mutemiccmd } }, |
|
|
|
{ 0, XF86XK_MonBrightnessUp, spawn, { .v = brightness_upcmd } }, |
|
|
|
{ 0, XF86XK_MonBrightnessUp, spawn, { .v = brightnessupcmd } }, |
|
|
|
{ 0, XF86XK_MonBrightnessDown, spawn, { .v = brightness_downcmd } }, |
|
|
|
{ 0, XF86XK_MonBrightnessDown, spawn, { .v = brightnessdowncmd } }, |
|
|
|
{ 0, XK_Print, spawn, { .v = screenshotcmd } }, |
|
|
|
{ 0, XK_Print, spawn, { .v = screenshotcmd } }, |
|
|
|
{ MODKEY, XK_p, spawn, {.v = roficmd } }, |
|
|
|
{ MODKEY, XK_p, spawn, {.v = dmenucmd } }, |
|
|
|
{ MODKEY|ShiftMask, XK_Return, spawn, {.v = termcmd } }, |
|
|
|
{ MODKEY|ShiftMask, XK_Return, spawn, {.v = termcmd } }, |
|
|
|
{ MODKEY, XK_b, togglebar, {0} }, |
|
|
|
{ MODKEY, XK_b, togglebar, {0} }, |
|
|
|
{ MODKEY, XK_j, focusstack, {.i = +1 } }, |
|
|
|
{ MODKEY, XK_j, focusstack, {.i = +1 } }, |
|
|
|