Skip to content

fcannizzaro/win-watcher

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

win-watcher

Get killed, started, running, top processes on Windows

npm npm

Install

npm i --save win-watcher

Requirements

node-gyp to build src/win.cc

Usage

var windows = require('win-watcher')
var win = windows(500,250)

win.on('focus', p => {
  console.log('  >> Top Process: %s <<', p)
})

win.on('kill', p => {
  console.log('  >> Killed Process: %s <<', p)
})

win.on('start', p => {
  console.log('  >> Started Process: %s <<', p)
})

Functions

module(runningInterval, focusInterval)

  • Number runningInterval: milliseconds for check new/killed processes. (Default 500)

  • Number focusInterval: milliseconds of interval for check top process. (Default 200)

isRunning(process)

  • String process: name of process. Return if process is running.

getTopProcess()

Return focused process.

Events

kill

Called when a process is killed.

start

Called when a process is started.

focus

Called when the top process is changed.

Author

Francesco Cannizzaro

About

Get killed, started, running, top processes on Windows

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published