Change your desktop wallpaper on OSX, Linux and Windows
MIT License
wallpaper is a cross-platform javascript application that can change your wallpaper with a simple command line:
# OS X / Linux
$ wallpaper --source bing
$ wallpaper --source http://awesome.org/wallpaper.jpg
# Windows
> wallpaper --source bing --style Fill
wallpaper supports custom image source. The lib/sources/bing.js was provided by default while you can custom your source from other websites, see lib/sources/your.js for more information.
You can download the latest source files from the Releases page.
If you have had npm installed, you can simply type the command to install wallpaper globally:
$ npm install -g wallpaper-js
$ wallpaper --help
Usage: node wallpaper [options]
Options:
-h, --help show help information.
-s, --style the wallpaper style[Tile, Center, Stretch, Fit, Fill], Windows Only. [Stretch]
--source the wallpaper source, support imageset[bing, ...] (see lib/sources/) OR uri [bing]
On Windows platform, there is no direct way in nodejs to set wallpaper. The best solution is make use of Windows API, so I provided a binary executable wallpaper.exe
as well as C++ sources to do this.
There are many solutions to change wallpaper on OS X, but some of them are for older versions of the system. On OS X 10.9+, thers is an SQLite database file (~/Library/Application Support/Dock/desktoppicture.db) which manages the desktop background preferences including the wallpaper.
Unfortunately, there are many desktop environment like GNOME, KDE on Linux. So the interfaces are totally different. To make it simple, just call the interfaces one by one until one of them succeed.
You can easily make contribution through Github's Issue and PullRequest system
Issueshttps://github.com/micooz/wallpaper/issues
PullRequesthttps://github.com/micooz/wallpaper/pulls
Micooz: [email protected]
The MIT License