New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

wallpaper-setter

Package Overview
Dependencies
Maintainers
0
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

wallpaper-setter

A cross-platform Node.js package to set desktop wallpaper

latest
npmnpm
Version
1.0.1
Version published
Weekly downloads
0
-100%
Maintainers
0
Weekly downloads
 
Created
Source

wallpaper-setter

A cross-platform Node.js package for setting desktop wallpaper. Supports macOS, Windows, and Linux (GNOME, KDE, XFCE).

English | 中文

Installation

npm install wallpaper-setter

Usage

import { setWallpaper } from "wallpaper-setter";

// Set wallpaper
await setWallpaper("/path/to/your/image.jpg");

Using CommonJS

const { setWallpaper } = require("wallpaper-setter");

// Set wallpaper
await setWallpaper("/path/to/your/image.jpg");

Supported Platforms

  • macOS
  • Windows
  • Linux
    • GNOME
    • KDE
    • XFCE

API

setWallpaper(imagePath: string): Promise

Sets the specified image as desktop wallpaper.

Parameters:

  • imagePath: Full path to the image file (supports jpg, png, etc.)

Returns:

  • Returns a Promise that resolves when successful, rejects with an error message when failed

Notes

  • On Linux, it automatically detects and attempts to use the current desktop environment (GNOME, KDE, or XFCE)
  • On Windows, PowerShell support is required
  • On macOS, AppleScript is used to set the wallpaper

License

MIT

Keywords

wallpaper

FAQs

Package last updated on 25 Dec 2024

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