MCPcopy Index your code
hub / github.com/Vanille-N/wallrnd

github.com/Vanille-N/wallrnd @v1.0

Chat with this repo
repository ↗ · DeepWiki ↗ · release v1.0 ↗ · + Follow
156 symbols 360 edges 16 files 30 documented · 19%
What it actually does AI analysis from the code graph — generated when you open this
loading…
README

wallrnd

A configurable generator of random abstract time-aware wallpapers

License: MIT


Direct dependencies

serde API

serde_derive API

rand API

toml API

chrono API

delaunator API


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

It is only intended for generating the images (SVG), not actually setting them as a wallpaper.

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.


! 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
! 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    @

Recommended setup (executable wallrnd)

  • cargo build --release (1.44 stable) to create the wallrnd executable

  • Put wallrnd and setup/wallrnd.toml in a directory $DIR

  • Edit accordingly the set-wallpaper script, make it executable, and add it to a folder in your $PATH

  • Adjust the colors, themes, shapes in wallrnd.toml to your liking

  • Make a new Crontab entry: * * * * * set-wallpaper

Performance is good enough that running it every 60 seconds is not even noticeable (4-core Intel i5).

Thanks to nice giving the program a very low priority, it can run in the background without issue. The script also exits early when running on battery.

Recommended setup (executable 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.

  • Edit set-wallpaper to your liking, make it executable, and add it to your $PATH.

  • Make a new Crontab entry: * * * * * set-wallpaper

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


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.

Extension points exported contracts — how you extend this code

Contains (Interface)
Trait for anything that can contain a 2D point [6 implementers]
src/scene.rs
Dynamic (Interface)
A trait to box scene items and make them generic. Spares us from a few lines of repeated code. [1 implementers]
src/cfg.rs

Core symbols most depended-on inside this repo

push
called by 38
src/chooser.rs
polar
called by 31
prototype/prototype.py
timetag
called by 22
prototype/prototype.py
radians
called by 11
src/pos.rs
choose_color
called by 10
src/cfg.rs
random_color
called by 9
prototype/prototype.py
dynamic
called by 8
src/cfg.rs
sample
called by 7
src/scene.rs

Shape

Function 66
Method 57
Class 29
Enum 2
Interface 2

Languages

Rust75%
Python25%

Modules by API surface

prototype/prototype.py39 symbols
src/deserializer.rs19 symbols
src/pos.rs18 symbols
src/scene.rs14 symbols
src/svg.rs12 symbols
src/cfg.rs9 symbols
src/paint.rs8 symbols
src/chooser.rs8 symbols
src/tesselate.rs7 symbols
src/color.rs6 symbols
src/shape.rs5 symbols
src/main.rs5 symbols

For agents

$ claude mcp add wallrnd \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact

Ask about this repo answers extend the page