https://github.com/uglow/active-win-log
Log your active window usage
https://github.com/uglow/active-win-log
daemon logging nodejs reporting tracking
Last synced: 11 months ago
JSON representation
Log your active window usage
- Host: GitHub
- URL: https://github.com/uglow/active-win-log
- Owner: uglow
- License: other
- Created: 2019-03-23T22:29:41.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2023-01-03T18:24:18.000Z (over 3 years ago)
- Last Synced: 2025-06-12T20:33:16.494Z (about 1 year ago)
- Topics: daemon, logging, nodejs, reporting, tracking
- Language: JavaScript
- Size: 1.11 MB
- Stars: 23
- Watchers: 1
- Forks: 3
- Open Issues: 10
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- Contributing: CONTRIBUTING.md
- License: LICENSE
Awesome Lists containing this project
README
# active-win-log
> A command line tool for logging time spent viewing application windows.
[](http://npm.im/active-win-log)
[](https://github.com/semantic-release/semantic-release)
[](https://coveralls.io/github/uglow/active-win-log?branch=master)
[](https://david-dm.org/uglow/active-win-log#info=dependencies)
[](https://david-dm.org/uglow/active-win-log#info=devDependencies)
## Install
npm install -g active-win-log
## Usage
```
$ awl -?
Usage: awl
awl Start monitoring the active window
awl -? This help information
awl -l n Display statistics for the last "n" days in the log
awl -q Stop monitoring
Log location: /users//.active-win-log/awl.json
```
## Sample output
Command: `awl -l 1`

## Contributing
PRs are welcome. See [CONTRIBUTING.md](CONTRIBUTING.md).
## Motivation
I use this tool to give me a better sense of how I am spending my time when working out of the office. The tool checks
to see what the active window is (using [active-win](https://www.npmjs.com/package/active-win)) _every 5 seconds_.
## Troubleshooting
### "I start `awl` but it just shows the pid and an empty stats object"
This may be due to changes in MacOS 10.15 and later, which requires the `[active-win](https://github.com/sindresorhus/active-win)`
library (which `active-win-log` depends on) to prompt for access when the library attempts to read a process' window title.
In the meantime, if you want `active-win-log` to work, you must grant access to your terminal program when OSX
prompts for Accessibility and/or Screen-Recording access. (I know, this really sucks, but it's an OSX limitation.
If you think you can improve this behaviour, see [this issue](https://github.com/sindresorhus/active-win/issues/97).)
## License
This software is licensed under the MIT Licence. See [LICENSE](LICENSE).