Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

cross-platform-active-window

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

cross-platform-active-window

Get active window title, cross-platform

  • 1.0.0
  • latest
  • npm
  • Socket score

Version published
Weekly downloads
0
Maintainers
1
Weekly downloads
 
Created
Source

cross-platform-active-window

Get active window title in Node.js. (fork of https://github.com/octalmage/active-window, which looks to be unmaintained)

Compatible with Linux, Windows 7+, and OSX;

Usage

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

FAQs

Package last updated on 22 Feb 2019

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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc