@zerox-dg/wallpaper

    3.1.0 • Public • Published

    wallpaper Build Status Build status

    Get or set the desktop wallpaper

    Works on macOS, Linux, and Windows.

    Install

    $ npm install @zerox-dg/wallpaper
    

    Usage

    const wallpaper = require("wallpaper");
    
    wallpaper.set("unicorn.jpg").then(() => {
    	console.log("done");
    });
    
    wallpaper.get().then(imagePath => {
    	console.log(imagePath);
    	//=> '/Users/sindresorhus/unicorn.jpg'
    });

    API

    .get()

    Returns a promise for the path of the current desktop wallpaper.

    .set(imagePath, [options])

    Returns a promise.

    imagePath

    Type: string

    Path to the image to set as the desktop wallpaper.

    options

    Type: Object

    scale

    Type: string
    Values: fill fit stretch center
    Default: Current system setting

    Scaling method. Only available on macOS.

    Related

    License

    MIT © Sindre Sorhus

    Install

    npm i @zerox-dg/wallpaper

    DownloadsWeekly Downloads

    1

    Version

    3.1.0

    License

    MIT

    Unpacked Size

    41.3 kB

    Total Files

    9

    Last publish

    Collaborators

    • zerox-dg