Get killed, started, running, top processes on Windows
npm i --save win-watcher
node-gyp to build src/win.cc
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)
})
-
Number
runningInterval: milliseconds for check new/killed processes. (Default 500) -
Number
focusInterval: milliseconds of interval for check top process. (Default 200)
String
process: name of process. Return if process is running.
Return focused process.
Called when a process is killed.
Called when a process is started.
Called when the top process is changed.
Francesco Cannizzaro