By neildaemond, an 'any-stack' hacking grasshopper.
Taking notes while tinkering with:

screenshot from command line

If you have ImageMagick installed, you can use:

import filename.png

to then select an image window via a mouse. Or, the pure command line method of:

import filename.png -window root

to take a snapshot of the whole screen.

Using the -window root option to take a screenshot of the whole screen, Its said to work with x window system. see man import for more options.

I like to use this when creating posts on this blog, since I’m using a static site generator, Hugo which builds from markdown. Now, I can tab into another cmd line and import in an image to use directly.

Testing it out, I get:

Screenshot via import


#Tools   #CommandLine