[wiki] [sites] [dwm][keypressrelease] Add alternative || Ivan Tham

From: <git_AT_suckless.org>
Date: Mon, 11 Feb 2019 13:54:00 +0100

commit 33a9daa11903d18a04f9a739404d8269c6dabc0f
Author: Ivan Tham <pickfire_AT_riseup.net>
Date: Mon Feb 11 20:53:24 2019 +0800

    [dwm][keypressrelease] Add alternative

diff --git a/dwm.suckless.org/patches/keypressrelease/index.md b/dwm.suckless.org/patches/keypressrelease/index.md
index be868430..f3a1ee54 100644
--- a/dwm.suckless.org/patches/keypressrelease/index.md
+++ b/dwm.suckless.org/patches/keypressrelease/index.md
_AT_@ -15,14 +15,19 @@ Usage
 -----
 A working `scrot -s` key binding:
 
- static const char *scrot[] = { "scrot", "-s", NULL };
- ...
- { KeyRelease, 0, XK_Print, spawn, {.v = scrot } },
+ { KeyRelease, 0, XK_Print, spawn, SHCMD("scrot -s") },
 
 Or to only display the bar while the toggle key is held down (requires that it
 is hidden to start with), add:
 
- { KeyRelease, MODKEY, XK_b, togglebar, {0} },
+ { KeyRelease, MODKEY, XK_b, togglebar, {0} },
+
+Alternatives
+------------
+
+An alternative is to put a tiny sleep right before executing scrot.
+
+ { ControlMask, XK_Print, spawn, SHCMD("sleep 0.2; scrot -s") },
 
 Download
 --------
Received on Mon Feb 11 2019 - 13:54:00 CET

This archive was generated by hypermail 2.3.0 : Mon Feb 11 2019 - 14:00:29 CET