From d9c1cfe37cf489fc0608d7df5717def9003cf708 Mon Sep 17 00:00:00 2001 From: Aaron Taylor Date: Thu, 2 Feb 2023 21:15:40 -0800 Subject: [PATCH] Minor customizations to `config.h` (e.g. keybindings for lockscreen, screenshot, etc). --- README | 2 ++ config.h | 11 +++++++---- 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/README b/README index e2ab93b..8822f58 100644 --- a/README +++ b/README @@ -23,6 +23,8 @@ The changes made to stock dwm add the following abilities. - Center window names in status bar. + - Customized rules/keybindings in `config.h`. + In addition to the usual dependencies and installation tasks for dwm (see the original README at the bottom of this file), there are the following new dependencies/tasks. diff --git a/config.h b/config.h index 7680b82..0eb4373 100644 --- a/config.h +++ b/config.h @@ -29,8 +29,7 @@ static const Rule rules[] = { * WM_NAME(STRING) = title */ /* class instance title tags mask isfloating monitor */ - { "Gimp", NULL, NULL, 0, 1, -1 }, - { "Firefox", NULL, NULL, 1 << 8, 0, -1 }, + { "sample", NULL, NULL, 0, 1, -1 }, }; /* layout(s) */ @@ -59,7 +58,9 @@ static const Layout layouts[] = { /* commands */ static const char *dmenucmd[] = { "dmenu_run", "-fn", dmenufont, "-nb", col_gray1, "-nf", col_gray3, "-sb", col_cyan, "-sf", col_gray4, NULL }; -static const char *termcmd[] = { "st", NULL }; +static const char *termcmd[] = { "xterm", NULL }; +static const char *lockcmd[] = { "xscreensaver-command", "-lock", NULL }; +static const char *screenshotcmd[] = { "screenshot", NULL }; static const char *layoutmenu_cmd = "layoutmenu.sh"; static const Key keys[] = { @@ -97,7 +98,9 @@ static const Key keys[] = { TAGKEYS( XK_7, 6) TAGKEYS( XK_8, 7) TAGKEYS( XK_9, 8) - { MODKEY|ShiftMask, XK_q, quitprompt, {0} }, + { MODKEY|ShiftMask, XK_q, quitprompt, {0} }, + { MODKEY, XK_Escape, spawn, {.v = lockcmd } }, + { MODKEY|ShiftMask, XK_Escape, spawn, {.v = screenshotcmd } }, }; /* button definitions */ -- 2.20.1