tui-stopwatch
v1.1.0
Published
A responsive terminal stopwatch with ASCII 7-segment display and keyboard controls.
Maintainers
Readme
TUI Stopwatch
A terminal stopwatch with a 7-segment ASCII display in HH:MM:SS.CC format.
Install
Run directly with npx:
npx tui-stopwatchInstall globally:
npm install -g tui-stopwatch
tui-stopwatchFeatures
- Responsive terminal UI (adapts to window size)
- 7-segment ASCII-style time display
- Theme presets:
classic,neon,amber,mono - Start/pause keys:
spaceando - Split key:
p(stores lap delta + total elapsed) - Export key:
e(writes TXT, CSV, JSON files toexports/) - Theme toggle key:
t - Split scroll keys:
up/down,j/k,home/end,pageup/pagedown - Reset key:
r - Quit keys:
qandCtrl+C - Project-local config in
.stopwatchrc.json
Quick Start
npm install
npm run devBuild and run compiled output:
npm run build
npm startCreate a package tarball preview:
npm pack --dry-run
## Config
Edit `.stopwatchrc.json` to change colors, key bindings, and layout values.
Example:
```json
{
"theme": "amber",
"colors": {
"display": "green",
"separator": "brightBlack",
"accent": "cyan",
"splitLabel": "yellow",
"splitValue": "white",
"hint": "magenta",
"status": "blue"
},
"layout": {
"paddingX": 1,
"paddingY": 1,
"showBorder": true,
"maxSplits": 12,
"displayStyle": "block"
},
"keys": {
"startPause": ["space", "o"],
"split": ["p"],
"export": ["e"],
"quit": ["q", "C-c"]
}
}Notes:
- Color values are terminal color names supported by Blessed.
themepicks a preset palette;colorscan override individual values.- If config is invalid, defaults are used and a warning is shown in-app.
layout.displayStylesupportsclassicandblock.
