Permalink
Browse files

Add script to check interface lift for the latest wallpaper.

Add to your bashrc to run at every boot!
  • Loading branch information...
1 parent 3d7d2a0 commit 48fe704245535fa89e618104067a6df2939848eb @lithid committed Dec 28, 2011
Showing with 21 additions and 0 deletions.
  1. +21 −0 Linux/sync_interface
View
@@ -0,0 +1,21 @@
+#!/bin/bash
+TMP_FILE="/tmp/index.html"
+URL="http://interfacelift.com/wallpaper/downloads/date/widescreen/1680x1050/"
+AGENT="Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US; rv:1.9.2.3) Gecko/20100401 Firefox/3.6.3 (.NET CLR 3.5.30729)"
+
+echo "Setting up the latest wallpaper from interfacelift.com!"
+wget -P /tmp -nc -U "$AGENT" $URL &>> /dev/null
+
+WALLPAPER=$(grep "/img_NEW/button_download.png" $TMP_FILE |head -n1 |cut -d\" -f2)
+wget -P $HOME -nc -U "$AGENT" http://interfacelift.com/$WALLPAPER &>> /dev/null
+
+NAME=$(echo $WALLPAPER |cut -d/ -f4)
+mv $HOME/$NAME $HOME/Wallpaper.jpg
+
+gsettings set org.gnome.desktop.background picture-uri file://$HOME/Wallpaper.jpg
+
+if [ -f $TMP_FILE ]; then
+ rm $TMP_FILE
+fi
+
+exit 0

0 comments on commit 48fe704

Please sign in to comment.