From 693081eb1e028368cc32d3dd2d1f46af341f121e Mon Sep 17 00:00:00 2001 From: Malfurious Date: Mon, 22 Jun 2020 00:49:08 -0400 Subject: patch: scratchpad The scratchpad patch allows you to spawn or restore a floating terminal window. It is usually useful to have one to do some short typing. A tool like detach (http://detach.sourceforge.net) turns it into a launchpad for X applications. By default your terminal (st) is used, and the default key binding is MODKEY+XK_grave. A config.def.h change is included in the patch. --- config.def.h | 3 +++ 1 file changed, 3 insertions(+) (limited to 'config.def.h') diff --git a/config.def.h b/config.def.h index bb67a43..1609683 100644 --- a/config.def.h +++ b/config.def.h @@ -72,6 +72,8 @@ static const char *slockcmd[] = { "slock", NULL }; static const char *slockucmd[] = { "slock", "-u", NULL }; static const char *browsercmd[] = { "qutebrowser", NULL }; static const char *browserpcmd[] = { "qutebrowser", "--target", "private-window", NULL }; +static const char scratchpadname[] = "scratchpad"; +static const char *scratchpadcmd[] = { "st", "-t", scratchpadname, "-g", "120x34", NULL }; static const Key keys[] = { /* modifier key function argument */ @@ -81,6 +83,7 @@ static const Key keys[] = { { MODKEY|ShiftMask, XK_z, spawn, {.v = slockucmd } }, { MODKEY|ShiftMask, XK_backslash, spawn, {.v = browsercmd } }, { MODKEY|ControlMask|ShiftMask, XK_backslash, spawn, {.v = browserpcmd } }, + { MODKEY, XK_grave, togglescratch, {.v = scratchpadcmd } }, { MODKEY, XK_j, focusstack, {.i = +1 } }, { MODKEY, XK_k, focusstack, {.i = -1 } }, { MODKEY, XK_i, incnmaster, {.i = +1 } }, -- cgit v1.2.3