# osx-wallpaper

> Get or set the desktop wallpaper on OS X

Latest version **1.0.1** (published 2015-04-03) · MIT license · 0 weekly downloads

> **Deprecated.** This package is deprecated.

## Install

```sh
npm install osx-wallpaper
pnpm add osx-wallpaper
yarn add osx-wallpaper
bun add osx-wallpaper
```

Provides the command `wallpaper`.

## Health

**Score 10/100 (F)** — status: deprecated.

Negative: deprecated.

## Facts

| | |
|---|---|
| Version | 1.0.1 |
| Published | 2015-04-03 |
| First published | 2015-04-03 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Node | >=0.10.0 |
| Dependencies | 0 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | Sindre Sorhus |
| Maintainers | sindresorhus |
| Keywords | cli-app, cli, bin, osx, wallpaper, desktop, background, image, picture, photo, image |

## Links

- npm: https://www.npmjs.com/package/osx-wallpaper
- Repository: https://github.com/sindresorhus/node-osx-wallpaper
- Issues: https://github.com/sindresorhus/node-osx-wallpaper/issues
- npm.io page: https://npm.io/package/osx-wallpaper

## Alternatives

- [@salesforce/cli](https://npm.io/package/@salesforce/cli.md) — 389.7K weekly downloads
- [@mintlify/cli](https://npm.io/package/@mintlify/cli.md) — 208.9K weekly downloads
- [@grafana/e2e-selectors](https://npm.io/package/@grafana/e2e-selectors.md) — 128.7K weekly downloads
- [mintlify](https://npm.io/package/mintlify.md) — 112.0K weekly downloads
- [@intlayer/cli](https://npm.io/package/@intlayer/cli.md) — 22.8K weekly downloads

## Recent versions

- 1.0.1 (latest) — 2015-04-03

## README

# node-osx-wallpaper [![Build Status](https://travis-ci.org/sindresorhus/node-osx-wallpaper.svg?branch=master)](https://travis-ci.org/sindresorhus/node-osx-wallpaper)

> Get or set the desktop wallpaper on OS X using the [`osx-wallpaper`](https://github.com/sindresorhus/osx-wallpaper) binary


## Install

```
$ npm install --save osx-wallpaper
```


## Usage

```js
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

```sh
# set
wallpaper unicorn.jpg

# get
wallpaper
> /Users/sindresorhus/unicorn.jpg
```


## Related

- [`wallpaper`](https://github.com/sindresorhus/wallpaper) - Get or set the desktop wallpaper.


## License

MIT © [Sindre Sorhus](http://sindresorhus.com)

---
_Source: https://npm.io/package/osx-wallpaper · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
