|
Tip: Changing wallpaper in xfce4: msg#00314xfce.user
Just installed xfce4 on my FreeBSD-box (5.2.1-p4) a couple of days ago after having used Gnome on both Linux and FreeBSD for at least a couple of years, and I haven't looked back once - sh*t this is /fast/ :-) Well, since it worked so nicely for me, here goes a tip back to the list, as a little «thank you» - how to automatically change the background wallpaper from time to time: * find list of pictures, put them in a file * randomize the list, pick out one of the files * put it in a specific place (where xfce already looks for a wallpaper) * run `xfdesktop` which automatically reloads background Current implementation: ------------------------------------------------------------------------- relevant crontab entry: * * * * * ~/bin/newdesktop ------------------------------------------------------------------------- ~/bin/newdesktop: #!/bin/sh find /files/pictures/wallpapers/ -type f>/tmp/piclist ~/bin/unsort2 /tmp/piclist cat /tmp/piclist | head -1 > /tmp/piclist2 cp `cat /tmp/piclist2` ~/files/tmp/wallpaper.img DISPLAY=:0.0 /usr/X11R6/bin/xfdesktop ------------------------------------------------------------------------- ~/bin/unsort2: #!/usr/bin/perl open(FP, "+<$ARGV[0]") or die "Usage: $0 <filename>"; my @arr = <FP>; seek FP, 0, SEEK_SET; srand; while (@arr) { print FP splice(@arr, rand @arr, 1); } close FP; ------------------------------------------------------------------------- There you go :-) The most hackish part is the last line of ~/bin/newdesktop - since setting the display limits its usefulness to single-user-systems running on :0.0 only. Guess I could extract that info as well somehow(?), but haven't bothered since I'm the only one using this machine :-) Hope someone can use this. Thanks again for a great wm, this rocks! :-) -- Jakob Breivik Grimstveit, http://www.grimstveit.no/jakob, +47 48298152 _______________________________________________ Xfce mailing list Xfce@xxxxxxxx http://lunar-linux.org/mailman/listinfo/xfce http://www.xfce.org |
|
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| Previous by Date: | mixer: 00314, Felipe Lopes |
|---|---|
| Next by Date: | Re: mixer RESOLVED: 00314, Felipe Lopes |
| Previous by Thread: | mixeri: 00314, Felipe Lopes |
| Next by Thread: | Re: Tip: Changing wallpaper in xfce4: 00314, Biju Chacko |
| Indexes: | [Date] [Thread] [Top] [All Lists] |
| News | FAQ | advertise |