<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>DevSlash &#187; Scripts</title>
	<atom:link href="http://devslash.org/category/scripts/feed/" rel="self" type="application/rss+xml" />
	<link>http://devslash.org</link>
	<description>Gerard's Professional Blog</description>
	<lastBuildDate>Tue, 06 Feb 2007 23:02:26 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Random desktop background</title>
		<link>http://devslash.org/2006/04/16/random-desktop-background/</link>
		<comments>http://devslash.org/2006/04/16/random-desktop-background/#comments</comments>
		<pubDate>Sun, 16 Apr 2006 21:53:24 +0000</pubDate>
		<dc:creator>gerard</dc:creator>
				<category><![CDATA[Scripts]]></category>

		<guid isPermaLink="false">http://devslash.org/?p=9</guid>
		<description><![CDATA[Well, I have a directory with a bunch of backgrounds, and I like to have it change pretty often because I get bored with the scenery  . So I figured I would make a script to randomly select an image and change the background. Then I added it to the crontab so now I [...]]]></description>
			<content:encoded><![CDATA[<p>Well, I have a directory with a bunch of backgrounds, and I like to have it change pretty often because I get bored with the scenery <img src='http://devslash.org/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> . So I figured I would make a script to randomly select an image and change the background. Then I added it to the crontab so now I have a different background every hour.</p>
<p>All you need is to change /home/gerard/wpaper with whatever your directory is.</p>
<blockquote><p>#/bin/bash<br />
imagedir=/home/gerard/wpaper<br />
count=`ls $imagedir|wc -l`<br />
let &#8220;pick = $RANDOM % $count&#8221;<br />
let &#8220;pick += 1&#8243;<br />
image=`ls $imagedir|sed -n &#8220;$pick&#8221;p`<br />
Esetroot -scale $imagedir/$image</p></blockquote>
]]></content:encoded>
			<wfw:commentRss>http://devslash.org/2006/04/16/random-desktop-background/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>
