The Advent of Void: Day 7: scrot

scrot(1) is a tool for taking screenshots on XWindow systems.

The simplest way to create a screenshot from your desktop is to call the program without arguments

$ scrot
$ ls

This creates a timestamped png file covering the whole desktop.

scrot allows you to define a target filename as last argument:

$ scrot awesome_screenshot.png
$ ls

This creates awesome_screenshot.png instead of an autocreated filename

To screenshot a single window you can either use -s to select the window with the mouse or -u to screenshot the currently focused one. For -u it might be useful to also apply -d 2 to get 2 seconds to focus the desired window.

$ scrot -s
$ ls

If you like to learn more about scrot, please consider reading the manpage.