Fehérke's GitHub Site == glue between Fehérke's GitHub hosted projects

termclock.sh - draws an analog clock from letters

When I started to learn Linux I met two commands : xclock and bc. And I got the idea to imitate the first using the second.

You will see nothing from the original bc based implementations. I am not really proud of those. The current version uses an “angle” table from which derives the needed sine & cosine values then precalculates the positions. This makes it faster and uses less resources. And of course, reduces the dependencies to tput only.

termclock.sh just indicates the time and indicates the time and… You have to press Ctrl-C to stop it.

sample output - termclock.sh

                                       12

                    11                                    1



      10                                                                2




9                                 m  m o h                                    3
                             m m      s    h
                    m  m  m          s       h h
                                    s            h
                                   s
      8                           s                                     4
                                 s
                                s
                               s
                    7                                     5

                                       6

If you resize the terminal window in which runs, the clock gets resized.

Configuration

None.

Not even command line parameters exist.

Versions

Plans

Download

You can find the related files on GitHub in my bash-script repository’s termclock directory :