Skip to content

Instantly share code, notes, and snippets.

@shtrih
Forked from anonymous/gist:10439766
Last active August 29, 2015 13:59
Show Gist options
  • Save shtrih/10640939 to your computer and use it in GitHub Desktop.
Save shtrih/10640939 to your computer and use it in GitHub Desktop.
#!/bin/sh
/usr/bin/xwininfo -all -display :0 -id `/usr/bin/xdpyinfo -display :0 | /usr/bin/awk '/^focus:/{print $3}'|tr -d ,` | /bin/grep ' Parent window id:' | /usr/bin/replace ' Parent window id:' `/bin/date +%F-%H:%M:%S ` >> /home/alex/dm.log
/usr/bin/import -window root -display :0 jpg:- > /home/alex/ss/`date +%F-%H%M%S`.jpg
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment