diff options
Diffstat (limited to 'i3/bin')
-rwxr-xr-x | i3/bin/setbg-backup | 1 | ||||
-rwxr-xr-x | i3/bin/setbg-cloogle | 2 | ||||
-rwxr-xr-x | i3/bin/setbg-pgfplots | 3 | ||||
-rwxr-xr-x | i3/bin/setbg-texample | 6 |
4 files changed, 6 insertions, 6 deletions
diff --git a/i3/bin/setbg-backup b/i3/bin/setbg-backup index d70f7f4..f31de8e 100755 --- a/i3/bin/setbg-backup +++ b/i3/bin/setbg-backup @@ -1,3 +1,4 @@ #!/bin/bash feh --bg-fill "$(ls -1 ~/.bg.*.{jpg,png} | sort -R | head -1)" +exit 1 diff --git a/i3/bin/setbg-cloogle b/i3/bin/setbg-cloogle index 97e8154..f205a80 100755 --- a/i3/bin/setbg-cloogle +++ b/i3/bin/setbg-cloogle @@ -1,7 +1,7 @@ #!/bin/bash # Test internet -timeout 4 wget -q --spider http://cloogle.org || setbg-backup +timeout 4 wget -q --spider http://cloogle.org || setbg-backup || exit 1 stdbuf -i0 -o0 -e0 cloogle_stats.py | while read request do 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" - diff --git a/i3/bin/setbg-texample b/i3/bin/setbg-texample index 610c54f..c1968a5 100755 --- a/i3/bin/setbg-texample +++ b/i3/bin/setbg-texample @@ -8,7 +8,7 @@ FONT_SIZE=20 CURL="curl -s" # Test internet -timeout 4 wget -q --spider http://texample.net || setbg-backup +timeout 4 wget -q --spider http://texample.net || setbg-backup || exit 1 let "SCR_WIDTH -= 2 * $PADDING" let "SCR_WIDTH /= 2" @@ -20,7 +20,7 @@ echo "TeXample page: http://texample.net/tikz/examples/all/?page=$PAGE" # Fetch list of texamples cd /tmp -$CURL -o texample.html "http://texample.net/tikz/examples/all/?page=$PAGE" || setbg-backup +$CURL -o texample.html "http://texample.net/tikz/examples/all/?page=$PAGE" || setbg-backup || exit 1 EXAMPLES="$(grep '^<dl' texample.html | wc -l)" awk -v n=0 "BEGIN{srand();n=int(rand()*$EXAMPLES)+1} /^<dl/{l++} (l==n){print} END{}" texample.html | sponge texample.html @@ -35,6 +35,6 @@ $CURL "http://texample.net$PDF" | convert -size "x$SCR_HEIGHT" -density 300 - /t $CURL "http://texample.net$TEX" | sed -n '/\\begin{document}/,/\\end{document}/p' | pygmentize -l latex -O font_size=$FONT_SIZE -o /tmp/bg-src.png montage -geometry "+$PADDING+$PADDING" /tmp/bg-src.png /tmp/bg-page-0.png "/tmp/bg-$PAGE.png" -rm /tmp/bg-{page-*,src}.png || setbg-backup +rm /tmp/bg-{page-*,src}.png || setbg-backup || exit 1 feh -B white --bg-max "/tmp/bg-$PAGE.png" |