diff options
author | Camil Staps | 2017-12-15 14:43:37 +0100 |
---|---|---|
committer | Camil Staps | 2017-12-15 14:43:37 +0100 |
commit | d7ac1726781db42393676974e0dbf002998112f4 (patch) | |
tree | 654bc2acbe3a0093c90d2c6a6378055bf90ce556 /i3/bin/setbg-pgfplots | |
parent | Include .gitignore in stow (diff) |
Add setbg-backup with support for randomising a background image
Diffstat (limited to 'i3/bin/setbg-pgfplots')
-rwxr-xr-x | i3/bin/setbg-pgfplots | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/i3/bin/setbg-pgfplots b/i3/bin/setbg-pgfplots index 7343f35..1479844 100755 --- a/i3/bin/setbg-pgfplots +++ b/i3/bin/setbg-pgfplots @@ -12,6 +12,9 @@ let "SCR_HEIGHT -= 2 * $PADDING" NR=$RANDOM let "NR %= 524" +# Test internet +timeout 4 wget -q --spider http://cloogle.org || setbg-backup + 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 |