1 stable release
Uses new Rust 2024
new 1.0.0 | Mar 20, 2025 |
---|
#330 in Images
80 downloads per month
14KB
133 lines
unsplash-wallpaper
A tiny tool to download wallpapers from Unspash API.
Building
cargo build --release
Configuration
Configuration files are taken from:
$XDG_CONFIG_HOME/unsplash-wallpaper
(if$XDG_CONFIG_HOME
is set)$HOME/.config/unsplash-wallpaper
First save your token in plain text format in <config_dir>/token
(can be obtained here). Leading and trailing whitespaces are trimmed.
Then, specify runtime settings in <config_dir>/params.toml
:
collections = "1234567"
count = 15
dest_dir = ".local/share/backgrounds"
Then by running unsplash-wallpaper
you'll get 15 images downloaded to ~/.local/share/backgrounds/<N>.jpeg
(where N
is a monotonically increasing number from 1 to 15).
Files are downloaded in parallel.
For each downloaded file its absolute filepath is printed to stdout, so you can do something like | head -n1 | set-bg
in your scripts at startup.
Dependencies
~7–18MB
~243K SLoC