wallpaper.cfg

Package: WA2L/WinTools 1.2.08
Section: Configuration Files (4)
Updated: 09 March 2021
Index Return to Main Contents

 

NAME

wallpaper.cfg - configuration file for wallpaper

 

SYNOPSIS

WA2LWinTools/etc/wallpaper.cfg

WA2LWinTools/etc/wallpaper.domainname.cfg

WA2LWinTools/etc/wallpaper.hostname.cfg

 

AVAILABILITY

WA2L/WinTools

 

DESCRIPTION

This is the configuration file for the wallpaper command.

The configuration file containing the domainname has preference over the wallpaper.cfg file, if it exists on the related host.

The configuration file containing the hostname has preference over the wallpaper.domainname.cfg file, if it exists on the related host.

The domainname is resolved from the %DOMAINNAME% and the hostname from the %COMPUTERNAME% environment variables.

 

FILEFORMAT

Rows starting with a # are considered as comments.

The settings for the wallpaper command have to follow the section with the name [WALLPAPER] .

The file format is OPTION=VALUE

Between the OPTION , the = and the VALUE are no spaces.

You can comment out any OPTION or completely remove the related setting line to use the default settings.

 

OPTIONS

WALLPAPER_HTML
HTML file that is used to generate the image file that is set as desktop wallpaper. If a space separated list of files is given, wallpaper picks randomly a file of the list to be used to set as desktop wallpaper.

Example: WALLPAPER_HTML=shark

Example: WALLPAPER_HTML=shark sharkfin rega

Default: WALLPAPER_HTML=wallpaper

WALLPAPER_TIMEOUT
timeout in milliseconds to allow the wallpaper html page to load all contents. If you experience for instance the webcams wallpaper to show only the background, this timeout should be increased to allow sufficient time to download the webcam image.

Example: WALLPAPER_TIMEOUT=20000

Default: WALLPAPER_TIMEOUT=15000

WALLPAPER_PICK
method to pick the next wallpaper (RANDOM , ROUNDROBIN), if a list of wallpapers is specified in WALLPAPER_HTML.

Example: WALLPAPER_PICK=RANDOM

Default: WALLPAPER_PICK=ROUNDROBIN

WALLPAPER_WIDTH
width of the wallpaper image in pixels.

To set the width based on the actual monitor with the variable %MONITOR_WIDTH_MONITORNUMBER% can be used. Also formulas are allowed, as:

WALLPAPER_WIDTH = ( %MONITOR_WIDTH_1% + %MONITOR_WIDTH_2% ) * 1.1

The result of a calculation is always rounded to the nearest integer value.

See section NUMERIC FUNCTIONS for an overview of functions available in formulas.

Example: WALLPAPER_WIDTH=%MONITOR_WIDTH_1%

Example: WALLPAPER_WIDTH=1600

Default: WALLPAPER_WIDTH=width of primary monitor

WALLPAPER_HEIGHT
height of the wallpaper image in pixels.

To set the height based on the actual monitor with the variable %MONITOR_HEIGHT_MONITORNUMBER% can be used. Also formulas are allowed, as:

WALLPAPER_HEIGHT = %MONITOR_HEIGHT_1% + 40

WALLPAPER_HEIGHT = max(%MONITOR_HEIGHT_1%,%MONITOR_HEIGHT_2%) + 40

WALLPAPER_HEIGHT = max(max(%MONITOR_HEIGHT_1%,%MONITOR_HEIGHT_2%),%MONITOR_HEIGHT_3%)) + 40

The result of a calculation is always rounded to the nearest integer value.

See section NUMERIC FUNCTIONS for an overview of functions available in formulas.

Example: WALLPAPER_HEIGHT=%MONITOR_HEIGHT_1%

Example: WALLPAPER_HEIGHT=1200

Default: WALLPAPER_HEIGHT=height of primary monitor

WALLPAPER_ALIGNMENT
alignment of the image on the desktop. Possible alignment settings are: center, stretch, tile .

Example: WALLPAPER_ALIGNMENT=center

Default: WALLPAPER_ALIGNMENT=center

WALLPAPER_SET
set the generated image as desktop wallpaper (True , False).

Example: WALLPAPER_SET=False

Default: WALLPAPER_SET=True

WALLPAPER_INTERVAL
set the wallpaper update interval in minutes. If the interval is set to 0 no automatic update occurs.

Example: WALLPAPER_INTERVAL=5

Default: WALLPAPER_INTERVAL=0

WALLPAPER_GENERATE
generate the wallpaper image (True , False).

Example: WALLPAPER_GENERATE=False

Default: WALLPAPER_GENERATE=True

WALLPAPER_CLEANUP
cleanup (=remove) the generated wallpaper image (True = yes, False = no) after if has been set as background image.

If you experience the wallpaper to disappear some time after it is set thru wallpaper, set WALLPAPER_CLEANUP=False .

Example: WALLPAPER_CLEANUP=True

Default: WALLPAPER_CLEANUP=False

WALLPAPER_FORMAT
format of the generated wallpaper image. Possible output format settings are: bmp, png, jpeg, tiff . If the setting WALLPAPER_SET is set to True the format is set to bmp automatically despite the settings made in WALLPAPER_FORMAT .

Example: WALLPAPER_FORMAT=bmp

Default: WALLPAPER_FORMAT=bmp

WALLPAPER_TMPDIR
temporary directory to be written to if the default is not suitable. The system environment variables %TMP% and %TEMP% can be used within the WALLPAPER_TMPDIR setting. If the defined temporary directory does not exist wallpaper uses the default setting.

