Register now and start sharing your code snippets.
-->

Screenshot in wmii

Shell Script (Bash) posted about 1 year ago by marko

Method 1

A simple script to create a screenshot in wmii. It probably works in other window managers too. I call it ‘scrot’. Put it in the path and run it as you’d run any program in wmii. The “import” program comes with imagemagick.

   1  #!/bin/bash
   2  import -window root /tmp/screenshot.png

Method 2

If you want timestamped screenshots then

   1  apt-get install scrot
   2  mkdir -p ~/screenshots

And create a script with the following content for making the screenshot.

   1  #!/bin/bash
   2  scrot '%Y-%m-%d-%H-%M-%S_$wx$h_scrot.png' -e 'mv $f ~/screenshots'

Tagged wmii, screenshot, linux, imagemagick