A terminal based typing test.

Overview

What

A terminal based typing test.

Installation

Linux

sudo curl -L https://github.com/lemnos/tt/releases/download/v0.4.0/tt-linux -o /usr/local/bin/tt && sudo chmod +x /usr/local/bin/tt
sudo curl -o /usr/share/man/man1/tt.1.gz -L https://github.com/lemnos/tt/releases/download/v0.4.0/tt.1.gz

OSX

sudo curl -L https://github.com/lemnos/tt/releases/download/v0.4.0/tt-osx -o /usr/local/bin/tt && sudo chmod +x /usr/local/bin/tt
sudo curl -o /usr/share/man/man1/tt.1.gz -L https://github.com/lemnos/tt/releases/download/v0.4.0/tt.1.gz

From source

git clone github.com/lemnos/tt
make && sudo make install

Best served on a terminal with truecolor and cursor shape support (e.g kitty, iterm)

Usage

By default 50 words from the top 1000 words in the English language are used to constitute the test. Custom text can be supplied by piping arbitrary text to the program. Each paragraph in the input is shown as a separate segment of the text. See man tt or man.md for a complete description and a comprehensive set of options.

Keys

  • Pressing escape at any point restarts the test.
  • C-c exits the test.
  • right moves to the next test.
  • left moves to the previous test.

Examples

  • tt -quotes en Starts quote mode with the builtin quote list 'en'.
  • tt -n 10 -g 5 produces a test consisting of 50 randomly drawn words in 5 groups of 10 words each.
  • tt -t 10 starts a timed test lasting 10 seconds.
  • tt -theme gruvbox Starts tt with the gruvbox theme.

