diff options
l---------[-rwxr-xr-x] | bin/setbg | 23 | ||||
-rwxr-xr-x | bin/setbg-pgfplots | 22 | ||||
-rwxr-xr-x | bin/setbg-texample (renamed from bin/setbg2) | 0 | ||||
-rw-r--r-- | system/xsessionrc.symlink | 2 |
4 files changed, 24 insertions, 23 deletions
diff --git a/bin/setbg b/bin/setbg index 7343f35..d445e5c 100755..120000 --- a/bin/setbg +++ b/bin/setbg @@ -1,22 +1 @@ -#!/bin/bash - -SCR_WIDTH=1980 -SCR_HEIGHT=1080 -PADDING=50 -FONT_SIZE=20 - -let "SCR_WIDTH -= 2 * $PADDING" -let "SCR_WIDTH /= 2" -let "SCR_HEIGHT -= 2 * $PADDING" - -NR=$RANDOM -let "NR %= 524" - -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 - -montage -geometry "+$PADDING+$PADDING" /tmp/bg-src.png /tmp/bg.png "/tmp/bg-$NR.png" -rm /tmp/bg{,-src}.png - -feh -B white --bg-max "/tmp/bg-$NR.png" - +setbg-texample
\ No newline at end of file diff --git a/bin/setbg-pgfplots b/bin/setbg-pgfplots new file mode 100755 index 0000000..7343f35 --- /dev/null +++ b/bin/setbg-pgfplots @@ -0,0 +1,22 @@ +#!/bin/bash + +SCR_WIDTH=1980 +SCR_HEIGHT=1080 +PADDING=50 +FONT_SIZE=20 + +let "SCR_WIDTH -= 2 * $PADDING" +let "SCR_WIDTH /= 2" +let "SCR_HEIGHT -= 2 * $PADDING" + +NR=$RANDOM +let "NR %= 524" + +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 + +montage -geometry "+$PADDING+$PADDING" /tmp/bg-src.png /tmp/bg.png "/tmp/bg-$NR.png" +rm /tmp/bg{,-src}.png + +feh -B white --bg-max "/tmp/bg-$NR.png" + diff --git a/bin/setbg2 b/bin/setbg-texample index 3721944..3721944 100755 --- a/bin/setbg2 +++ b/bin/setbg-texample diff --git a/system/xsessionrc.symlink b/system/xsessionrc.symlink index c6984e8..5b20582 100644 --- a/system/xsessionrc.symlink +++ b/system/xsessionrc.symlink @@ -8,7 +8,7 @@ export DE='gnome' nohup gnome-settings-daemon -r & >/dev/null # Background image -setbg2 +setbg & # GPG agent envfile="$HOME/.gnupg/gpg-agent.env" |