https://github.com/supertigerdev/active-window-listener
Listen to active windows by specifying them
https://github.com/supertigerdev/active-window-listener
Last synced: about 1 year ago
JSON representation
Listen to active windows by specifying them
- Host: GitHub
- URL: https://github.com/supertigerdev/active-window-listener
- Owner: SupertigerDev
- Created: 2020-04-17T17:01:15.000Z (about 6 years ago)
- Default Branch: master
- Last Pushed: 2023-01-09T23:36:36.000Z (over 3 years ago)
- Last Synced: 2025-02-08T06:36:31.359Z (over 1 year ago)
- Language: TypeScript
- Size: 43.9 KB
- Stars: 4
- Watchers: 1
- Forks: 1
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Active Window Listener
Listen to active windows by specifying them
This will be used in https://nertivia.tk (My chat web app project) in the future to show playing status and more!
## Usage
```js
const { ProcessListen } = require("active-window-listener");
const listener = new ProcessListen(["Discord.exe", "Telegram.exe", "Code.exe"]);
listener.changed(data => {
console.log("Active: ", data)
})
```
This should output an object of Window Class properties. See the package used below to view the methods.
There is also a function to get windows that are opened. I needed to filter out some of the components from the "Windows" Directory in order to get the proper list.
```js
const { getWindows } = require("active-window-listener");
console.log(getWindows())
```
This should output an array of Window Class properties. See the package used below to view the methods.
## Package used
Mainly used to get all the active window information.
https://github.com/sentialx/node-window-manager/
Used to get File Description (Which is used to get the proper program name)
https://www.npmjs.com/package/exiftool-vendored