aboutsummaryrefslogtreecommitdiff
path: root/i3/bin/setbg-pgfplots
diff options
context:
space:
mode:
authorCamil Staps2017-12-15 15:12:14 +0100
committerCamil Staps2017-12-15 15:12:14 +0100
commit15d2934f146af634d96fdc20ba5237c09e55d157 (patch)
tree2bcb984098ef3f6cd45d2881d11b5d555102449f /i3/bin/setbg-pgfplots
parentAdd Torxakis and SMV plugins for Vim (diff)
Fix setbg
Diffstat (limited to 'i3/bin/setbg-pgfplots')
-rwxr-xr-xi3/bin/setbg-pgfplots3
1 files changed, 1 insertions, 2 deletions
diff --git a/i3/bin/setbg-pgfplots b/i3/bin/setbg-pgfplots
index 1479844..bd66b4e 100755
--- a/i3/bin/setbg-pgfplots
+++ b/i3/bin/setbg-pgfplots
@@ -13,7 +13,7 @@ NR=$RANDOM
let "NR %= 524"
# Test internet
-timeout 4 wget -q --spider http://cloogle.org || setbg-backup
+timeout 4 wget -q --spider http://cloogle.org || setbg-backup || exit 1
wget -qO- "http://pgfplots.sourceforge.net/example_$NR.pdf" | convert -size "x$SCR_HEIGHT" -density 300 - /tmp/bg.png
wget -qO- "http://pgfplots.sourceforge.net/gallery.html" | sed -n "/example_$NR\.pdf/,/<\/div>/p" | tail -n +6 | head -n -1 | pygmentize -l latex -O font_size=$FONT_SIZE -o /tmp/bg-src.png
@@ -22,4 +22,3 @@ montage -geometry "+$PADDING+$PADDING" /tmp/bg-src.png /tmp/bg.png "/tmp/bg-$NR.
rm /tmp/bg{,-src}.png
feh -B white --bg-max "/tmp/bg-$NR.png"
-