Giter Club home page Giter Club logo

htyper's Introduction

htyper

htyper is a typing test for terminals written in Haskell using Brick.

recording

Installation

First make sure you have stack installed. You can install it here. Then clone the repo:

$ git clone https://github.com/Simon-Hostettler/htyper.git

And install htyper:

$ cd htyper
$ stack install

If you're on Apple Silicon and get a compilation error, try running:

C_INCLUDE_PATH="`xcrun --show-sdk-path`/usr/include/ffi" stack install htyper

This will create a copy of the executable in ~/.local/bin . If you want to run htyper from any directory, you should add this to your PATH. This was only tested on Linux, I can't guarantee that installation on another OS will work.

htyper uses the DECSCUSR escape sequence to change the cursor shape, which might not be supported by every terminal.

Usage

Usage: htyper [-q|--quote ARG] [-l|--line_length ARG] [-n|--num_words ARG]
Available options:
  -m,--mode ARG            possible arguments: quote, random, timed
  -t,--time ARG            How long the test should run, only affects timed mode
                           (default: 30)
  -l,--line_length ARG     Number of words to display per line (default: 10)
  -n,--num_words ARG       Number of Words to randomly select (default: 50)
  -h,--help                Show this help text

Running htyper will create the file ~/.config/htyper/htyper.conf, which contains the following settings:

Variable Type (Range) Description
fgcolor Hexadecimal Int (000000 -> ffffff) The color of the test text.
cursorshape Int (0 -> 6) The displayed text cursor. 0-1 = blinking block, 2 = steady block, 3 = blinking underline, 4 = steady underline, 5 = blinking bar, 6 = steady bar.
numcommonwords Int (0 -> 1000) The amount of words to use from the 1000 most common list (Used in Random and Timed Mode).

You can change these lines as you want, but setting them to a value outside of the defined range might have unexpected results.

If you want to change the wordlist, you can edit textfiles/1000us.text, or you can add quotes to textfiles/quotes.txt delimited by a ^_^.

Suggestions

If you have any ideas or suggestions just open an issue or create a pull request.

htyper's People

Contributors

simon-hostettler avatar

Stargazers

balacij avatar Aquib Javed avatar Alejandro avatar Branden Byers avatar Uwo avatar Thandi R. Menelas avatar Md Samin Yasar Islam avatar Simon Slamka avatar  avatar Daniel Hall avatar Pavel Atanasov avatar taki avatar Lakshya avatar Sam avatar Lilith avatar Marcel avatar  avatar  avatar Icy-Thought avatar  avatar Daniel Millier avatar Michael_Scopic avatar  avatar  avatar Filinto Delgado avatar Jon Yoo avatar Shadow Monarch  avatar  avatar Daniel Morawetz avatar  avatar  avatar José Lucas avatar LawlessCarrot avatar Seth Braddock avatar astrolemonade avatar Bo Aanes avatar Frederico Bittencourt avatar Zachary Rice avatar  avatar KYЯΛ avatar MichuuMichuu avatar Alvin C. avatar Zygmut avatar Gabriel Guerra avatar  avatar Josep Bigorra avatar Samyak Sarnayak avatar Reto avatar

Watchers

 avatar

htyper's Issues

Create config file

Want to give users access to change properties of htyper without having to use commandline arguments, such as text color, cursor shape, number of words to include from the 1000 most common file etc. For this a config file needs to be created (not sure on which library to use yet).

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.