Skip to content

dhruvasagar/cursed-timer

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

71 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Cursed Timer v0.4.0

A simple Console Timer Application for Recording Rubik Cube Solving Times

Demo

asciicast

Installation

Cargo Install

You can install it using cargo

$ cargo install cursed-timer

Linux (Pre-built Binary)

You can download the pre-built binary from the Releases page. Download the cursed-timer-x86_64-unknown-linux-gnu.tar.gz for linux. Once you have the tarball file with the executable, you can follow these steps to install:

$ tar -zxvf cursed-timer-x86_64-unknown-linux-gnu.tar.gz
$ sudo mv cursed-timer /usr/bin/

Mac OS (Pre-built Binary)

You can download the pre-build binary from the Releases page. Download the cursed-timer-x86_64-apple-darwin.tar.gz tarball for mac os. Once you have the tarball file with the executable, you can follow these steps to install:

$ tar -zxvf cursed-timer-x86_64-apple-darwin.tar.gz
$ sudo mv cursed-timer /usr/bin/

Windows (Pre-built Binary)

You can download the pre-build binary from the Releases page. Download the cursed-timer-x86_64-pc-windows-msvc.zip zip file for windows. unzip the zip file & move the cursed-timer.exe to a location in the PATH system environment variable.

Note: If you Run into an msvc error, please install MSCV from here

Usage

Run the timer:

$ cursed-timer

A solve, start to finish

  1. The Idle screen shows your scramble, stats, a history list, and a solve-times chart.
  2. Press <Space> to start the inspection countdown.
  3. Hold <Space>. The countdown turns red while you're arming and green once you've held it long enough (the key_hold duration). Release when green to start the solve timer.
    • Release before it turns green and you return to inspection (no false start).
    • If inspection runs out before you start, the solve is recorded as a DNS.
  4. The timer runs. Press any key to stop it; the time is recorded and a new scramble is drawn.

Prefer to skip inspection? Press Ctrl+<Space> from Idle to start the timer immediately.

Terminal note: reliable hold-then-release uses the Kitty keyboard protocol (supported by kitty, foot, WezTerm, and recent xterm). On terminals without it, the timer falls back to starting once you've held past key_hold (or on a second <Space> after it turns green).

Keybindings

Key Action
<Space> Start inspection; then hold and release when green to start the timer
Ctrl+<Space> Start the timer immediately, skipping inspection
any key (while timing) Stop the timer and record the solve
?, h, F1 Show help
r Refresh the scramble
x Delete the last recorded solve (with confirmation)
u Undo the last delete
d Mark the last solve as DNF (with confirmation)
t Mark the last solve as a +2 time penalty (with confirmation)
c Clear all history (with confirmation)
s Save history to disk
q Save and quit (quits help when help is open)
Ctrl+C Quit immediately

Configuration

On first run, a config file is created with sensible defaults:

  • Linux / macOS: ~/.config/cursed-timer/config.toml
  • Windows: %LOCALAPPDATA%\CursedTimer\config.toml
[scramble]
length = 16        # number of moves in a generated scramble

[inspection]
length = 16        # inspection countdown, in seconds
key_hold = 2       # seconds you must hold <Space> before the timer can start

Solve history is stored as CSV alongside the config (history.csv in the same directory) and is loaded on startup. Malformed rows are skipped rather than crashing the app.

Credits

Some Parts of this have been borrowed from https://github.com/cacharle/rutikmer

About

A Console Rubik Cube's Timer using tui-rs

Topics

Resources

Stars

Watchers

Forks

Packages

 
 
 

Contributors

Languages