Example: WALLPAPER_TMPDIR=%TMP%

Default: WALLPAPER_TMPDIR=var\cache\wallpaper

WALLPAPER_BGCOLOR
Set the desktop background to the solid RGB ( RED,GREEN,BLUE ) color.

This setting should match the background color of the selected wallpaper to generate the impression as if the wallpaper fills always the whole screen without showing a black frame when using an external monitor having a bigger resolution as the notebook screen.

The background color of wallpapers based on lib/wallpaper.js will be automatically set to the color defined in the WALLPAPER_BGCOLOR setting.

When the setting is left empty, the desktop background is not changed.

Example: WALLPAPER_BGCOLOR=

Example: WALLPAPER_BGCOLOR=33,40,130

Default: WALLPAPER_BGCOLOR=0,118,163

WALLPAPER_PING
ping a web server to check internet connection.

If the web server defined in WEBSERVER_PING_URL cannot be reached the wallpaper is not updated.

It only makes sense to set WEBSERVER_PING_URL=True when your wallpaper uses dynamic content from the internet, as when you use WALLPAPER_HTML=webcams , WALLPAPER_HTML=porthole or WALLPAPER_HTML=window distributed with WA2L/WinTools.

Example: WALLPAPER_PING=True

Default: WALLPAPER_PING=False

WALLPAPER_PING_URL
URL to be checked for availability.

If this URL cannot be reached the wallpaper is not updated. This setting has only effect, if WALLPAPER_PING=True has been set.

Depending on the setup of your network, you might have to set a proxy in proxy.cfg to reach certain web servers.

Mostly a Intranet WALLPAPER_PING_URL is sufficient to verify network connection - this to avoid to set a proxy.

Example: WALLPAPER_PING_URL=http://www.yahoo.com

Default: WALLPAPER_PING_URL=http://www.google.com

WALLPAPER_GALLERY
List of image files to be shown in random slideshow gallery.

The * wildcard can be used to select multiple files and/or directories to be included.

The variables %INSTALLDRIVE% and %INSTALLDIR% can also be used to be drive letter independent.

Example: WALLPAPER_GALLERY="%INSTALLDRIVE%:\images\*.jpg" "%INSTALLDRIVE%:\fotos\*\*.jpg"

Example: WALLPAPER_GALLERY="%INSTALLDIR%\var\wallpaper\mygallery\*.jpg"

Default: WALLPAPER_GALLERY="%INSTALLDIR%\var\wallpaper\gallery\*.jpg"

 

NUMERIC FUNCTIONS

beside the normal mathematical operators + - * / % and the grouping using parentheses (expr) the following numeric functions can be used in the WALLPAPER_WIDTH and WALLPAPER_HEIGHT settings:

atan2(y,x)
Return the arctangent of y / x in radians.

cos(expr)
Return the cosine of expr, which is in radians.

exp(expr)
The exponential function.

int(expr)
Truncate to integer.

log(expr)
The natural logarithm function.

rand()
Return a random number N, between 0 and 1, such that 0 < N < 1.

sin(expr)
Return the sine of expr, which is in radians.

sqrt(expr)
Return the square root of expr.

max(m,n)
Return maximum of m and n.

min(m,n)
Return minimum of m and n.

floor(a)
Return floor value of a.

ceil(a)
Return ceiling value of a.

round(a,n)
Return rounded number of a to n number of digits.

div(x,y)
Return integer division x / y .

mod(x,y)
Return modulo operation x % y .

sign(x)
Signum function of x.

Which of those functions you can really use in the context of calculating the width and height of the wallpaper image lays in your hands...

 

EXAMPLES

1) Simple example configuration file

#
# WA2LWinTools/wallpaper.cfg - Configuration file for wallpaper
#
# [00] 24.05.2011 CWa   Initial Version
# [09] 06.12.2014 CWa   ++
#

[WALLPAPER]

WALLPAPER_HTML=sharkfin
WALLPAPER_WIDTH=1386
WALLPAPER_HEIGHT=768
WALLPAPER_ALIGNMENT=center

2) Simpler example configuration file but with multiple wallpapers

#
# WA2LWinTools/wallpaper.cfg - Configuration file for wallpaper
#
# [00] 24.05.2011 CWa   Initial Version
# [10] 28.11.2016 CWa   ++
#

[WALLPAPER]

WALLPAPER_HTML=wallpaper rega shark sharkfin whale gallery full blank

 

SEE ALSO

wintoolsintro(1), config(1m), proxy(3), proxy.cfg(4), wallpaper(1)

 

NOTES

-

 

BUGS

If you run wallpaper within a DropBox folder you must define the WALLPAPER_TMPDIR setting in the etc/wallpaper.cfg setting outside of DropBox folders ( e.g: WALLPAPER_TMPDIR=%TMP% ).

 

AUTHOR

wallpaper.cfg was developed by Christian Walther. Send suggestions and bug reports to wa2l@users.sourceforge.net .

 

COPYRIGHT

Copyright © 2021 Christian Walther

This is free software; see WA2LWinTools/man/COPYING for copying conditions. There is ABSOLUTELY NO WARRANTY; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.


 

Index

NAME
SYNOPSIS
AVAILABILITY
DESCRIPTION
FILEFORMAT
OPTIONS
NUMERIC FUNCTIONS
EXAMPLES
SEE ALSO
NOTES
BUGS
AUTHOR
COPYRIGHT

This document was created by man2html using the manual pages.
Time: 16:33:15 GMT, September 14, 2024