random 1x.com wallpaper with either feh or xv
Date: May 11, 2010
Categories: Script
EDIT: Sep-28-2010 : as of a while ago 1x.com changed how their random images are served so this script no longer works. i’ll see if i can use a different site as pointed out in the comments.
so after creating the evilwm random wallpaper script i decided that i wanted to use the fixed resolution images from 1x.com.
here is the script i made up with an explanation below:
#!/bin/bash
if [ -d /tmp/jpg/ ];
then
echo dir exists
else
mkdir /tmp/jpg/
fi
if [ -f /tmp/jpg/1x.txt ];
then
echo file exists
else
touch /tmp/jpg/1x.txt
fi
while :;do
FILENAME=`cat /tmp/jpg/1x.txt | egrep random | egrep main | egrep jpg | cut -d\" -f32 | cut -d= -f2 | cut -d\& -f1`
curl --silent http://1x.com/photo/random/ > /tmp/jpg/1x.txt
wget http://imghost.1x.com/${FILENAME} -O /tmp/jpg/${FILENAME} > /dev/null 2>&1
#/usr/bin/feh --bg-center /tmp/jpg/${FILENAME}
#xv -quit -root -rmode 5 -max /tmp/jpg/${FILENAME}
sleep 60
done
all this script does is gets the html from http://1x.com/photo/random/, cuts it accordingly to grab the jpg name and then wget’s the proper jpg.
make sure to uncomment either the feh line or xv line according to tastes.
you can also change the sleep interval if you want to make it shorter or longer.
Hello, 1x.com is a dictatorial site ! you should use photo.net instead !!!
They are using a very insane way of selecting photos and the way they “big brother” the comments and forum is an indication of how insane they are !!
boycott this site and use pbase, fotocommunity, fotoblur etc. isntead !
AL
cool – ill start working on a script to use photo.net. thanks for the recommendation.