https://github.com/nstechbytes/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).
https://github.com/nstechbytes/isdesktop-visible
Last synced: 4 months ago
JSON representation
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).
- Host: GitHub
- URL: https://github.com/nstechbytes/isdesktop-visible
- Owner: NSTechBytes
- License: mit
- Created: 2025-05-28T05:58:31.000Z (about 1 year ago)
- Default Branch: main
- Last Pushed: 2025-05-28T06:23:59.000Z (about 1 year ago)
- Last Synced: 2025-10-19T21:06:54.555Z (8 months ago)
- Language: C++
- Size: 20.5 KB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
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
```bash
npm install isdesktop-visible
````
## Usage
```js
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
```js
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.');
}
});