Re: Rotating desktop wallpapers

Had some time today and found out that the culprit of my flickering issue is not nitrogen or feh at all, but xcompmgr. This is unfortunate as xcompmgr works well in all other respects. I would run cairo but it has issues maximizing chromium and terminator(does not draw the window maximized, leaves strips of the window undrawn), although that could be a bug in openbox/python/chromium/etc. I'm not sure I'll delve much further into this issue, but if anyone else happens upon a nice lightweight compositor that doesn't flicker on a root image redraw or break window drawing on maximized windows, let me know.

Good luck!

Re: Rotating desktop wallpapers

I also have some focus-related issues with xcompmgr.  For example, I use the XMonad tiling window manager, and when I turn xcompmgr on, floating windows always start out on the bottom instead of on top of all other windows.  Does anyone have an xmonad-related or xcompmgr-related solution for this?

Check out Musik - an easy-to-use text-to-music converter!
Join SpiderOak using this link and get an extra 1 GB free: https://spideroak.com/download/referral … 660e787ff1

Re: Rotating desktop wallpapers

Which, if any of these scripts, are still valid for #! 10 - OpenBox and or #! 10 Xfce?

Last edited by Sector11 (2011-06-14 17:16:11)

Re: Rotating desktop wallpapers

I know that my code (post #46) works (I developed it on Statler Openbox), not sure about any of the others.

Check out Musik - an easy-to-use text-to-music converter!
Join SpiderOak using this link and get an extra 1 GB free: https://spideroak.com/download/referral … 660e787ff1

Re: Rotating desktop wallpapers

Sector11 wrote:

Which, if any of these scripts, are still valid for #! 10 - OpenBox and or #! 10 Xfce?

All of mine are still good. They're for the most part BASH scripts, thus they remain good.

rippin

Re: Rotating desktop wallpapers

slashtact wrote:

I would run cairo but it has issues maximizing chromium and terminator(does not draw the window maximized, leaves strips of the window undrawn), although that could be a bug in openbox/python/chromium/etc.

I had this problem with cairo and terminator, I solved it by making a seperate hotkey for starting terminator in fullscreen mode with the -f switch. Even before I did that, I just had to un-full screen it and re-fullscreen it to make the window cover the other screen. Not a huge deal but it was somewhat annoying having to press F11 3 times to get a window to fullscreen properly. I love cairo though, so I forgive it lol

Re: Rotating desktop wallpapers

@ chaanakya & rippin

Thanks guys .. will look at both.

58

Re: Rotating desktop wallpapers

I have a similar script (that only works for Xfce):

#!/bin/bash

#check if we are under xfce
for foo in  `ps aux | grep xfdesktop | grep -v grep | awk '{print $11}'`;
do
  if [ $foo == "xfdesktop" ];
  then
    #reload xfdesktop
    export DISPLAY=:0
    xfdesktop --reload
  fi;
done;

I put an executable copy in /etc/cron.hourly, but it's not being run automatically. Is there something else that I need to do? I thought that was all there was to it in Debian...

Re: Rotating desktop wallpapers

Updated version of my original script (it's a little neater and is easier to customize/tweak):

#!/bin/bash
## Set the WALLPAPERS variable to the root folder of your images (like the Pictures folder for instance).  This script will automatically look in all subfolders.

WALLPAPERS="/home/chiraag/Pictures/backgrounds/rotate"

## Reformats the path for use with sed

WALLMOD=$(echo $WALLPAPERS | sed -e 's/\//\\\//g')

## Finds all jpg and png files in the current folder and subfolders.  You can add more file types by copying one of the statements below and editing the part after -name.

find $WALLPAPERS -type f -name "*.jpg" | sed -e "s/$WALLMOD//" | sed -e 's/ /\\ /g'> $WALLPAPERS/files.txt
find $WALLPAPERS -type f -name "*.png" | sed -e "s/$WALLMOD//" | sed -e 's/ /\\ /g'>> $WALLPAPERS/files.txt

## ----------------------------------------------------------------- ##

## You should not need to modify anything after this point

RANGE=`wc -l $WALLPAPERS/files.txt | sed -e "s/$WALLMOD\/files.txt//"`
let "range = $RANGE"
let "number = $RANDOM"
let LASTNUM="`cat $WALLPAPERS/.last` + $number"
let "number = $LASTNUM % $RANGE"
echo $number > $WALLPAPERS/.last
FILE=$(sed -n "$number p" $WALLPAPERS/files.txt)
nitrogen --set-zoom-fill --save $WALLPAPERS/$FILE
Check out Musik - an easy-to-use text-to-music converter!
Join SpiderOak using this link and get an extra 1 GB free: https://spideroak.com/download/referral … 660e787ff1

Re: Rotating desktop wallpapers

I know this is kinda old but here is a small script I wrote. The only sanity checks are that it rechecks the folder each time so make sure you pass a valid path (no spaces).

#!/usr/bin/perl
#
# wallpaper slideshow
#

### Validate usage ###
if ($#ARGV != 1) {
   print "usage: wallpaper_slideshow /path/to/wallpapers/folder delay_in_seconds\n";
   exit;
}

### Store params ###
$folder = $ARGV[0];
$delay = $ARGV[1];

### Main ###
$index=0;
while (1) {
   ### Get wallpapers ###
   $images = `ls $folder`;
   @wallpapers = split(/\n/, $images);
   $index %= @wallpapers;

   ### Set wallpaper ###
   `nitrogen --set-auto --save $folder$wallpapers[$index]`;

   ### Increment and sleep ###
   $index++;
   `sleep $delay`;
}

I then added this to my autostart.sh:

# Autostart wallpaper slideshow
(sleep 60s && ~/scripts/wallpaper_slideshow ~/pics/Wallpaper_Slideshow/ 300) &