Crates.io | tock |
lib.rs | tock |
version | 1.0.1 |
source | src |
created_at | 2019-06-17 03:53:47.449681 |
updated_at | 2023-10-13 00:28:33.876935 |
description | Digital clock for the terminal |
homepage | https://github.com/nwtnni/tock |
repository | https://github.com/nwtnni/tock |
max_upload_size | |
id | 141664 |
size | 140,038 |
A digital clock for the terminal, inspired by tty-clock.
Unfortunately only works on UNIX systems due to the use of
the termios
and sigaction
related function calls.
Note: emulating all features of tty-clock is not a goal of this project.
TZ
environment variable and tzselect
utilityread
, write
, nanosleep
per second)Currently requires a Rust installation with version >= 1.70.0
(due to the IsTerminal
trait,
and is only available from either:
cargo-install
cargo install tock
git clone https://github.com/nwtnni/tock.git
cargo build --release
./target/release/tock
A digital clock for the terminal.
Usage: tock [OPTIONS]
Options:
-x, --x <X> Horizontal 0-indexed position of top-left corner [default: 0]
-y, --y <Y> Vertical 0-indexed position of top-left corner [default: 0]
-W, --width <WIDTH> Font width in characters per tile [default: 2]
-H, --height <HEIGHT> Font height in characters per tile [default: 1]
-s, --second Display seconds
-m, --military Display military (24-hour) time
-c, --center Center the clock in the terminal. Overrides manual positioning
-C, --color <COLOR> Change the color of the time [default: 2]
-f, --format <FORMAT> Change the date format [default: "%F | %Z"]
-h, --help Print help (see more with '--help')
Currently compiles with the interactive
feature flag set by default, which
polls stdin
for user input once per second. Available commands with this
feature flag set are:
q
or Q
or <ESC>
: Exit.s
: Toggle second display.m
: Toggle military (24H) time.0
..=7
: Change to corresponding ANSI color.