1.0.0 • Published 11 years ago
win-wallpaper v1.0.0
node-win-wallpaper
Get or set the desktop wallpaper on Windows using the
win-wallpaperbinary
Install
$ npm install --save win-wallpaperUsage
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'
});API
.get(callback)
callback(error, imagePath)
Required
Type: function
imagePath
Type: string
Path to the current desktop wallpaper image.
.set(imagePath, callback)
imagePath
Required
Type: string
Path to the image to set as the desktop wallpaper.
CLI
# set
wallpaper unicorn.jpg
# get
wallpaper
> C:\Users\sindresorhus\unicorn.jpgRelated
wallpaper- Get or set the desktop wallpaper.
License
MIT © Sindre Sorhus
1.0.0
11 years ago