4 ms·
Drop this into a crontab with your desired frequency: DISPLAY=:0 import -window root "$HOME/Pictures/screenshot-$(date '+%Y%m%d%H%M').png" Requirements Ima
by o-__-o 6y ago
Drop this into a crontab with your desired frequency:
DISPLAY=:0 import -window root "$HOME/Pictures/screenshot-$(date '+%Y%m%d%H%M').png"
Requirements
ImageMagick installed
Improvements
You can change the date +FORMAT for a more readable filename. See the date(1) manpage.
Caveats
You may need to change your DISPLAY to match your actual X11 server. You may need to add XAUTHORITY=$HOME/.Xauthority depending on your X11 ACLs. Probably doesn't work with Wayland, but nothing works with Wayland so YMMV.