Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/octalmage/active-window
Get active window title in Node.js.
https://github.com/octalmage/active-window
Last synced: 13 days ago
JSON representation
Get active window title in Node.js.
- Host: GitHub
- URL: https://github.com/octalmage/active-window
- Owner: octalmage
- Created: 2015-08-27T14:15:24.000Z (about 9 years ago)
- Default Branch: master
- Last Pushed: 2019-04-11T08:10:04.000Z (over 5 years ago)
- Last Synced: 2024-10-23T03:30:31.891Z (22 days ago)
- Language: JavaScript
- Size: 8.79 KB
- Stars: 160
- Watchers: 6
- Forks: 51
- Open Issues: 15
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Attention, this library is not maintained anymore!!!
# active-window
> Get active window title in Node.js.Compatible with Linux, Windows 7+, and OSX;
## Usage
```javascript
var monitor = require('active-window');callback = function(window){
try {
console.log("App: " + window.app);
console.log("Title: " + window.title);
}catch(err) {
console.log(err);
}
}
/*Watch the active window
@callback
@number of requests; infinity = -1
@interval between requests
*/
//monitor.getActiveWindow(callback,-1,1);//Get the current active window
monitor.getActiveWindow(callback);```
## Tested on
- Windows
- Windows 10
- Windows 7
- Linux
- Raspbian [lxdm]
- Debian 8 [cinnamon]
- OSX
- Yosemite 10.10.1## TODO
- Test on more operating systems.
- Use native APIs.## License
MIT