A colourful binary clock for the terminal.
Clone or download
Latest commit afd66c0 Jan 15, 2019
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
assets add example pictures Jan 11, 2019
src update version Jan 15, 2019
.gitignore initial commit Jan 7, 2019
CMakeLists.txt refactor tui into its own class Jan 13, 2019
LICENSE initial commit Jan 7, 2019
README.md update readme Jan 14, 2019
build.sh fix build usage flags Jan 15, 2019
env.sh initial commit Jan 7, 2019
install.sh support systems that use doas over sudo Jan 13, 2019

README.md

Peaclock

A colourful binary clock for the terminal.

default

binary

digital

About

Peaclock is a customizable binary clock made for the terminal.

Each column represents a single digit. The first two columns are the two hour digits, the next two are the minute digits, and the last two are the seconds digits.

The bottom row is the low-order bit, which makes it worth a value of 1. The next row up is worth 2, then 4, followed by 8. Adding up the on bits gives the value of the digit.

 |  |  | < 8
 | || || < 4
|| || || < 2
|| || || < 1
HH:MM:SS

Features

  • digital clock
  • binary clock
  • 12/24 hour time
  • customize with hex colour codes
  • set a custom unicode character for the binary clock graphic
  • compact or expanded mode
  • toggle visibility of digital and binary clocks
  • command prompt with a readline-like interface

Usage

View the usage and help output with the --help or -h flag. The help output also contains the documentation for the key bindings and commands for customization.

Terminal Compatibility

The default colour output is chosen depending on the presence of the COLORTERM environment variable. Most modern terminal emulators that support true colour will automatically set this variable to either truecolor or 24bit. If either of those values are found, peaclock will default to using 24-bit or true colour. If the variable is empty, or set to anything else, peaclock will default to using 4-bit colours. The default chosen is for the initial state, one can still set the colours to use another value. If the terminal doesn't support the value given, it may just end up showing as the colour white.

Build

Environment

  • Linux (supported)
  • BSD (supported)
  • macOS (supported)

Requirements

  • C++17 compiler
  • CMake >= 3.8

Dependencies

  • none

Libraries:

  • parg: for parsing CLI args, included as ./src/ob/parg.hh

The following shell command will build the project in release mode:

./build.sh

To build in debug mode, run the script with the --debug flag.

Install

The following shell command will install the project in release mode:

./install.sh

To install in debug mode, run the script with the --debug flag.

License

This project is licensed under the MIT License.

Copyright (c) 2019 Brett Robinson

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.