tt is designed to be easily scriptable and integrate nicely with other *nix tools. With a little shell scripting most features the user can conceive of should be possible to implement. Below are some simple examples of what can be achieved.

  • shuf -n 40 /usr/share/dict/words|tt Produces a test consisting of 40 random words drawn from your system's dictionary.
  • curl http://api.quotable.io/random|jq '[.text=.content|.attribution=.author]'|tt -quotes - Produces a test consisting of a random quote.
  • alias ttd='tt -csv >> ~/wpm.csv' Creates an alias called ttd which keeps a log of progress in your home directory`.

The default behaviour is equivalent to tt -n 50.

See -help for an exhaustive list of options.

Configuration

Custom themes and word lists can be defined in ~/.tt/themes and ~/.tt/words and used in conjunction with the -theme and -words flags. A list of preloaded themes and word lists can be found in words/ and themes/ and are accessible by default using the respective flags.

Comments
  • make install fails on OS X

    make install fails on OS X

    > sudo make install
    Password:
    
    install -Dm755 bin/tt -t /usr/local/bin
    install: illegal option -- D
    usage: install [-bCcpSsv] [-B suffix] [-f flags] [-g group] [-m mode]
                   [-o owner] file1 file2
           install [-bCcpSsv] [-B suffix] [-f flags] [-g group] [-m mode]
                   [-o owner] file1 ... fileN directory
           install -d [-v] [-g group] [-m mode] [-o owner] directory ...
    make: *** [install] Error 64
    

    This is on OSX 10.15.7 with go version go1.16.5 darwin/amd64 installed via brew. It doesn't look like the OSX version of install has a -D option, so maybe this could be done with mkdir -p instead?

    opened by cviebrock 3
  • Weird Accuracy

    Weird Accuracy

    Hey there, I noticed that the accuracy is calculated based of the amount on wrong characters when you finish typing the line - The problem with this is, that you always get an accuracy Value of 100% if you correct your mistakes - Is that intended? Thanks!

    opened by UltraBlackLinux 2
  • on macOS, am getting: Warning: Failed to create the file /usr/share/man/man1/tt.1.gz: Operation not

    on macOS, am getting: Warning: Failed to create the file /usr/share/man/man1/tt.1.gz: Operation not

    On macOS, this give an error: sudo curl -o /usr/share/man/man1/tt.1.gz -L https://github.com/lemnos/tt/releases/download/v0.4.2/tt.1.gz

    example:

    $ sudo curl -o /usr/share/man/man1/tt.1.gz -L https://github.com/lemnos/tt/releases/download/v0.4.2/tt.1.gz
      % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                     Dload  Upload   Total   Spent    Left  Speed
    100   615  100   615    0     0     98      0  0:00:06  0:00:06 --:--:--   153
    Warning: Failed to create the file /usr/share/man/man1/tt.1.gz: Operation not 
    Warning: permitted
     65  2142   65  1410    0     0    209      0  0:00:10  0:00:06  0:00:04   209
    curl: (23) Failed writing body (0 != 1410)
    
    opened by 4goodapp 2
  • permanent location for test.log

    permanent location for test.log

    whenever im running the tt command, its creating a test.log file in that location

    it will better if there is a permanent location for test.log file like ~/.tt/test.log

    opened by z00rat 2
  • [Feature Request] A way to repeat the test

    [Feature Request] A way to repeat the test

    It would be nice to be able to repeat the exact same (sub-)test to work on accuracy, strive for a better WPM, etc.

    I know that Esc "restarts the test" but in the case of random words, it generates a totally new set of words than what you were previously typing and in the case of fed-in text, it puts you back at the very first paragraph, regardless of what paragraph you were on when you pressed Esc.

    In this regard, I like wpm's navigation: space and arrows to move through (sub-)tests and esc to restart.

    opened by precondition 2
  • ctrl-w as delete word

    ctrl-w as delete word

    vim and many other programs (and terminal emulators) use ctrl-w as delete word. also this is my first contribution to society lol

    also the other changes are from this error: https://stackoverflow.com/questions/71507321/go-1-18-build-error-on-mac-unix-syscall-darwin-1-13-go253-golinkname-mus

    opened by gaoDean 1
  • Fix `make install` on macOS

    Fix `make install` on macOS

    install -D is not available on macOS, so we create the directories with install -d before installing. install -t is also not present but turns out we didn't really need it as ~~it's only useful if you want to specify the destination directory before the source~~, so I just removed the t flag (EDIT: for posterity, the actual reason we don't need to use it is because we already created the directories so install doesn't get confused about whether the last argument is a DEST or DIRECTORY, you need it if the target directory does not exist)

    Really, this is my own fault, when changing the Makefile I didn't take other OSs into account, wrongly assuming the coreutils would work the same.

    Fixes #7

    opened by AulonSal 1
  • Update Makefile to make it easier for distro packagers

    Update Makefile to make it easier for distro packagers

    Hey I was packaging the project for the Arch User Repos, got the bin package up for now (https://aur.archlinux.org/packages/tt-bin/) and thought I'd make some changes to the Makefile. Current behaviour should not break, apart from the manpage being installed to /usr/local/share/man instead of /usr/share/man by default.

    Changes

    • Remove executable permission from the manpage
    • Add DESTDIR and PREFIX variables allowing one to choose where to install it
      • DESTDIR defaults to the empty string and PREFIX to /usr/local/
      • When installing in an arch package for example you'd use make DESTDIR="$pkgdir" PREFIX=/usr install
      • Running make install normally will try to install the binary to /usr/local/bin and the manpage to /usr/local/share/man/
    • Install with -D and -t
      • This creates the directories if they don't already exist, useful for packaging as packages are built in a fakeroot without the file system hierarchy
    • Added an uninstall rule
      • This has nothing to do with packaging, I was testing installing manually and got tired of running sudo rm manually
    • Marked all Makefile targets as phony because none of them correspond to actual files https://stackoverflow.com/questions/2145590/what-is-the-purpose-of-phony-in-a-makefile/2145605
    opened by AulonSal 1
  • ctrl-w as delete word

    ctrl-w as delete word

    vim and many other programs (and terminal emulators) use ctrl-w as delete word. also this is my first contribution to society lol

    also the other changes are from this error: https://stackoverflow.com/questions/71507321/go-1-18-build-error-on-mac-unix-syscall-darwin-1-13-go253-golinkname-mus

    opened by gaoDean 0
  • Update dependencies to fix source builds on M1

    Update dependencies to fix source builds on M1

    When building on my M1 Mac with go1.18.3, I got the following error:

    make
    go build -o bin/tt src/*.go
    # golang.org/x/sys/unix
    ../../go/pkg/mod/golang.org/x/[email protected]/unix/syscall_darwin.1_13.go:25:3: //go:linkname must refer to declared function or variable
    ../../go/pkg/mod/golang.org/x/[email protected]/unix/zsyscall_darwin_arm64.1_13.go:27:3: //go:linkname must refer to declared function or variable
    ../../go/pkg/mod/golang.org/x/[email protected]/unix/zsyscall_darwin_arm64.1_13.go:40:3: //go:linkname must refer to declared function or variable
    ../../go/pkg/mod/golang.org/x/[email protected]/unix/zsyscall_darwin_arm64.go:28:3: //go:linkname must refer to declared function or variable
    ../../go/pkg/mod/golang.org/x/[email protected]/unix/zsyscall_darwin_arm64.go:43:3: //go:linkname must refer to declared function or variable
    ../../go/pkg/mod/golang.org/x/[email protected]/unix/zsyscall_darwin_arm64.go:59:3: //go:linkname must refer to declared function or variable
    ../../go/pkg/mod/golang.org/x/[email protected]/unix/zsyscall_darwin_arm64.go:75:3: //go:linkname must refer to declared function or variable
    ../../go/pkg/mod/golang.org/x/[email protected]/unix/zsyscall_darwin_arm64.go:90:3: //go:linkname must refer to declared function or variable
    ../../go/pkg/mod/golang.org/x/[email protected]/unix/zsyscall_darwin_arm64.go:105:3: //go:linkname must refer to declared function or variable
    ../../go/pkg/mod/golang.org/x/[email protected]/unix/zsyscall_darwin_arm64.go:121:3: //go:linkname must refer to declared function or variable
    ../../go/pkg/mod/golang.org/x/[email protected]/unix/zsyscall_darwin_arm64.go:121:3: too many errors
    make: *** [all] Error 2
    

    A quick Google indicated that the golang.org/x/sys/unix package was out of date. I also took the opportunity to update the rest of the packages.

    What I did was:

    go get -u ./...
    go mod tidy
    
    opened by jagger27 0
Releases(v0.4.2)
Owner
null
Typistone - Typing races in your terminal

typistone (WIP) A typeracer clone for the terminal users. Usage go run . and th

Rudraksh Pareek 0 Apr 12, 2022
Stonks is a terminal based stock visualizer and tracker that displays realtime stocks in graph format in a terminal.

Stonks is a terminal based stock visualizer and tracker. Installation Requirements: golang >= 1.13 Manual Clone the repo Run make && make install Pack

Eric Moynihan 514 Sep 18, 2022
tfacon is a CLI tool for connecting Test Management Platforms and Test Failure Analysis Classifier.

Test Failure Classifier Connector Description tfacon is a CLI tool for connecting Test Management Platforms and Test Failure Analysis Classifier. Test

Red Hat Quality Engineering 3 Jun 23, 2022
Test-app-url-shortner - A sample url shortener app to test Keploy integration capabilities

test-app-url-shortner A sample url shortener app to test Keploy integration capa

null 1 Jan 23, 2022
Go-test-app - Test application to verify environment deployment and reachability over HTTP

Test app Test application to verify environment deployment and reachability over

Universal Development 2 May 23, 2022
wy : a set of command-line tools to test your container-based platform

wy wy (Abbreviation of Would You) is a set of command-line tools to test your container-based platform. ToC: Commands Deployment Monitoring Contributi

Yusuke Kuoka 2 Apr 30, 2022
Raspberry Pi terminal based activity monitor

pitop Raspberry Pi terminal based activity monitor Yes I know there are plenty of solutions already available, but I wanted to build my own terminal b

Pierre 219 Sep 2, 2022
A modern and intuitive terminal-based text editor

micro is a terminal-based text editor that aims to be easy to use and intuitive, while also taking advantage of the capabilities of modern terminals

Zachary Yedidia 20.4k Oct 3, 2022
A collection of terminal-based widgets for richer Golang CLI apps.

Flinch A collection of terminal-based widgets for richer Golang CLI apps. Ships with a library to build your own widgets/TUIs too. Warning: This modul

Liam Galvin 39 Jul 22, 2022
A terminal based graphical activity monitor inspired by gtop and vtop

NO LONGER MAINTAINED. A maintained fork of gotop exists at https://github.com/xxxserxxx/gotop. Another terminal based graphical activity monitor, insp

Caleb Bassi 7.3k Sep 24, 2022
Terminal based dashboard.

Termdash is a cross-platform customizable terminal based dashboard. The feature set is inspired by the gizak/termui project, which in turn was inspire

Jakub Sobon 2.1k Sep 26, 2022
A terminal based file manager

Keep those files organized About The Project A terminal based file manager Built With Go bubbletea bubbles lipgloss Installation go install github.com

Tyler Knipfer 331 Sep 30, 2022
Terminal based presentation tool

Terminal based presentation tool

Maas Lalani 6.1k Sep 23, 2022
TScli - a very simple terminal-based client for TSWeb online judge

TScli TScli - a very simple terminal-based client for TSWeb online judge. It supports submitting problems and receiving feedback on them. Installation

Sergey Kharitontsev-Beglov 4 Oct 24, 2021
A terminal-based download manager written in Go!

goload-manager About A terminal-based download manager written in Go! This project uses grab for downloading and tcell for the terminal interface. Hea

Manolis Skouris 4 Oct 7, 2021
basic terminal based chat application written in go

this app uses websocket protocol to communicate in real time. both the client and the server are written in golang. it uses: gorilla/websocket package

Abidin Durdu 0 Nov 4, 2021
A go lib based on tcell which builds a simple menu UI in your terminal.

MenuScreen A simple go lib based on github.com/gdamore/tcell/v2,which helps you build a simple menu UI in your terminal. Install go get -u github.com/

SCU-SJL 0 Nov 11, 2021
cview - Terminal-based user interface toolkit

cview - Terminal-based user interface toolkit This package is a fork of tview. See FORK.md for more information. Demo ssh cview.rocketnine.space -p 20

Trevor Slocum 2 Jan 23, 2022
Go-wordle - Terminal based wordle game

Go-wordle - Terminal based wordle game

Ann Kilzer キルザー杏 7 Feb 25, 2022