A terminal-based typing test application written in Rust.
- Two Game Modes:
- Words: Type a specific number of words.
- Time: Type for a specific amount of time.
- Difficulty Levels: Choose between Easy, Medium, and Hard word lists.
- Customizable Layout: Select from different visual themes.
- Configuration Menu: An interactive menu to easily change settings.
- Persistent Results: Your WPM and accuracy are saved for each test configuration.
- Stats View: View your saved stats in a table and a graph.
-
Clone the repository:
git clone https://github.com/CYKLER01/typing_test cd typing_test -
Build the project:
cargo build --release
-
Run the application:
- To start a typing test with the current settings:
./target/release/typing_test
- To open the settings menu:
./target/release/typing_test -m
- To see your saved stats:
./target/release/typing_test -s
- To see the help message:
./target/release/typing_test -h
- To start a typing test with the current settings:
You can install the application to make it available system-wide.
-
Install the binary:
cargo install --path .This will install the binary to
~/.cargo/bin/typing_test. -
Ensure
~/.cargo/binis in yourPATH: Add the following line to your shell's configuration file (e.g.,~/.bashrc,~/.zshrc):export PATH="$HOME/.cargo/bin:$PATH"
-
Run the application: You can now run the application using the
typing_testcommand:typing_test typing_test -m
-
(Optional) Rename the command: If you want to use a different command, like
rusttt, you can rename the binary or create a symbolic link. For example:mv ~/.cargo/bin/typing_test ~/.cargo/bin/rusttt
Now you can run the application with:
rusttt rusttt -m rusttt -s
- The application will start in the game mode specified in your configuration.
- Start typing the words displayed on the screen.
- The text will change color to indicate correct and incorrect characters.
- Press the
Spacebarto move to the next word. - Press
Tabto restart the test. - Press
Escto exit the test.
You can access the stats view by running the application with the -s or --stats flag.
cargo run -- -s
```
In the stats view, you can:
* Navigate between game modes using the `Up` and `Down` arrow keys.
* Switch between a table and a graph display using the `t` and `g` keys.
* Press `q` to quit the stats view.
## Settings Menu
You can access the settings menu by running the application with the `-m` or `--menu` flag.
```bash
cargo run -- -m
```
In the menu, you can:
* Navigate between options using the `Up` and `Down` arrow keys.
* Change the values of the selected option using the `Left` and `Right` arrow keys.
* Press `Enter` to save your changes.
* Press `q` to quit the menu.
### Available Settings
* **Game Mode:** `Words` or `Time`.
* **Test Length (Words):** The number of words for the "Words" game mode.
* **Time Limit (Seconds):** The duration for the "Time" game mode.
* **Layout Theme:** `Default` or `Boxes`.
* **Word List Difficulty:** `Easy`, `Medium`, or `Hard`.
## Configuration
The application saves your settings and test results in a `config.json` file. This file is located in the appropriate configuration directory for your operating system.
* **Linux:** `~/.config/typing_test/config.json`
* **macOS:** `~/Library/Application Support/com.gemini.typing_test/config.json`
* **Windows:** `C:\Users\<YourUser>\AppData\Roaming\gemini\typing_test\config\config.json`
You can manually edit this file to change the color theme or other advanced settings.