A clock app in terminal written in Rust, supports local clock, timer and stopwatch.

Overview

clock-tui (tclock)

A clock app in terminal. It support the following modes:

Clock

clock

Timer

timer

Stopwatch

stopwatch

Countdown

countdown

Usage

Install

Install excutable by cargo:

$ cargo install clock-tui

Basic usage

$ tclock

Run this command to start a clock, and press q to exit.

You can always use -h or --help to show help message, for exmaple

$ tclock --help

# or
$ tclock clock -h

Clock mode, this it the default mode

$ tclock clock

# Or just run
$ tclock

For more details, run tclock clock -h to show usage.

Run timer

# Start timer for 5 minutes
$ tclock timer -d 5m

The option -d or --duration to set time, for example 100s, 5m, 1h, etc.

You can press Space key to pause and resume the timer.

The timer mode also accept additional command to run when the timer ends, for example:

tclock timer -d 25m -e terminal-notifier -title tclock -message "'Time is up!'"

Here we use terminal-notifier to fire a notification when time is up.

For more details, run tclock timer -h to show usage.

Run stopwatch

$ tclock stopwatch

For more details, run tclock stopwatch -h to show usage.

Run countdown

$ tclock countdown --time 2023-01-01 --title 'New Year 2023'`

You can use -t or --time to specify time, for example: 2023-01-01, 20:00, '2022-12-25 20:00:00' or 2022-12-25T20:00:00-04:00.

You can use -r or --reverse to run in count-up mode, it counts up duration since the specific time.

For more details, run tclock countdown -h to show usage.

Customize style

You can customize the styles.

Size

You can use -s or --size option to custome clock size, for example:

$ tclock -s 2

Color

You can use -c or --color to set clock forground color, for exmaple:

# color name, any one of: 
# Black, Red, Green, Yellow, Blue, Magenta, Cyan, Gray, DarkGray, LightRed,
# LightGreen, LightYellow, LightBlue, LightMagenta, LightCyan, White
$ tclock -c yellow

# or hex color
$ tclock -c '#e63946'

License

MIT License, refer to LICENSE for detail.

Comments
  • 7-segment display style

    7-segment display style

    Unicode 13 added these 7-segment display characters:

    🯰 🯱 🯲 🯳 🯴 🯵 🯶 🯷 🯸 🯹 (Image in case they aren't appearing: Screenshot from 2022-08-16 13-38-36)

    I was thinking about adding a --style/-S option to let you choose the letter style between the brick chars and 7-segment chars.

    Before I work on this I was wondering if this was contribution you'd be interested in accepting?

    opened by wezm 9
  • Tagged releases

    Tagged releases

    Hi I would like to create an AUR package for clock-tui. To do so it's preferred to be able to package versioned releases. Would it be possible for you to create git tags and/or GitHub releases for each new version in order to facilitate this?

    opened by wezm 5
  • Timer enhancement ideas

    Timer enhancement ideas

    I checked out a bunch of clock/timer tools and this one looks really good. I had some ideas for the timer that might be interesting:

    • [x] Allow the fractional seconds to be disabled (they can be a bit distracting).
    • [x] When the timer ends make it blink, perhaps in a different colour.
    • [x] Accept a command to run when the timer ends. This could be used to invoke notify-send to show a notification when the timer ends
      • E.g tclock timer -d 14m -e notify-send 'Timer' 'The timer has finished'
    opened by wezm 3
  • extract a font layer and reimplement the bricks font

    extract a font layer and reimplement the bricks font

    Inspired from https://github.com/race604/clock-tui/issues/14#issuecomment-1216514274 by @wezm, I want to extract a font layer to make it open to other styles of font.

    opened by race604 1
  • support multiple durations for timer

    support multiple durations for timer

    In many cases, we manage time by split time into multiple slots, such as Pomodoro Technique. We propose to support multiple durations for timer, after this PR, we can run our own Pomodoro like this:

    tclock timer -d 25m 5m -t Work Break -r
    
    opened by race604 0
  • Add option to start the timer paused

    Add option to start the timer paused

    For my usage of the timer I've been starting it then hitting space and later letting it run when I've done some other things. This PR adds an option to the timer to start it in the paused state.

    opened by wezm 0
  • Small code clean up

    Small code clean up

    Noticed a few things that could be cleaned up as well as addressed a few clippy suggestions. I also created a trait for widgets that can be paused and implemented it for stopwatch and timer.

    opened by wezm 0
Releases(v0.5.0)
  • v0.5.0(Sep 5, 2022)

    What's Changed

    • fix lint error reported by clippy by @race604 in https://github.com/race604/clock-tui/pull/18
    • support customized timezone for clock by @race604 in https://github.com/race604/clock-tui/pull/20
    • reorganize code to bin and lib crate by @race604 in https://github.com/race604/clock-tui/pull/21
    • add xtasks to generate man page and autocomplete files by @race604 in https://github.com/race604/clock-tui/pull/22
    • extract a font layer and reimplement the bricks font by @race604 in https://github.com/race604/clock-tui/pull/23

    Full Changelog: https://github.com/race604/clock-tui/compare/v0.4.0...v0.5.0

    Source code(tar.gz)
    Source code(zip)
  • v0.4.0(Aug 31, 2022)

    What's Changed

    • implement countdown timer by @race604 in https://github.com/race604/clock-tui/pull/17
    • 9ef4575 update README for countdown mode
    • f3e58a6 support H:M format in countdown
    • 1215037 pad zeros to keep width in consistent
    • 3c1b0c1 fix bug in parsing color name
    • 75e7de9 support millis option for countdown timer

    Full Changelog: https://github.com/race604/clock-tui/compare/v0.3.2...v0.4.0

    Source code(tar.gz)
    Source code(zip)
  • v0.3.2(Aug 24, 2022)

    What's Changed

    • Small code clean up by @wezm in https://github.com/race604/clock-tui/pull/12
    • Add option to start the timer paused by @wezm in https://github.com/race604/clock-tui/pull/13
    • bump version to v0.3.2 by @race604 in https://github.com/race604/clock-tui/pull/15

    Full Changelog: https://github.com/race604/clock-tui/compare/v0.3.1...v0.3.2

    Source code(tar.gz)
    Source code(zip)
  • v0.3.1(Aug 8, 2022)

    What's Changed

    • Create LICENSE by @race604 in https://github.com/race604/clock-tui/pull/8
    • tune the blink interval by @race604 in https://github.com/race604/clock-tui/pull/9
    • bump version to 0.3.1 by @race604 in https://github.com/race604/clock-tui/pull/10

    Full Changelog: https://github.com/race604/clock-tui/compare/v0.3.0...v0.3.1

    Source code(tar.gz)
    Source code(zip)
  • v0.3.0(Aug 7, 2022)

    What's Changed

    • Add flag to hide fractional seconds on timer by @wezm in https://github.com/race604/clock-tui/pull/2
    • Blink timer when it finishes by @wezm in https://github.com/race604/clock-tui/pull/3
    • lower tick rate when non-millis by @race604 in https://github.com/race604/clock-tui/pull/4
    • accept a command to run when the timer ends by @race604 in https://github.com/race604/clock-tui/pull/5
    • bump version to 0.3.0 by @race604 in https://github.com/race604/clock-tui/pull/6

    New Contributors

    • @wezm made their first contribution in https://github.com/race604/clock-tui/pull/2
    • @race604 made their first contribution in https://github.com/race604/clock-tui/pull/4

    Full Changelog: https://github.com/race604/clock-tui/compare/v0.2.1...v0.3.0

    Source code(tar.gz)
    Source code(zip)
  • v0.2.1(Aug 7, 2022)

  • v0.2.0(Aug 7, 2022)

  • v0.1.0(Aug 7, 2022)

Owner
Jimmy
Jimmy
A command-line tool aiming to upload the local image used in your markdown file to the GitHub repo and replace the local file path with the returned URL.

Pup A command line tool aiming to upload the local image used in your markdown file to the GitHub repo and replace the local file path with the return

SteveLau 11 Aug 17, 2022
A terminal clock that uses 7-segment display characters

Seven-segment clock (7clock) 7clock.3.mp4 This is a clock for terminals that uses the Unicode seven-segment display characters added in Unicode 13.0.

Wesley Moore 4 Nov 11, 2022
A simple CLI pomodoro timer written in Rust.

Pomodoro A simple CLI pomodoro timer written in Rust. Based on the Pomodoro Technique. Works on any platform that supports desktop notifications. Exam

null 6 Nov 26, 2021
An egui app for prompting a local offline LLM.

An egui app for prompting a local offline LLM. Description coze is a small egui application for prompting a local offline LLM using the Huggingface ca

null 23 Mar 9, 2024
Command-line Pomodoro Timer

pomosh Command-line Pomodoro Timer written in Rust Pomosh is a command-line pomodoro timer written in Rust that (supposedly) help you focus on your ta

Jii 5 Apr 27, 2024
SP3 Precise GNSS Orbit and Clock parser :artificial_satellite:

SP3 SP3 Precise GNSS Orbit files parser. SP3 is specifid by IGS. The parser only supports Revisions C & D at the moment and rejects revisions A & B. G

gwbres 4 Aug 31, 2023
Kit-kat clock utility rewritten in Rust using minifb

kitkat clock in Rust This is the plan9 cat clock utility rewritten in rust with minifb crate. $ kitkat --help Usage: kitkat [--hook|--crazy|--offset O

Manos Pitsidianakis 18 Oct 19, 2022
Detects whether a terminal supports color, and gives details about that support

Detects whether a terminal supports color, and gives details about that support. It takes into account the NO_COLOR environment variable. This crate i

Kat Marchán 30 Dec 29, 2022
Detects whether a terminal supports unicode.

Detects whether a terminal supports unicode. This crate is a Rust port mashing together @sindresorhus' is-unicode-supported and @iarna's has-unicode N

Kat Marchán 11 Jul 29, 2022
zigfi is an open-source stocks, commodities and cryptocurrencies price monitoring CLI app, written fully in Rust, where you can organize assets you're watching easily into watchlists for easy access on your terminal.

zigfi zigfi is an open-source stocks, commodities and cryptocurrencies price monitoring CLI app, written fully in Rust, where you can organize assets

Aldrin Zigmund Cortez Velasco 18 Oct 24, 2022
A todo list app that indexes your app to find TODO:'s

forgot A todo list app that indexes your app to find TODO:'s Usage to list all your todos forgot list list all your todos ignoring search in ./target,

null 2 Oct 6, 2022
An over-simplified version control system written in Rust, similar to Git, for local files (Incomplete)

Vault Vault will be a command line tool (if successful) similar to git which would have multiple features like brances etc etc. __ __ _ _

Shubham 3 Nov 21, 2023
Simple Interactive Terminal Todo App in Rust

todo-rs Simple Interactive Terminal Todo App in Rust Quick Start $ cargo run TODO Controls Keys Description k, j Move cursor up and down Shift+K, Shif

Tsoding 56 Dec 8, 2022
Replace an app's icon from a png with a single terminal script. Made with Rust

Replace macOS App Icon Replace an app's icon from a png with a single terminal CLI. Made with Rust

Kunal Bagaria 8 Aug 3, 2022
Simple system monitoring app that runs on terminal. Made purely with Rust.

What is it? RCTOP is a simple WIP system monitoring app that runs purely on terminal and doesn't feature GUI. One can compare it to htop, but more str

Niko Huuskonen 7 Oct 14, 2022
The hacker's BLE (bluetooth low energy) browser terminal app

Blendr is a terminal UI app for browsing BLE (Bluetooth Low Energy) devices. It allows you to inspect, search, connect, and analyze data coming from B

Dmitriy Kovalenko 120 Jul 4, 2023
Rust library for integrating local LLMs (with llama.cpp) and external LLM APIs.

Table of Contents About The Project Getting Started Roadmap Contributing License Contact A rust interface for the OpenAI API and Llama.cpp ./server AP

Shelby Jenkins 4 Dec 18, 2023
By mirroring traffic to and from your machine, mirrord surrounds your local service with a mirror image of its cloud environment.

mirrord lets you easily mirror traffic from your Kubernetes cluster to your development environment. It comes as both Visual Studio Code extension and

MetalBear 2.1k Jan 3, 2023
Bolik Timeline is local-first software for keeping notes and files.

Bolik monorepo Bolik Timeline is local-first software for keeping notes and files. This repo contains alpha-quality software. This means that we are e

Bolik Oy 18 Apr 11, 2023