Get or set the desktop wallpaper on Windows using the
win-wallpaper
binary
$ npm install --save win-wallpaper
var winWallpaper = require('win-wallpaper');
winWallpaper.set('unicorn.jpg', function (err) {
console.log('done');
});
winWallpaper.get(function (err, imagePath) {
console.log(imagePath);
//=> 'C:\Users\sindresorhus\unicorn.jpg'
});
Required
Type: function
Type: string
Path to the current desktop wallpaper image.
Required
Type: string
Path to the image to set as the desktop wallpaper.
# set
wallpaper unicorn.jpg
# get
wallpaper
> C:\Users\sindresorhus\unicorn.jpg
-
wallpaper
- Get or set the desktop wallpaper.
MIT © Sindre Sorhus