DSL Ideas and Suggestions :: Timestamp X Window Snapshot



The current entry for the X screendump (jwm) is:
Code Sample
<Program icon="picture.xpm" label="X Window Snapshot"> xwd -out myscreen.xwd; xwud -raw -in myscreen.xwd </Program>


This means that myscreen.xwd is rewritten when this menu item is invoked more than once. How about changing it so it gets timestamped (maybe not as excessively as mine is below: YYYYMMDDHHMMSS) so users don't have to copy anything they want to save to another file before taking another?
Code Sample

<Program icon="picture.xpm" label="X Window Snapshot"> xwd -out myscreen-$(date +%Y%m%d%H%M%S).xwd; xwud -raw -in myscreen-$(date +%Y%m%d%H%M%S).xwd</Program>

Also, is it necessary to immediately display what you can already see? I know xzgv doesn't work with xwd files, but maybe create a script/dfm icon so they can drag and drop on xwud to view .xwd screenshots?

Timestamp sounds good.

The reason both input and output were used in the menu of X snapshot was to give feedback that something actually occured. Prior to this, users would complain that X snapshoot was not working, as the display option is not well known.

Perhaps a simple dfmext association will make the display option much easier.



I think this should work better if you want to leave in xwud for when a shot is taken in later milliseconds just before %m rolls over and %S is 00 again. Drawback: leaves two copies of the most recent shot. Or you could mv it instead, I guess.
Code Sample
<Program icon="picture.xpm" label="X Window Snapshot"> xwd -out myscreen.xwd; xwud -raw -in myscreen.xwd; cp myscreen.xwd myscreen-$(date +%Y%m%d%H%M%S).xwd</Program>

I have taken xwud out and placed it in the dfmext as an association.

original here.