First clone this repository:
git clone git@github.com:circles-00/apm-tracker.git
Install needed packages:
yarn
Build:
yarn build
You can use it as a CLI, or do something more creative with it, like using it with Polybar (I use it with polybar btw and it's awesome).
Some screenshots:
1. This is polybar, and you can see the APM count up there
2. As well as some neovim action alongside the polybar
To run the application, first you need to find out your keyboard id and mouse id, you can use evtest
for it.
Once you have your keyboard id and mouse id, you need to send them to the script, let's say that the mouse id is 20 and the keyboard id is 20:
./dist/index.js 20 14
If you also want to have some more statistics, you can send the verbatim argument:
./dist/index.js 20 14 true
To use with polybar, add this to the polybar config (change the path of the script if needed):
[module/apm]
type = custom/script
exec = ~/.config/polybar/apm.js 20 14
tail = true
interval = 1
Then you can use the module anywhere you want, for example:
modules-right = apm
You may also want to add some permissions to your root user to the files located in /lib
, so they can be executed as root.
- Refine the README, it is written just to not forget how this project works, needs more work on the specifics.