Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

node-desktop-bg

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

node-desktop-bg

A native module to set the desktop image in Mac OSX.

  • 1.0.0
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
1
Maintainers
1
Weekly downloads
 
Created
Source

node-desktop-bg

This is my first attempt at a native node module. It only works on Mac OSX currently. Maybe I'll try to get Windows and Linux working on it someday.

API

getDesktopImages

This returns:

[
  {
    filepath: '/Library/Desktop Pictures/Earth and Moon.jpg', //absolute path to file
    isMain: true, // is it the main screen or a secondary?
    id: 2077750397 // the screeen id. note that this changes if the user connects/disconnects a display
  }
]

setDesktopImages

Params:

{int|string} screen id|"main"
{string} File URL to new image. Must start with "file://"

Returns true if it worked. The existence of the file URL is not checked.

Sample

const DesktopBg = require('node-desktop-bg');

console.log(DesktopBg.getDesktopImages());

DesktopBg.getDesktopImages().forEach(screen => {
  DesktopBg.setDesktopImage(screen.id, 'file:///Images/RickAstley/Rickrolling.png');
});

Keywords

FAQs

Package last updated on 19 May 2016

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc