<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
	<channel>
		<atom:link href="http://forum.xfce.org/extern.php?action=feed&amp;tid=2746&amp;type=rss" rel="self" type="application/rss+xml" />
		<title><![CDATA[Xfce Forums / How to get the current backdrop path?]]></title>
		<link>http://forum.xfce.org/viewtopic.php?id=2746</link>
		<description><![CDATA[The most recent posts in How to get the current backdrop path?.]]></description>
		<lastBuildDate>Sun, 03 Sep 2006 14:52:36 +0000</lastBuildDate>
		<generator>FluxBB</generator>
		<item>
			<title><![CDATA[Re: How to get the current backdrop path?]]></title>
			<link>http://forum.xfce.org/viewtopic.php?pid=11665#p11665</link>
			<description><![CDATA[<div class="quotebox"><cite>fahrenheit wrote:</cite><blockquote><div><p>thanks, that is an approach, should have thought of making the bash aproach also <img src="http://forum.xfce.org/img/smilies/smile.png" width="15" height="15" alt="smile" /></p><p>again many thanks</p></div></blockquote></div><p>I&#039;ve updated it a bit now you can use any backdrop.list made with xfdesktop, but you still need to use ~/.config/xfce4/deskimg as the image file.</p><div class="codebox"><pre><code>#!/bin/bash

#change this to any list made with xfdesktop
LIST=~/.config/xfce4/desktop/backdrops.list

FILES=`grep -c &quot;/&quot; $LIST`

RAND=$((RANDOM%$FILES+1))

IMGLINE=&quot;$(($RAND+1))p&quot;
LINK=`sed -n $IMGLINE $LIST`

rm ~/.config/xfce4/deskimg
link $LINK ~/.config/xfce4/deskimg

FILES_NEW=$(($FILES-1))

sed -i -e &quot;s/files\=$FILES/files\=$FILES_NEW/g&quot; $LIST

DELLINE=&quot;$(($RAND+1))d&quot;
sed -i -e $DELLINE $LIST

xfdesktop --reload</code></pre></div>]]></description>
			<author><![CDATA[dummy@example.com (TomE)]]></author>
			<pubDate>Sun, 03 Sep 2006 14:52:36 +0000</pubDate>
			<guid>http://forum.xfce.org/viewtopic.php?pid=11665#p11665</guid>
		</item>
		<item>
			<title><![CDATA[Re: How to get the current backdrop path?]]></title>
			<link>http://forum.xfce.org/viewtopic.php?pid=11637#p11637</link>
			<description><![CDATA[<p>thanks, that is an approach, should have thought of making the bash aproach also <img src="http://forum.xfce.org/img/smilies/smile.png" width="15" height="15" alt="smile" /></p><p>again many thanks</p>]]></description>
			<author><![CDATA[dummy@example.com (fahrenheit)]]></author>
			<pubDate>Fri, 01 Sep 2006 11:07:35 +0000</pubDate>
			<guid>http://forum.xfce.org/viewtopic.php?pid=11637#p11637</guid>
		</item>
		<item>
			<title><![CDATA[Re: How to get the current backdrop path?]]></title>
			<link>http://forum.xfce.org/viewtopic.php?pid=11625#p11625</link>
			<description><![CDATA[<p>xfdesktop can&#039;t do this, but bash can.<br />And I happen to be bored enough to wright the script.&#160; ;D<br />It read the wallpaper from a file, links it to &quot;~/.config/xfce4/deskimg&quot;, removes the wallpaper from the list and reloads xfdesktop.</p><div class="quotebox"><blockquote><div><p>#!/bin/bash</p><p>FILES=`head -n 1 ~/.config/xfce4/deskfiles | awk -F&quot;files=&quot; {&#039;print $2&#039;}`</p><p>RAND=$((RANDOM%$FILES+1))</p><p>IMGLINE=&quot;$(($RAND+1))p&quot;<br />LINK=`sed -n $IMGLINE ~/.config/xfce4/deskfiles`</p><p>rm ~/.config/xfce4/deskimg<br />link $LINK ~/.config/xfce4/deskimg</p><p>FILES_NEW=$(($FILES-1))</p><p>sed -i -e &quot;s/files\=$FILES/files\=$FILES_NEW/g&quot; ~/.config/xfce4/deskfiles</p><p>DELLINE=&quot;$(($RAND+1))d&quot;<br />sed -i -e $DELLINE ~/.config/xfce4/deskfiles</p><p>xfdesktop --reload</p></div></blockquote></div><p>You will need to make a file with all your wallpapers in call &quot;~/.config/xfce4/deskfiles&quot; it should look like this</p><div class="codebox"><pre><code>files=3
/path/to/wallpaper1.png
~/path/to/wallpaper2.png
/path/to/wallpaper3.jpg</code></pre></div><p>you can have as many wallpapers as you like just make sure that &quot;file=&quot; has the right number or it will not display all the wallpapers.<br />xfdesktop will need to be pointed at ~/.config/xfce4/deskimg</p>]]></description>
			<author><![CDATA[dummy@example.com (TomE)]]></author>
			<pubDate>Wed, 30 Aug 2006 21:57:12 +0000</pubDate>
			<guid>http://forum.xfce.org/viewtopic.php?pid=11625#p11625</guid>
		</item>
		<item>
			<title><![CDATA[Re: How to get the current backdrop path?]]></title>
			<link>http://forum.xfce.org/viewtopic.php?pid=11623#p11623</link>
			<description><![CDATA[<p>This is impossible for Xfce 4.0 en 4.2 AFAIK. I do not know whether this changed for 4.4</p>]]></description>
			<author><![CDATA[dummy@example.com (Pindakoe)]]></author>
			<pubDate>Wed, 30 Aug 2006 18:50:49 +0000</pubDate>
			<guid>http://forum.xfce.org/viewtopic.php?pid=11623#p11623</guid>
		</item>
		<item>
			<title><![CDATA[How to get the current backdrop path?]]></title>
			<link>http://forum.xfce.org/viewtopic.php?pid=11603#p11603</link>
			<description><![CDATA[<p>Hi all, i have a question: is there someway to get the current backdrop path from the backdrops list?</p><p>is it stored in some file or something?</p><p>my objective is to make a simple backdrops laucher, the randomizing part is done by xfdesktop -reload, i&#039;m missing the remove current backdrop from list and for that i need to get the current backdrop path, any ideias?</p><p>thanks in advance</p>]]></description>
			<author><![CDATA[dummy@example.com (fahrenheit)]]></author>
			<pubDate>Tue, 29 Aug 2006 04:00:41 +0000</pubDate>
			<guid>http://forum.xfce.org/viewtopic.php?pid=11603#p11603</guid>
		</item>
	</channel>
</rss>
