![require(esm) Backported to Node.js 20, Paving the Way for ESM-Only Packages](https://cdn.sanity.io/images/cgdhsj6q/production/be8ab80c8efa5907bc341c6fefe9aa20d239d890-1600x1097.png?w=400&fit=max&auto=format)
Security News
require(esm) Backported to Node.js 20, Paving the Way for ESM-Only Packages
require(esm) backported to Node.js 20, easing the transition to ESM-only packages and reducing complexity for developers as Node 18 nears end-of-life.
A simple program that sets random wallpaper images as desktop backgrounds in nix based operating systems / window managers. It fetches images from a local directory or Unsplash, composes a new image to match display size and arrangement, and sets the new image as the desktop background.
This project was forked from Gnome Random Wallpaper, which while great at its original limited scope, is no longer maintained.
Example arrangement
Example wallpaper
Nix Random Wallpaper (nrw
) currently makes the following assumptions about the user:
nrw
command to run in the background/tmp/random
- /tmp
is commonly a tmpfs filesystem and exists only in memory (while the system remains powered on)
Simply running nrw
will fetch images from either the Unsplash API or the image directory (images_dir
) defined in configuration, then prepare and set the wallpaper based on the configured setter. In xorg, all setters resize and compose the images on a spanned canvas matching your current display arrangement, save the resulting wallpaper image to the output directory (output_dir
), and update your desktop background. In wayland (currently only hyprland), images are placed on their own right-sized canvases, saved separately, and update the desktop background individually on each screen.
Some suggested steps to take in your environment:
nrw
at regular intervals (every 15 minutes works well for me - */15 * * * * /path/to/nrw
)nrw
on loginUse the following command to install the nrw
module from PyPi with pip:
pip install nrw
Or to install the latest version of the repository with pip:
pip install git+https://github.com/miliarch/nrw.git
After installation, a nrw
executable link should be placed in your $HOME/.local/bin
directory (this may vary depending on distro). If this directory is included in your PATH environment variable, the nrw
command should be available for use without any further steps. Otherwise, you'll need to either specify the full path to run the program, or add the $HOME/.local/bin
directory to your PATH environment variable.
Alternatively, clone this repository to your preferred installation directory and manually link ./nrw/nix_random_wallpaper.py
in the execution directory of your choice.
Default configuration can be found in nrw/config.yaml. This file can be copied to $HOME/.config/nix_random_wallpaper/config.yaml
and modified to override the default options.
Each configuration option in the file includes an in-line comment that details its function. If you have any questions about how existing options behave, or requests for new options, please raise an issue in this repository.
Any number of displays that are arranged horizontally (side-by-side) within the vertical (height) bounds of the largest display should be supported.
Vertical arrangements, including mixed vertical/horizontal arrangements, are currently unsupported. Support may be implemented in the future.
FAQs
A simple program that sets random images as desktop wallpaper in *nix operating systems.
We found that nrw demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
require(esm) backported to Node.js 20, easing the transition to ESM-only packages and reducing complexity for developers as Node 18 nears end-of-life.
Security News
PyPI now supports iOS and Android wheels, making it easier for Python developers to distribute mobile packages.
Security News
Create React App is officially deprecated due to React 19 issues and lack of maintenance—developers should switch to Vite or other modern alternatives.