slock configured & volume control added

This commit is contained in:
Filip Rojek 2022-11-05 18:33:07 +01:00
parent 3034fe2319
commit 1b4c602db6
4 changed files with 30 additions and 6 deletions

View File

@ -60,12 +60,24 @@ static const char *dmenucmd[] = { "dmenu_run", "-m", dmenumon, "-fn", dmenufont,
static const char *termcmd[] = { "kitty", NULL }; static const char *termcmd[] = { "kitty", NULL };
static const char *slockcmd[] = { "slock", NULL }; static const char *slockcmd[] = { "slock", NULL };
static const char *brightness[2][3] = {{"backlight_control", "+5", NULL}, {"backlight_control", "-5", NULL}}; static const char *brightness[2][3] = {{"backlight_control", "+5", NULL}, {"backlight_control", "-5", NULL}};
// Volume Commands
static const char *volume[3][4] = { {
"amixer", "set", "Master", "10%+"
},{
"amixer", "set", "Master", "10%-"
},{
"amixer", "set", "Master", "toggle"
}
};
static const Key keys[] = { static const Key keys[] = {
/* modifier key function argument */ /* modifier key function argument */
/* { MODKEY|ShiftMask, 10, spawn, {.v = slockcmd } }, */ { MODKEY|ShiftMask, 46, spawn, {.v = slockcmd } },
{ 0, 233, spawn, {.v = brightness[0]} }, { 0, 233, spawn, {.v = brightness[0]} },
{ 0, 232, spawn, {.v = brightness[1]} }, { 0, 232, spawn, {.v = brightness[1]} },
{ 0, 123, spawn, {.v = volume[0]} },
{ 0, 122, spawn, {.v = volume[1]} },
{ 0, 121, spawn, {.v = volume[2]} },
{ MODKEY, 33, spawn, {.v = dmenucmd } }, // p { MODKEY, 33, spawn, {.v = dmenucmd } }, // p
{ MODKEY|ShiftMask, 36, spawn, {.v = termcmd } }, // Return { MODKEY|ShiftMask, 36, spawn, {.v = termcmd } }, // Return
{ MODKEY, 56, togglebar, {0} }, // b { MODKEY, 56, togglebar, {0} }, // b

View File

@ -60,12 +60,24 @@ static const char *dmenucmd[] = { "dmenu_run", "-m", dmenumon, "-fn", dmenufont,
static const char *termcmd[] = { "kitty", NULL }; static const char *termcmd[] = { "kitty", NULL };
static const char *slockcmd[] = { "slock", NULL }; static const char *slockcmd[] = { "slock", NULL };
static const char *brightness[2][3] = {{"backlight_control", "+5", NULL}, {"backlight_control", "-5", NULL}}; static const char *brightness[2][3] = {{"backlight_control", "+5", NULL}, {"backlight_control", "-5", NULL}};
// Volume Commands
static const char *volume[3][4] = { {
"amixer", "set", "Master", "10%+"
},{
"amixer", "set", "Master", "10%-"
},{
"amixer", "set", "Master", "toggle"
}
};
static const Key keys[] = { static const Key keys[] = {
/* modifier key function argument */ /* modifier key function argument */
/* { MODKEY|ShiftMask, 10, spawn, {.v = slockcmd } }, */ { MODKEY|ShiftMask, 46, spawn, {.v = slockcmd } },
{ 0, 233, spawn, {.v = brightness[0]} }, { 0, 233, spawn, {.v = brightness[0]} },
{ 0, 232, spawn, {.v = brightness[1]} }, { 0, 232, spawn, {.v = brightness[1]} },
{ 0, 123, spawn, {.v = volume[0]} },
{ 0, 122, spawn, {.v = volume[1]} },
{ 0, 121, spawn, {.v = volume[2]} },
{ MODKEY, 33, spawn, {.v = dmenucmd } }, // p { MODKEY, 33, spawn, {.v = dmenucmd } }, // p
{ MODKEY|ShiftMask, 36, spawn, {.v = termcmd } }, // Return { MODKEY|ShiftMask, 36, spawn, {.v = termcmd } }, // Return
{ MODKEY, 56, togglebar, {0} }, // b { MODKEY, 56, togglebar, {0} }, // b

BIN
dwm

Binary file not shown.

BIN
dwm.o

Binary file not shown.