linux-lockscreen

Get or set lockscreen/screensaver wallpaper on Linux

Usage no npm install needed!

<script type="module">
  import linuxLockscreen from 'https://cdn.skypack.dev/linux-lockscreen';
</script>

README

linux-lockscreen BuildStatus

Get or set lockscreen/screensaver wallpaper on Linux. Forked from @sindresorhus's linux-wallpaper package

Supports GNOME 3 (and maybe Unity).

Install

$ npm install --save linux-lockscreen

Usage

var linuxLockscreen = require('linux-lockscreen');

linuxLockscreen.set('unicorn.jpg', function (err) {
    console.log('done');
});

linuxLockscreen.get(function (err, imagePath) {
    console.log(imagePath);
    //=> '/home/sindresorhus/unicorn.jpg'
});

API

.get(callback)

callback(error, imagePath)

Required
Type: function

imagePath

Type: string

Path to the current desktop wallpaper image.

.set(imagePath, [callback])

imagePath

Required
Type: string

Path to the image to set as the desktop wallpaper.

CLI

Hopefully @sindresorhus will add support for this on his wallpaper package.

License

MIT © Fahad Hossain