Created
December 11, 2011 17:50
-
-
Save jes/1461782 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
#Take a screenshot, upload it to outpost, and write to IRC | |
#James Stanley 2010 | |
filename=`date +images/%Y%m%d-%H%M.png` | |
scrot /home/james/$filename | |
scp /home/james/$filename pillbox:public_html/$filename & | |
#message=`Xdialog --stdout --title "Screenshot" --inputbox "Screenshot message:" 8 80 "screenshot: http://incoherency.co.uk/$filename"` | |
message=`zenity --entry --text="Screenshot message:" --entry-text="screenshot: http://incoherency.co.uk/$filename" --width=400` | |
#Only post for non-empty message | |
if [ "$message" != "" ] | |
then | |
ssh pillbox "echo \"$message\" >> /var/spool/irc" | |
fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment