npm.io
1.0.1 • Published 11 years agoCLI

osx-wallpaper

Licence
MIT
Version
1.0.1
Deps
0
Vulns
0
Weekly
0
DeprecatedThis package is deprecated

node-osx-wallpaper Build Status

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
  • wallpaper - Get or set the desktop wallpaper.

License

MIT Sindre Sorhus

Keywords