JSPM

isdesktop-visible

1.0.0
  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • 0
  • Score
    100M100P100Q31891F
  • License MIT

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

Package Exports

  • isdesktop-visible
  • isdesktop-visible/index.js

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (isdesktop-visible) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

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.');
    }
});