Created
March 12, 2011 07:50
-
-
Save chaoxu/867123 to your computer and use it in GitHub Desktop.
randomly pick 2 images, combine them, and set it as desktop
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
d="$HOME/wallpaper" | |
o=`mktemp` | |
c=`ls $d | grep -iE "(.jpg|.gif|.png)" | sort -R | head -2` | |
if [ $# -gt 0 ] ; then | |
a=$1 | |
else | |
a=`echo $c | cut -d " " -f 1` | |
fi | |
if [ $# -gt 1 ] ; then | |
b=$2 | |
else | |
b=`echo $c | cut -d " " -f 2` | |
fi | |
montage $d/$a $d/$b -tile 2x1 -geometry 1920x1080 $o | |
feh --bg-tile $o | |
rm $o |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment