Xfce Forum

Sub domains

You are not logged in.

#1 2013-02-21 00:20:57

Registered: 2013-02-20
Posts: 1

Workaround: Keep the same wallpaper on the same screen when undocking

So I'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:
(pretend the pipe is the border between screens)   
While docked: Wallpaper A (VGA-1) | Wallpaper B (LVDS)
Undocked: Wallpaper A (LVDS)
I would expect wallpaper B to persist on the laptop display regardless of whether the second monitor is hooked up or not.

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't want to be seen in public with your My Little Pony wallpaper.

(I still use a CRT as a second monitor, don't make fun of me)

#Absolute path seems to be required for some reason. 
function xfset {
        cat $location/$1 | while read line; do
                variable=`echo $line |awk '{print $1}'`
                setting=`echo $line |awk '{print $2}'`
                xfconf-query -c xfce4-desktop -p $variable --create -s $setting
current=`xrandr |grep current |awk '{print $8 $10}'`
if [ $current == '1366768,' ]
#Going to Dual
        xfconf-query -c xfce4-desktop -l -v|grep backdrop>$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
#going to single
        xfconf-query -c xfce4-desktop -l -v|grep backdrop>$location/dual.set
        xrandr --output LVDS --mode 1366x768 --rotate normal --output CRT1 --off --output DFP1 --off
        xfce4-panel -r
        xfset single.set

Let me know if you have any feedback or found this useful. I'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.

EDIT: Re-made the script to use  xfconf-query per suggestion from digirium on the Arch forums.

Last edited by jasonvw (2013-02-21 09:55:03)


Board footer

Powered by FluxBB