wallpaper-macos

1.0.4 • Public • Published

wallpaper-macos

npm npm npm npm

Change macOS desktop background, implemented natively using official Apple APIs, using nodobjc Objective-C bridge.

Correctly change the wallpaper of all spaces, without using nasty hacks like restarting the Dock.

Usage

var wallpaperMacOS = require('wallpaper-macos')

// Update wallpaper of the current space
wallpaperMacOS.setOnCurrentSpace(file)

// Update wallpaper of all spaces
wallpaperMacOS.setOnAllSpaces(file)

Note - switching on all spaces is achieved by listening for the activeSpaceDidChange workspace notification and setting the wallpaper on each space as the user switches to it. This means that this method cannot be used as a synchronous script, but must be run as part of a long-running application or service.

Authors

Tom Watson tom@tomjwatson.com

Jack Lypskyi https://github.com/avaganz

/wallpaper-macos/

    Package Sidebar

    Install

    npm i wallpaper-macos

    Weekly Downloads

    0

    Version

    1.0.4

    License

    Apache-2.0

    Last publish

    Collaborators

    • tom-james-watson