You're Invited:Meet the Socket Team at BlackHat and DEF CON in Las Vegas, Aug 4-6.RSVP
Socket
Book a DemoInstallSign in
Socket

isdesktop-visible

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

isdesktop-visible

Detect when the Windows desktop is visible or hidden (like Show Desktop)

1.0.0
latest
Source
npmnpm
Version published
Weekly downloads
4
33.33%
Maintainers
1
Weekly downloads
 
Created
Source

isdesktop-visible

A Node.js wrapper around a native Windows binary that detects when the desktop is shown or hidden (e.g., via Show Desktop or Win+D).

Installation

npm install isdesktop-visible

Usage

const { monitorDesktop } = require('isdesktop-visible');

const proc = monitorDesktop((state, line) => {
    console.log(`Desktop is now ${state}`);
    console.log(`Raw output: ${line}`);
});

Notes

  • Only works on Windows.
  • Requires isdesktop-visible.exe in the bin/Release folder.
  • You can stop the process manually using proc.kill().

4. ✅ Usage in Another Project

const { monitorDesktop } = require('isdesktop-visible');

monitorDesktop((state, raw) => {
    if (state === 'visible') {
        console.log('User has minimized all windows!');
    } else {
        console.log('User has focused on a window again.');
    }
});

Keywords

windows

FAQs

Package last updated on 28 May 2025

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