Comfy terminal based typing test
cargo install smokey
git clone https://github.com/ukmrs/smokey && cd smokey
cargo build --release
then copy target/release/smokey to a known location
Key | Function |
---|---|
TAB | Reset the current test |
ESC | Open the settings |
CTRL + C | Exit |
CTRL + Backspace | Delete a word |
Key | Function |
---|---|
TAB | Start a new test |
h j k l / Arrow Keys | Movement |
d / ESC | Deselect |
s / ENTER | Select |
q / ESC / CTRL + C | Exit |
Key | Function |
---|---|
TAB | Start a new test |
s | Open the settings |
q / ESC / CTRL + C | Exit |
Smokey ships with a sizeable english word list (~60_000 words) which on linux can be found in
~/.local/share/smokey/words
Otherwise location can be found with the --storage flag.
More lists can be added to the folder. Smokey expects a list sorted by word frequency with each word separated by a newline character. Other languages are not provided but most of the time can be easily DIYed.
Grab Lexique382.zip and unzip it to find Lexique382.tsv. If you have xsv installed, here is an almost one liner to convert it to smokey-friendly format:
xsv sort -s freqlivres -N -R Lexique382.tsv | xsv select ortho > french
sed '1d' french > tmpfile && mv tmpfile french
The only purpose of the sed command is to delete the first line which will be "ortho" - the column name. That could be done manually but I included it for convenience.
Grab Otwarty słownik frekwencyjny leksemów pdftotext it, sort it and clean it by a short script. Godspeed mój przyjacielu.
Smokey should handle all simple scripts like
- latin derivatives
- cyrylic
- greek
- etc
Complex scripts that require mulitple inputs for one glyph like Hangul won't work. The same goes for right_to_left scripts.
The list contains around 60 000 words. It is derived from 1/3 million most frequent English words compiled by Peter Norvig. I filtred it using python bindings of Enchant and checked against the MauriceButler/badwords and LDNOOBW. I kept "sex" though. Otherwise it wouldn't be fair to plants who just cross-pollinate without causing too much of a ruckus. Future me here, I forgot about accursed pollen allergies, I might reconsider my stance on this.
There is a scripts directory in which you can throw... scripts. Just chmod +x, add a shebang, slap it in there and the output will be converted to a typing test. There is an example python script shipped with smokey that produces gibberish but of course you can add whatever else. For instance, I use a script that fetches me a random quote from a local database. You can snatch some from Monkeytype or TypeRacer to name a few.
You can create smokey.toml configuration file that allows to change colors or set default test settings. On linux:
~/.config/smokey/smokey.toml
Other OS:
smokey --config
For colors you can use either hex codes or standard colors (supported names).
[colors]
# test colors
todo = "grey"
done = "#96BB7C"
mistake = "#C64756"
# settings colors
active = "#93a1bf"
hover = "#aa78bf"
[test]
# default test settings
name = "english"
mods = ["punctuation", "numbers"]
len = 20
pool = 60000
Runs are saved to a sqlite database, on linux you can find it here:
~/.local/share/smokey/run_history.db3
For now it is only used to fetch and compare against your record wpm. In the very near future there will be a nice way to explore the history, but I haven't implemented that yet, soz.