ZUFALL
Section: User Commands (1)
Updated: Dec 2007
NAME
zufall - a simple program to change the background periodically.
SYNOPSIS
zufall
[options] /path/to/imagedir-or-file [/path/to/imagedir-or-file]
DESCRIPTION
zufall
takes one or more directories with images as a parameter and sets a randomly
chosen image as background. If there is a border remaining, its color is the
average color of two corners of the image. This mostly fits the image very
well. It is also possible to execute a command when the image changes.
zufall
does not work if the root window is hidden by another program that
does not pick up changes on the root window.
OPTIONS
- -d, --delay=delay
-
number of seconds an image is shown (default 900)
- -s --maxscale=percent
-
maximum percent the image will be scaled (default 150)
- -b --minborder=pixel
-
ignore --maxscale if the remaining border would be
smaller than pixel (default 100)
- -m --minsize=kilobyte
-
only show images bigger than kilobyte. A size of 0 shows all images (default 0)
- -l --list=file
-
load list of images from file
-
*
the format of the file is one directory or file per line
-
*
file can also be a collection from gqview
-
*
if file is -, the list will be read from stdin
- -S --sequential
-
don't randomize the imagelist. This is useful with -l, or if you want to
see the images directory-wise.
- -c --command=command
-
execute command on every picture change. Within command
-
- %c
-
gets replaced with the background-color
- %i
-
gets replaced with the image-filename
- %w
-
gets replaced with the scaled width
- %h
-
gets replaced with the scaled height
- %%
-
gets replaced with %
Mind the quoting, the command is interpreted by the shell!
- -n --no-set
-
don't set the background
(but execute command if given)
- -p --passes=passes
-
exit after given number of images
- --help
-
display help and exit
- --version
-
output version information and exit
SIGNALS
- HUP
-
change background
- USR1
-
output some info.
Note
that the memory shown is only the memory that is used for the paths. There
is additional memory used by the X-server to hold the image.
- TERM
-
exit
GNOME
zufall
can not be used directly to set the background in gnome. This is because
nautilus covers the root window, so the background can not be seen.
Additionally nautilus will crash.
To randomize the background in Gnome, the wrapper script
zufall-gnome
exists, which uses
gconftool-2
to set the background. It takes the same parameters as
zufall.
Note
that the parameters affecting the size of the background image will not work
when using
zufall-gnome.
XFCE
If
zufall
is started within Xfce, xfdesktop will give up the desktop completely
(including desktop menus), but no background image will be shown. However, Xfce
is able to change to a random background that it gets from a file by itself.
With this mechanism
zufall
could be used to manage the picture changes, but there seems to be no good
solution to set the desktop color and size of the image with
zufall.
EXAMPLES
To try out what the -c option does:
zufall /path/to/images -n -c 'echo "picture: %i color: %c scaled res: %wx%h"'
To append the name of the current image to a file:
zufall /path/to/images -c 'echo "%i" >> /tmp/imagehistory'
To view random images in gqview:
zufall /path/to/images -n -c 'gqview -r "%i"'
To get a list of files from another program (GNU-find in this case)
find /path/to/images -type f -size +512k -not -wholename '/path/to/bad/images/*' | zufall -l -
TIP
Bind
pkill -1 zufall
to a key or put it in a launcher to change the
background with a keypress.
BUGS
- How portable is it? Please tell me if you can('t) get it to run under anything else than GNU/Linux or FreeBSD!
-
- Please send bug reports and feedback to the author.
-
SEE ALSO
gqview(1)
gconftool-2(1)
AUTHOR
Moritz Orbach
<zufall@apfelboymchen.homeunix.net>
Index
- NAME
-
- SYNOPSIS
-
- DESCRIPTION
-
- OPTIONS
-
- SIGNALS
-
- GNOME
-
- XFCE
-
- EXAMPLES
-
- TIP
-
- BUGS
-
- SEE ALSO
-
- AUTHOR
-