when I hit the printscreen button on my keyboard, I want to take a screenshot (using scrot)
when I hit alt+printscreen, I want to take a screenshot of the active windows
when I hit ctrl+printscreen, I want to take a screenshot with a delay of 5 seconds (scrot -dc 5?)
I would like to save the screenshots in ~/screenshots and the name should be something like yearmothday-hourminutsseconds-resolution.png.
is that possible?
I figured I should use something like (copied this from my fluxbox config)
For those that don’t speak dutch (propably most of you), I used scrot -b -s %d-%m-%Y.png for taking screenshots of windows.
I mapped the printscreen key to a simple scrot command and alt+printscreen to the above command, and ctrl+printscreen to a scrot -d 5 screenshot.png to make a 5 seconds delayed screenshot.
to make it even better, I emerged xosd and added on-screen-display-messaged to let me know where to find the screenshot. In case of the delayed screenshot, I use 2 osd-messages, 1 before the scrot -d 5 and 1 after, the first stating ‘screenshot is about to be taken’.
this is displayed 5 seconds, then te screenshot is taken and then I’m notified where to find the shot.
for those who want to know how to use the OSD-messages, use something like this:
Hmm, that link basically describes the various screenshotting commands available on most *NIX systems (now you non Dutch-speaking people know it), well, I’m at least happy that they finally managed to do something constructive.
Also, I found that this is working too :
Key Print A N Exec exec scrot -d 1 ~/screensnapshot/screensnapshot_"$(date)".png
Key Print A M Exec exec scrot -d 1 ~/screensnapshot/tempscreensnapshot.png
Key Print A CM Exec exec scrot -d 1 ~/something.png
A/ -d 1 is necessary (0 not working)
B/ the " " have to be just front of “$(date)” only