I took two approaches to bind a command to a key for taking screenshots.
1) static const char *screenshotcmd[] = { "screenshot.sh", NULL };
2) static const char *screenshotcmd[] = { "import", "/tmp/scr-`date +\%m\%d-\%H\%M\%S`.png", NULL };
Approach 1 takes the command of approach 2 and puts the command into a script.
It works, but if possible, I would like to get it to work without any script, and without SHCMD.
Approach 2 creates a screenshot, too, but the `date...` part is not interpreted as a shell command...
I looked up some threads, and the suckless website, but I didn't found a solution for making the date command to work between ...scr- and .png.
Maybe I need to structure the screenshotcmd different ?
1) static const char *screenshotcmd[] = { "screenshot.sh", NULL };
2) static const char *screenshotcmd[] = { "import", "/tmp/scr-`date +\%m\%d-\%H\%M\%S`.png", NULL };
Approach 1 takes the command of approach 2 and puts the command into a script.
It works, but if possible, I would like to get it to work without any script, and without SHCMD.
Approach 2 creates a screenshot, too, but the `date...` part is not interpreted as a shell command...
I looked up some threads, and the suckless website, but I didn't found a solution for making the date command to work between ...scr- and .png.
Maybe I need to structure the screenshotcmd different ?