So, thanks to a post on twitter, I’ve found a better way to snag screenshots by using scrot instead of compiz. This doesn’t give the graphical corruption that imagemagick does while compiz is running, and has the added bonus a being able to single-click a window to grab the entire window quickly.
So, here’s my revised source:
#!/bin/bash
user=
server=
destdir=
httpstr=filename=`scrot -s -b -e ‘echo $f’`
md5=`md5sum $filename`
if [ "$?" -ne 0 ]; then
notify-send “Error” “Could not generate md5sum” -i error
exit
fimd5=${md5/ */}
scp $filename “$user@$server:$destdir${md5}.png”
if [ "$?" -ne 0 ]; then
notify-send “Error” “Failed upload” -i error
exit
filongurl=$httpstr$md5.png
shorturl=`wget http://is.gd/api.php?longurl=$longurl -O-`
if [ "$?" -ne 0 ]; then
notify-send “Error” “Failed to shorten URL” -i error
$shorturl=$longurl
fiecho $shorturl | xclip -selection clipboard
notify-send “Upload Complete” $shorturl
rm $filename
Save it and bind the script to a hotkey and you should be good to go.
See the original post for the rest of the setup.