scrot(1) | command line screen capture utility | scrot(1) |
scrot - command line screen capture utility
scrot [options] [file]
scrot (SCReenshOT) is a simple command line screen capture utility that uses imlib2 to grab and save images. Multiple image formats are supported through imlib2's dynamic saver modules.
Some features of the scrot:
scrot also can be used to monitor a desktop PC in admin absent and register unwanted activities.
Both the --exec and filename parameters can take format specifiers that are expanded by scrot when encountered. There are two types of format specifier. Characters preceded by a '%' are interpreted by strftime(2). See man strftime for examples. These options may be used to refer to the current date and time. The second kind are internal to scrot and are prefixed by '$' The following specifiers are recognised:
Example:
$a hostname
$f image path/filename (ignored when used in the filename)
$m thumb image path/filename (ignored when used in the filename)
$n image name (ignored when used in the filename)
$s image size (bytes) (ignored when used in the filename)
$p image pixel size
$w image width
$h image height
$t image format (ignored when used in the filename)
$$ print a literal '$'
\n print a newline (ignored when used in the filename)
This would create a file called something like 2000-10-30_2560x1024.png and move it to your shots directory.
$ scrot '%Y-%m-%d_$wx$h.png' -e 'mv $f ~/shots/'
When using --select you can indicate the style of the line with --line.
The following specifiers are recognised:
The default style is:
style=(solid,dash),width=(range 1 to 8),color="value",
opacity=(range 10 to 100),mode=(edge,classic)
Mode 'edge' ignore: style, --freeze
mode=classic,style=solid,width=1,opacity=100
Mode 'classic' ignore: opacity
The 'opacity' specifier is only effective if a Composite Manager is running.
For the color you can use a name or a hexadecimal value.
Example:
color="red" or color="#ff0000"
$ scrot --line style=dash,width=3,color="red" --select
The following specifiers are recognised for the option --note:
Example:
-f 'FontName/size'
-t 'text'
-x position (optional)
-y position (optional)
-c color(RGBA) (optional)
-a angle (optional)
$ scrot --note "-f '/usr/share/fonts/TTF/DroidSans-Bold/40' -x 10 -y 20 -c 255,0,0,255 -t 'Hi'"
scrot was originally developed by Tom Gilbert under MIT-advertising license and is maintained by some people.
Currently, source code and newer versions are available at https://github.com/resurrecting-open-source-projects/scrot
04 Feb 2021 | scrot-1.5 |