DSL Tips and Tricks :: set wallpaper



It seems xrsi doesn't mind if the wallpaper doesn't have an extension.
This means it's fairly easy to manage your wallpaper.

-----------------
Create this file which will set the new default wallpaper and load it;
/home/dsl/.dfmdesk/wallpaper/set_wallpaper
Quote
#!/bin/bash
cp $1 /home/dsl/.dfmdesk/wallpaper/default
xsri --scale-width=100 --scale-height=100 /home/dsl/.dfmdesk/wallpaper/default

In /home/dsl/.fluxbox.inc (or whatever window manager .inc file) add
this line at the bottom to load the wallpaper at startup;
Quote
xsri --scale-width=100 --scale-height=100 home/dsl/.dfmdesk/wallpaper/default

You can now drag/drop pictures into the set_wallpaper script in your desktop wallpaper folder to load and set the default wallpaper.

In dfm, the wallpaper might disappear if you press 'esc' on a blank desktop or 'update' on an icon. You can create an additional script to reload it;
/home/dsl/.dfmdesk/wallpaper/reload_wallpaper;
Quote
#!/bin/bash
pkill dfm && dfm
sleep 1
xsri --scale-width=100 --scale-height=100 /home/dsl/.dfmdesk/wallpaper/default

-----------------
If you use emelfm, you can also add this user-command e.g "set wallpaper"
Quote
cp %f /home/dsl/.dfmdesk/wallpaper/default


-----------------

I wonder why you need to copy the file?
This single line should do as well as the two you have:
xsri --scale-width=100 --scale-height=100 $1

In any case, that's a handy tip. thanks

Quote (mikshaw @ Dec. 01 2007,23:25)
I wonder why you need to copy the file?

the file might be from a temporary source,
(and the name needs to be the same for reloading at reboot).

That makes sense.

In situations that reuse the same file, though, I've found that using an environment variable for that file can be very useful. In that way you can prevent the need to edit all scripts that use that file if you happen to change the file path (using the scripts on a system without dfm, for example), and at the same time probably cut the size of your scripts by several bytes.

So using this scheme every window manager has the same wallpaper?
Next Page...
original here.