Fwd: different bg-images on different workspaces

Martin Dietze <[email protected]>
Newsgroups gmane.compw.window-managers.windowmaker.devel
Message-ID <CAC-dDpAzh6sHmCoLCKY_kPakcq937sCgJ5fmT6eJCgNZr4=6wA@mail.gmail.com>
Gerhard,

On 15 October 2015 at 16:50, Gerhard Wolfstieg <[email protected]> wrote:
> Since debian stretch you don't have wmakerconf anymore and wprefs
> doesn't provide it, I have to edit a file (probably
> ~/GNUstep/Defaults/WindowMaker) to get different background images per
> Workspace.
>  But I cannot find any documentation on this.

 a few months ago I opened a thread here on that same subject. I wrote a
little shell script that I run via .xinitrc - it selects background images
from a directory and changes them randomly - each workspace gets its own
image. You can send a SIGHUP to trigger immediate change of wallpapers. The
script has its limits (e.g. the number of workspaces, timeout for changing
wallpapers and the image directory are hard-coded), but it has been working
like a charm for me ever since I set it up. You may take a look at this
code:

#!/bin/sh

SLEEP_PID=0

trigger() {
  echo "Triggering new wallpapers..."
  if [ $SLEEP_PID -gt 0 ]; then
    CMD="kill $SLEEP_PID"
    echo "$CMD"
    $CMD
  fi
}

quit() {
  echo quit
  exit 0
}

trap trigger SIGHUP
trap quit SIGTERM

cd /usr/local/share/backgrounds/Variety/
while true; do
  w=0
  date
  find . | sed 's/^\.\///' | sort -R | while read i; do
    test -d "$i" && continue
    case "$i" in
      keep-ratio*)
        CMD="wmsetbg -f -w $w"
        ;;
      *)
        CMD="wmsetbg -w $w"
        ;;
    esac
    echo "$CMD $i"
    $CMD "$i"
    w=`expr $w + 1`
    if [ $w -gt 6 ]; then
      break
    fi
  done
  sleep 10m &
  SLEEP_PID=$!
  wait $SLEEP_PID
done

-- 
---------- [email protected] --/-- [email protected]
----
------------- / http://herbert.the-little-red-haired-girl.org /
-------------
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.