wallrnd

A configurable generator of random abstract time-aware wallpapers

License: MIT

crates.io API


Direct dependencies

| dependency | crate | docs | |-------------------|------------------------------------|---------------------------------------| | serde | | API | | serde_derive | | API | | rand | | API | | chrono | | API | | delaunator | | API | | toml | | API | | resvg | | API | | usvg | | API | | wallpaper_rs | | API |


This project aims to provide a utility for generating random abstract wallpapers.

Until recently it could only generate the images, not actually set them as wallpapers. This limitation is being addressed.

A bash script to automatically change wallpaper is provided, and has been tested on Ubuntu 20.04 (Focal Fossa). Portability of this script is outside of the scope of this project (the image generator however should be portable to any OS), but scripts that work for other shells/distros are welcome.


diff ! Warning: Breaking change ! Since the addition of command line options, your launch script may be broken for the latest version ! You can either download a version of wallrnd earlier than Jul 15, 2020, or see the new format ! in setup/set-wallpaper (previous script moved to setup/set-wallpaper-obsolete) ! To update your script, all you need is to replace - wallrnd /path/to/image.svg /path/to/config.toml ! with + wallrnd --image /path/to/image.svg --config /path/to/config.toml

diff ! Warning: Breaking change ! Format for themes weight has changed to be more versatile ! Old format: - theme = [["<C1>", <W1>], ["<C2>", <W2>], ...] ! New format: + theme = ["<C1> x<W1>", "<C2> x<W2>", ...] ! To update your configuration file, run @@ perl -pi -e 's/\[\"([a-zA-Z0-9_]*)\", *([0-9]+)\]/\"$1 x$2\"/g' setup/wallrnd.toml @@

Features and licensing

While the code in this crate is licensed under the MIT license, the binary target includes (purely for user convenience) dependencies that have more restrictive licenses.

resvg and usvg require the MPL 2.0 license and pull in some other dependencies under the BSD 3-clause.

wallpaper_rs is licensed under GPL 3.0

The features provided by these crates are purely optional. The different features available are explained in more detail in the Advanced setup section.

Using the make-png feature requires MPL 2.0 or a compatible license.

Using the set-wallpaper feature requires GPL 3.0 or a compatible license.

Using both requires GPL 3.0 at least.

The inclusion of MPL- and GPL-licensed crates as dependencies of this crate licensed under MIT does not grant to anyone the right to distribute executables that were compiled using the corresponding feature flags under non-GPL-compatible licenses. Any derivative work that does not include these flags can safely be provided under the MIT license.

It is not recommended for any crates dependent on this one to use the feature flags, as the functionality obtained from the GPL dependencies is not reexported by wallrnd and thus adds needless dependencies.

Recommended setup (executable wallrnd)

Thanks to nice giving the program a very low priority, it can run in the background without issue.

It will soon be possible to achieve the same without nice.

Recommended setup (executable prototype/prototype.py)

wallrnd is a more developed product than this, but if you still want to use the prototype it is possible.

Be warned that performance is a lot worse and that this version is far less configurable.

psutil is used to abort the process if CPU usage is already high.

Advanced setup

You may be interested in these other setup methods if - your OS does not support setting an SVG image as wallpaper - you do not wish to use GPL- or MPL-licensed products - your OS is not included in this list of supported environments - you want custom functionality such as aborting the script when running on battery - you want to build from source

Installation:

Configuration

Automation


Alternative tools

Online

Scripts

Apps

Examples

As a random generator of wallpaper ought to provide images of consistent quality, the following sample of images is unfiltered*. All were created with a configuration file similar to the one provided under setup/wallrnd.toml.

* To provide a variety of patterns, tilings, and themes, the six were created in succession by altering the configuration file slightly so that only one pattern, tiling, and theme was available. This method guarantees variability without biasing quality. Hence the above sample can be considered representative of the general quality of generated wallpapers.