
Security News
Attackers Are Hunting High-Impact Node.js Maintainers in a Coordinated Social Engineering Campaign
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.
@xchencode/macos-wallpaper
Advanced tools
Get or set the desktop wallpaper
Works on macOS 10.14.4+.
npm install macos-wallpaper
import {getWallpaper, setWallpaper} from 'wallpaper';
await setWallpaper('unicorn.jpg');
await getWallpaper();
//=> '/Users/sindresorhus/unicorn.jpg'
Returns a Promise<string> with the path of the current desktop wallpaper.
Type: object
Type: string | number
Values: 'all', 'main', or the index of a screen from .screens()
Default: 'main'
The screen to get the wallpaper from.
If you set 'all' then getWallpaper() will return a Promise<string[]>.
Returns a Promise.
Type: string
The path to the image to set as the desktop wallpaper.
Type: object
Type: string | number
Values: 'all', 'main', or the index of a screen from .screens()
Default: 'all'
The screen to set the wallpaper on.
Type: string
Values: 'auto' | 'fill' | 'fit' | 'stretch' | 'center'
Default: 'auto'
Type: string
The color to set as a RGB Hex value. For example, 000000 for black.
Scaling method.
Returns a Promise.
Type: string
The color to set as a RGB Hex value. For example, 000000 for black.
Type: object
Type: string | number
Values: 'all', 'main', or the index of a screen from .screens()
Default: 'all'
The screen to set the wallpaper on.
import {setSolidColorWallpaper} from 'wallpaper';
await setSolidColorWallpaper('000000');
Returns a Promise<string[]> with the available screens.
import {screens} from 'wallpaper';
await screens();
//=> ['Color LCD']
FAQs
Manage the desktop wallpaper
We found that @xchencode/macos-wallpaper demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.

Security News
Axios compromise traced to social engineering, showing how attacks on maintainers can bypass controls and expose the broader software supply chain.

Security News
Node.js has paused its bug bounty program after funding ended, removing payouts for vulnerability reports but keeping its security process unchanged.