All Projects → nwtnni → tock

nwtnni / tock

Licence: MIT License
Digital clock for the terminal

Programming Languages

rust
11053 projects

Projects that are alternatives of or similar to tock

pioneer-pro-dj-linux
Hopefully one day this application will be able to send files to a rekordbox compatible DJ player.
Stars: ✭ 23 (-68.49%)
Mutual labels:  terminal-based
alarm-clock-v3
Alarm clock (v3)
Stars: ✭ 17 (-76.71%)
Mutual labels:  clock
MD DS3231
DS3231 Real Time Clock Library
Stars: ✭ 29 (-60.27%)
Mutual labels:  clock
Countdown-Gif-Generator
Generates a gif of a countdown clock at the endpoint that can be used on websites and in emails
Stars: ✭ 21 (-71.23%)
Mutual labels:  clock
tm
timers and timeline
Stars: ✭ 31 (-57.53%)
Mutual labels:  clock
timeclock
Simple work time clocking service
Stars: ✭ 21 (-71.23%)
Mutual labels:  clock
jot
Command-line note-taking for minimalists
Stars: ✭ 24 (-67.12%)
Mutual labels:  terminal-based
coinbash
💰 A bash script (CLI) for displaying crypto currencies market data in a terminal 🖥
Stars: ✭ 110 (+50.68%)
Mutual labels:  terminal-based
golflike
A golf roguelike
Stars: ✭ 19 (-73.97%)
Mutual labels:  terminal-based
vue-circular-count-down-timer
a count down timer library for vue.js
Stars: ✭ 45 (-38.36%)
Mutual labels:  clock
ArcPageIndicator
Android Page Indicator for ViewPager with original animations. It uses an ellipse to dispose indication spots, and can draw a hand, like in old elevators.
Stars: ✭ 73 (+0%)
Mutual labels:  clock
mangadesk
Terminal client for MangaDex 📖
Stars: ✭ 569 (+679.45%)
Mutual labels:  terminal-based
word-clock-screensaver
macOS screensaver displaying the time in English words
Stars: ✭ 80 (+9.59%)
Mutual labels:  clock
daigaku
Daigaku 大学 - Learning the Ruby programming language with a text-based interface
Stars: ✭ 22 (-69.86%)
Mutual labels:  terminal-based
rn-analog-clock
React-Native (iOS native bridge) native alternative to traditional time picker (Objective C bridge version).
Stars: ✭ 19 (-73.97%)
Mutual labels:  clock
TWchat
An Geek style terminal based WeChat client
Stars: ✭ 66 (-9.59%)
Mutual labels:  terminal-based
LoadersPack-Android
Android LoadersPack - a replacement of default android material progressbar with different loaders
Stars: ✭ 119 (+63.01%)
Mutual labels:  clock
asciisciit
ASCII Art, Video, and Plotting Toolbox
Stars: ✭ 71 (-2.74%)
Mutual labels:  terminal-based
Aospdeskclock
Fork of aosp deskclock: alarm,clock, timer,stopwatch
Stars: ✭ 28 (-61.64%)
Mutual labels:  clock
secman
[Archived] 👊 Human-friendly and amazing secrets manager.
Stars: ✭ 63 (-13.7%)
Mutual labels:  terminal-based

tock

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.

Features

  • Efficient bitmap and diff-based drawing
  • Timezone support via the TZ environment variable and tzselect utility
  • Military time and second display toggling
  • Color customization using ANSI, 8-bit, or 24-bit color values
  • Arbitrary date formatting
  • Positioned or centered clock
  • Adjustable display size
  • Synchronization with system clock seconds
  • Minimal syscalls (about one read, write, nanosleep per second)

Screenshots

Screenshot of clock

asciicast of multiple clocks

Installation

Currently requires a Rust installation, and is only available from either:

  1. crates.io
$ cargo install tock
  1. Building from source
$ git clone https://github.com/nwtnni/tock.git
$ cargo build --release
$ ./target/release/tock

Usage

USAGE:
    tock [FLAGS] [OPTIONS]

FLAGS:
    -c, --center
            Center the clock in the terminal.
            Overrides manual positioning.

        --help
            Prints help information

    -m, --military
            Display military (24-hour) time.

    -s, --seconds
            Display seconds.

    -V, --version
            Prints version information


OPTIONS:
    -C, --color <color>
            Change the color of the time.

            Accepts either a [single 8-bit number][0] or
            three comma-separated 8-bit numbers in R,G,B format.
            Does not check if your terminal supports the
            entire range of 8-bit or 24-bit colors.

            [0]: https://en.wikipedia.org/wiki/ANSI_escape_code#8-bit

            [default: 2]

    -f, --format <format>
            Change the date format.

            Accepts a format string using [strftime][0] notation.
            Note that occurrences of the `%Z` specifier are
            naively replaced with the contents of the `TZ` environment
            variable, or the string "Local" if `TZ` is not set.

            [0]: https://docs.rs/chrono/0.4.6/chrono/format/strftime/index.html

            [default: %F | %Z]

    -h, --height <h>
            Font height in characters per tile. [default: 1]

    -w, --width <w>
            Font width in characters per tile. [default: 2]

    -x, --x <x>
            Horizontal 0-indexed position of top-left corner.

            [default: 1]

    -y, --y <y>

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.

Changelog

  • 0.1.4

    • Refactor drawing algorithms for readability.
    • Fix comparison function for Date to avoid redrawing .
  • 0.1.3

    • Draw clock to alternate screen buffer to avoid clearing user information. Thanks @Canop!
  • 0.1.2

    • Fix README formatting (oops).
  • 0.1.1

    • Implement support for date formatting strings via -f option.
    • Fix logic in Brush abstraction by only setting dried flag after writing.
  • 0.1.0

    • Initial release.

References

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].