<?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=7836&amp;type=rss" rel="self" type="application/rss+xml" />
		<title><![CDATA[Xfce Forums / Workaround: Keep the same wallpaper on the same screen when undocking]]></title>
		<link>http://forum.xfce.org/viewtopic.php?id=7836</link>
		<description><![CDATA[The most recent posts in Workaround: Keep the same wallpaper on the same screen when undocking.]]></description>
		<lastBuildDate>Thu, 21 Feb 2013 00:20:57 +0000</lastBuildDate>
		<generator>FluxBB</generator>
		<item>
			<title><![CDATA[Workaround: Keep the same wallpaper on the same screen when undocking]]></title>
			<link>http://forum.xfce.org/viewtopic.php?pid=28843#p28843</link>
			<description><![CDATA[<p>So I&#039;ve been running into the minor annoyance of XFCE always using the wallpaper from the monitor on the left screen after I unplug my secondary monitor. Not sure if anyone else runs into this. Just to clarify:<br />(pretend the pipe is the border between screens)&#160; &#160; <br />While docked: Wallpaper A (VGA-1) | Wallpaper B (LVDS)<br />Undocked: Wallpaper A (LVDS)<br />I would expect wallpaper B to persist on the laptop display regardless of whether the second monitor is hooked up or not. </p><p>Since I use a script to toggle my monitor off and on using a hotkey I made a few modifications to it so that you can specify the wallpaper setup while docked or undocked. You could also have completely different wallpapers while mobile if you don&#039;t want to be seen in public with your My Little Pony wallpaper.</p><p>(I still use a CRT as a second monitor, don&#039;t make fun of me) </p><div class="codebox"><pre><code>#!/bin/bash
#Absolute path seems to be required for some reason. 
location=&quot;/home/jason/.config/xfce4&quot;
function xfset {
        cat $location/$1 | while read line; do
                variable=`echo $line |awk &#039;{print $1}&#039;`
                setting=`echo $line |awk &#039;{print $2}&#039;`
                xfconf-query -c xfce4-desktop -p $variable --create -s $setting
        done
}
current=`xrandr |grep current |awk &#039;{print $8 $10}&#039;`
if [ $current == &#039;1366768,&#039; ]
then
#Going to Dual
        xfconf-query -c xfce4-desktop -l -v|grep backdrop&gt;$location/single.set
        xrandr --output LVDS --mode 1366x768 --pos 1600x432 --rotate normal --output CRT1 --mode 1600x1200 --pos 0x0 --rotate normal --output DFP1 --off;
        xfset dual.set
else
#going to single
        xfconf-query -c xfce4-desktop -l -v|grep backdrop&gt;$location/dual.set
        xrandr --output LVDS --mode 1366x768 --rotate normal --output CRT1 --off --output DFP1 --off
        xfce4-panel -r
        xfset single.set
fi</code></pre></div><p>Let me know if you have any feedback or found this useful. I&#039;m curious if this is a problem anyone else has. Also let me know if my script is going about this a dumb way or you have suggestions to change it.</p><p>EDIT: Re-made the script to use&#160; xfconf-query per suggestion from digirium on the Arch forums.</p>]]></description>
			<author><![CDATA[dummy@example.com (jasonvw)]]></author>
			<pubDate>Thu, 21 Feb 2013 00:20:57 +0000</pubDate>
			<guid>http://forum.xfce.org/viewtopic.php?pid=28843#p28843</guid>
		</item>
	</channel>
</rss>
