Giter Site home page Giter Site logo

bigclock's Introduction

BigClock

BigClock is a full-screen text mode clock that will run on any 80-by-25 character terminal. Though it was designed with DOS in mind, it will also run both on Windows and any UNIX-like OS.

What does it look like?

The text mode UI looks like this (note that in most console fonts, the gaps present in the block characters with GitHub's default fonts will not be present):

   August 2014 Calendar             Today's date

   Su Mo Tu We Th Fr Sa  Wk
                  1  2   30         ██████  ██████  ██████  ██████  ██████
   3  4  5  6  7  8  9   31         █       █    █    ██    ██  ██      ██
   10 11 12 13 14 15 16  32         ██████  ██████    ██    ██  ██  ██████
   17 18 19 20 21 22 23  33              █  █    █    ██    ██  ██  ██
   24 25 26 27 28 29 30  34         ██████  █    █    ██    ██████  ██████
   31                    35




  Local Time


         ██████  ██████    ██    ██████  ██████    ██    ██████  ██  ██
             ██  ██  ██    ██    ██      ██  ██    ██        ██  ██  ██
         ██████  ██  ██          ██████  ██  ██          ██████  ██████
         ██      ██  ██    ██        ██  ██  ██    ██    ██          ██
         ██████  ██████    ██    ██████  ██████    ██    ██████      ██

At present, BigClock assumes a CP437-compliant character set, such as is found by default on DOS and Windows. Unicode support for other OSes is in the works; please adjust your terminal settings to use such a font in the meantime.

How it Works

BigClock's main loop wakes up every one second and refreshes the time. If it detects that the hour has rolled over from 23 to 00, it will additionally refresh the calendar and date.

Each large-format glyph is represented as a C array of block characters (see charset.c).

Build instructions

BigClock is ANSI C-compliant, and should compile under any compliant compiler. It has been tested with Visual Studio on Windows, gcc on Linux, and both Borland Turbo C++ and Digital Mars C++ on DOS.

For systems with GNU Make, a Makefile is included. Windows users with Visual Studio can use NMake with the included NMakefile.mak. Digital Mars DOS users can use the included build_dos.bat to compile a "clock.com", which will run on most DOSes.

Considerations for DOS

On a DOS-based system, it is required to load an ANSI driver such as MS-DOS's ansi.sys, or FreeDOS's nansi.sys - otherwise, the interface's drawing routines will only write garbage to the screen.

Additionally, in a single-tasking OS such as DOS, it's useful to side-load a tool such as FreeDOS's fdapm, to keep the CPU in a low-power state while BigClock sleeps.

bigclock's People

Contributors

don-code avatar

Stargazers

 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.