summaryrefslogtreecommitdiffstats
path: root/config.def.h
diff options
context:
space:
mode:
authorMalfurious <m@lfurio.us>2021-10-03 02:16:10 -0400
committerMatt Hunter <m@lfurio.us>2026-01-17 19:58:37 -0500
commit49eb9a44e0255889ca74dfeecc242f747b0f59d8 (patch)
tree0c66fa9a3e3dde56fa66eac526bd090aae9bf49a /config.def.h
parent43cf2f9979f8240fac4911056bb2419110275964 (diff)
downloadst-49eb9a44e0255889ca74dfeecc242f747b0f59d8.tar.gz
st-49eb9a44e0255889ca74dfeecc242f747b0f59d8.zip
patch: newterm (orphan version)
Ctrl-Shift-Return now creates a new st terminal, whose CWD is the same as the parent st's CWD. This version of the patch does a double fork, a technique commonly used by daemons to spawn orphan processes. This solution is specific to the swallow patch for dwm which traverses the process tree to determine if the new window is a decendant of a terminal window, in which case the new window should take the place of the terminal window. The way the original newterm patch worked the new st terminal would be a direct decendant of the parent st terminal process, which could lead to the wrong terminal window being swallowed. The double fork method avoids this by leaving all new st terminals as orphans, i.e. they will have no parent process.
Diffstat (limited to 'config.def.h')
-rw-r--r--config.def.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/config.def.h b/config.def.h
index adfcb77..5a48228 100644
--- a/config.def.h
+++ b/config.def.h
@@ -204,6 +204,7 @@ static Shortcut shortcuts[] = {
{ TERMMOD, XK_Y, selpaste, {.i = 0} },
{ ShiftMask, XK_Insert, selpaste, {.i = 0} },
{ TERMMOD, XK_Num_Lock, numlock, {.i = 0} },
+ { TERMMOD, XK_Return, newterm, {.i = 0} },
};
/*