Get xkcd on YOUR wallpaper today.
xkcd-wall is a simple tool to fetch xkcd comics, recolor them, and generate
wallpapers with a solid background.
It supports fetching the latest comic, a specific comic by number, or a random comic.
The tool is configured via JSON and packaged with Nix.
A NixOS module is also included, which sets up a systemd timer.
-
Get today's comic
nix run github:sotormd/xkcd-wall -- -t today ./output.png
-
Get a random comic
nix run github:sotormd/xkcd-wall -- -t random ./output.png
-
Get a specific comic
nix run github:sotormd/xkcd-wall -- -t 1341 ./output.png
The tool looks for configuration in $HOME/.config/xkcd-wall/config.json.
If this does not exist, a default configuration file is created.
A configuration file path can also be passed using the -c flag.
nix run github:sotormd/xkcd-wall -- -t today -c /tmp/config.json ./output.pngClick to expand: default configuration values
{
"background-colors": ["#2e3440"],
"foreground-colors": ["#d8dee9"],
"dimensions": "1920x1080",
"cache": "/tmp/xkcd-wall-cache"
}The configuration values are explained here:
| value | explanation | example |
|---|---|---|
background-colors |
list of background colors to randomly choose from | ["#2e3440", "#3b4252"] |
foreground-colors |
list of foreground colors to randomly choose from | ["#bf616a", "#d08770", "#ebcb8b", "#a3be8c", "#b48ead"] |
dimensions |
output image dimensions | "1920x1200" |
cache |
cache directory | "/home/username/.cache" |