A simple TUI stopwatch that uses rawterm v4.0.9 via swift's C++ FFI bridge.
Requirements: swift 6.3+
For compilation, use any of the following commands:
$ swift build # To compile the binary
$ swift run # Execute
$ swift run timer --wiggle # Enable digit wiggle animationThe binary is built to .build/debug/timer
While running, the following keybinds are available:
r- reset the timerc- manually reload caption messageSPC- start/stop the timerq- quit timer app
A caption is read from the file caption.txt at the top of this repo. An
example is provided. While this can be manually reloaded with the c keybind,
we re-read the caption file on every clock tick to hot-reload the caption.
No manual reload should be required during everyday operation
void draw(Cursor&, const std::string*, std::size_t) constoverload added to facilitate using a swift Array inCRawterm/rawterm/extras/border.hCRawterm/rawterm/extras/menu.htweaked relative includes to satisfy swift/clang