Advertisement
TheGreatCodeholio

screenshot.sh

Jan 21st, 2019
79
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 0.36 KB | None | 0 0
  1. #!/bin/bash
  2. #
  3. # How to use:
  4. #
  5. # Bring up your terminal emulator (xterm) and type
  6. #
  7. # sleep 3; ./screenshot.sh
  8. #
  9. # You have three seconds to get the cursor ready. The cursor will be captured and whatever window you click on is captured.
  10. #
  11. name=`date +%F-%T | sed -e 's/:/-/g'`
  12. name+=".png"
  13. import -window `xwininfo | awk '/Window id/{print $4; exit}'` "$name"
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement