tMove printscreen command into dwm configuration - dwm - [fork] customized build of dwm, the dynamic window manager
(HTM) git clone git://src.adamsgaard.dk/dwm
(DIR) Log
(DIR) Files
(DIR) Refs
(DIR) README
(DIR) LICENSE
---
(DIR) commit 1c45834701527ef9557526bf306f53e5f59f7002
(DIR) parent b6024f867f246210ef7afcb7577e74249bc0ee35
(HTM) Author: Anders Damsgaard <anders@adamsgaard.dk>
Date: Fri, 28 Aug 2020 09:37:06 +0200
Move printscreen command into dwm configuration
Diffstat:
M config.h | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
---
(DIR) diff --git a/config.h b/config.h
t@@ -79,7 +79,7 @@ static char dmenumon[2] = "0";
#define BROWSER "surf-open.sh"
#define MPD_REMOTE "mini"
-/* helper for spawning shell commands in the pre dwm-5.0 fashion */
+#define SHCMD(cmd) { .v = (const char*[]){ "/bin/sh", "-c", cmd, NULL } }
#define TERMCMD(...) {TERMINAL, "-e", __VA_ARGS__, NULL}
#define ALTTERMCMD(...) {ALTTERMINAL, "-e", __VA_ARGS__, NULL}
#define DUPLEXCMD(cmd) {TERMINAL, "-e", "tmux", "new-session", cmd, NULL}
t@@ -109,7 +109,6 @@ static const char *plumb2cmd[] = {"clipplumb", "-c", NULL};
static const char *ytdlaudiocmd[] = {"youtube-dl-music", "-t", "-a", "-m", "-q", NULL};
static const char *showclipcmd[] = {"showclip", NULL};
static const char *xlockcmd[] = {"xlock", NULL};
-static const char *printscreencmd[] = {"maimfull", NULL};
static const char *printscreenicmd[] = {"maimpick", NULL};
static const char *keyboardlayoutcmd[] = {"keyboard-layout-switch.sh", NULL};
static const char *torbrowsercmd[] = {"tor-browser", NULL};
t@@ -154,7 +153,7 @@ static Key keys[] = {
{ MODKEY|ShiftMask, XK_space, spawn, {.v = dmenucmd } },
{ MODKEY, XK_grave, spawn, {.v = unicodecmd } },
{ MODKEY, XK_slash, spawn, {.v = definecmd } },
- { 0, XK_Print, spawn, {.v = printscreencmd } },
+ { 0, XK_Print, spawn, SHCMD("maim ~/tmp/pic-full-$(date '+%y-%m-%d_%H:%M:%S').png") },
{ ShiftMask, XK_Print, spawn, {.v = printscreenicmd } },
{ MODKEY, XK_period, focusmon, {.i = +1 } },
{ MODKEY|ShiftMask, XK_period, tagmon, {.i = +1 } },