1.0.1 • Published 9 years ago
osx-wallpaper v1.0.1
node-osx-wallpaper
Get or set the desktop wallpaper on OS X using the
osx-wallpaper
binary
Install
$ npm install --save osx-wallpaper
Usage
var osxWallpaper = require('osx-wallpaper');
osxWallpaper.set('unicorn.jpg', function (err) {
console.log('done');
});
osxWallpaper.get(function (err, imagePath) {
console.log(imagePath);
//=> '/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
> /Users/sindresorhus/unicorn.jpg
Related
wallpaper
- Get or set the desktop wallpaper.
License
MIT © Sindre Sorhus