Script: info-hackspeed
A small script that shows your typing speed. Happy Hacking!
Dependencies
xorg-xinputawk- coreutils (
rm,stdbuf,mktemp,stat, you probably have this)
Configuration
KEYBOARD_ID: name of your keyboard. See Setup above. Default:AT Translated Set 2 keyboardMETRIC: eithercpm(characters per minute) ofwpm(words per minute, 1 word = 5 characters). Default:cpmFORMAT: format string according to which the metric will be output. Default:# %d $METRICINTERVAL: amount of seconds to gather data. Default: 20LAYOUT: keyboard layout, to be able to only count letters and numbers. Currently supported areqwerty,azerty,qwertzanddvorak. If you have a different layout, please contribute a condition for it! See the script's source code. Use the special valuedontcareto count all keys, not just letters and numbers. Default:qwerty
If after 20 seconds the value stays at 0 even though you're typing, you may have to configure the name of your keyboard. Change the setting KEYBOARD_ID (see Configuration below) in the script. You can find your keyboard description with xinput list --short.
Module
[module/info-hackspeed]
type = custom/script
exec = ~/polybar-scripts/info-hackspeed.sh
tail = true
