8000 GitHub - jrnxf/thokr: ✨ sleek typing tui with visualized results and historical logging · GitHub
[go: up one dir, main page]

Skip to content
jrnxfPublic

About

✨ sleek typing tui with visualized results and historical logging

Topics

Resources

Code of conduct

Stars

603 stars

Watchers

4 watching

Forks

Latest commit

 

History

130 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

thokr

✨ sleek typing tui with visualized results and historical logging

GitHub Build Workflow GitHub Release Workflow License Crate Version Github Stars

demo

Installation

Cargo

$ cargo install thokr

Homebrew

$ brew install jrnxf/tap/thokr

From v0.6.1, the formula installs a prebuilt binary for macOS (Apple silicon and Intel) and Linux, with nothing to compile. brew install --HEAD jrnxf/tap/thokr builds the latest commit from source instead.

Prebuilt binaries

Each release has a .tar.gz archive with the thokr binary for macOS and Linux (static, so any distribution), each with a .sha256 checksum.

Arch Linux

Install thokr-git from the AUR

Usage

For detailed usage run thokr -h.

sleek typing tui with visualized results and historical logging

Usage: thokr [OPTIONS]

Options:
  -w, --number-of-words <NUMBER_OF_WORDS>
          number of words to use in test (init
993B
ial buffer only when timed) [default: 15]
  -f, --full-sentences <NUMBER_OF_SENTENCES>
          number of sentences to use in test
  -s, --number-of-secs <NUMBER_OF_SECS>
          run a timed test for this many seconds; words stream continuously until the clock stops (unless -p or -f fixes the text)
  -p, --prompt <PROMPT>
          custom prompt to use
  -l, --supported-language <SUPPORTED_LANGUAGE>
          language to pull words from [default: english] [possible values: english, english1k, english10k]
      --pace <PACE>
          ghost caret pacing at this WPM to race against
  -d, --death-mode
          end the test the moment you mistype a character
  -h, --help
          Print help
  -V, --version
          Print version

Examples

command test contents
thokr 50 of the 200 most common english words
thokr -w 100 100 of the 200 most common English words
thokr -w 100 -l english1k 100 of the 1000 most common English words
thokr -s 30 30-second timed test, words stream continuously until time runs out
thokr -s 60 -l english1k 60-second timed test drawing from the 1000 most common words
thokr -p "$(cat foo.txt)" -s 30 custom prompt with a 30s cap (fixed text, stops early if you finish it)
thokr -p "$(cat foo.txt)" custom prompt with the output of cat foo.txt
thokr -f 4 4 grammatical sentences with full stops; overrides word settings
thokr --pace 60 15 most common words with a ghost caret racing at 60 wpm
thokr -d 15 words, but the test ends the instant you mistype a character

During a test you can press ← to start over or → to see a new prompt (assuming you didn't supply a custom one)

Timed (continuous) mode

Passing -s <seconds> on its own runs a continuous test: fresh words stream in as you type and the test only ends when the clock hits zero. A long prompt scrolls a few lines at a time so the layout stays put. -w then just sets the size of the initial on-screen buffer. Combining -s with a custom prompt (-p) or sentences (-f) keeps the text fixed, so the test still ends when you finish it or the timer expires, whichever comes first.

Supported Languages

The following languages are available by default:

name description
english 200 most common English words
english1k 1000 most common English words
english10k 10000 most common English words

Logging

Upon completion of a test, a row outlining your results is appended to the log.csv file found in the following platform-specific folders. This way you can easily track your progress over time.

platform value example
Linux $XDG_CONFIG_HOME/thokr or $HOME/.config/thokr /home/colby/.config/thokr
macOS $HOME/Library/Application Support/thokr /Users/colby/Library/Application Support/thokr
Windows {FOLDERID_RoamingAppData}\thokr\config C:\Users\colby\AppData\Roaming\thokr\config

Roadmap

  • 🔠 Multi-language support
    • I decided not to launch thokr with languages besides english because of some odd rendering issues I was experiencing when trying to input characters with accents. It's as though I'm not able to properly input the character in raw mode. I'd love to have that figure out before shipping other languages because I personally felt the experience was a bit jarring. I'll open an bug report for it with more details and replication steps -- would love more eyes on that problem!

Contributing

All contributions are greatly appreciated.

If you have a suggestion that would make thokr better, please fork the repo and create a pull request. You can also simply open an issue and select Feature Request

  1. Fork the repo
  2. Create your feature branch (git checkout -b [your_username]/xyz)
  3. Commit your changes (git commit -m 'add some xyz')
  4. Rebase off main (git fetch --all && git rebase origin/main)
  5. Push to your branch (git push origin [your_username]/xyz)
  6. Fill out pull request template

Maintainers: publishing a release publishes the crate and then updates the formula in jrnxf/homebrew-tap automatically.

See the open issues for a full list of proposed features (and known issues).

License

Distributed under the MIT License. See LICENSE.md for more information.

Acknowledgments

Check out these amazing projects that inspired thokr!

Follow

github

About

✨ sleek typing tui with visualized results and historical logging

Topics

Resources

Code of conduct

Stars

603 stars

Watchers

4 watching

Forks

Releases

Used by

Contributors

Languages

0