Wallpaper is a Node.js package for reading and changing the desktop wallpaper from JavaScript. It supports macOS, Windows, and Linux, although the repository currently notes that Linux maintenance needs additional help. Applications can retrieve the current wallpaper path and replace it with another local image. On macOS, individual displays or all available displays can be targeted through screen selection. macOS and Windows also support configurable image scaling modes such as fill, fit, stretch, center, or span where available. The package can list connected screens on macOS and can set a solid-color wallpaper there using a hexadecimal RGB value. Its promise-based API makes desktop-background management easy to incorporate into automation tools and desktop applications.
Features
- Desktop wallpaper reading and changing
- macOS, Windows, and Linux support
- Per-screen wallpaper control on macOS
- Configurable wallpaper scaling modes
- Connected display enumeration on macOS
- Solid-color wallpaper support on macOS