Skip to content

Instantly share code, notes, and snippets.

@jes
Created December 11, 2011 17:50
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jes/1461782 to your computer and use it in GitHub Desktop.
Save jes/1461782 to your computer and use it in GitHub Desktop.
#!/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