wallpaper-macos
v1.0.4
Published
Set wallpaper on macOS, natively using nodobjc
Downloads
16
Maintainers
Readme
wallpaper-macos
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 [email protected]
Jack Lypskyi https://github.com/avaganz