A clock that runs on the LinuxTerminal!
[ Command used: termclock -af -b -c="f55,05f,f80,09e" -tc="55f,f09"
]
This project is a Ruby gem, a continuation of my previous project term-clock.
TermClock isn't just a clock, it also shows various information about the system as well.
This program depends on Ruby, and Rubygem. It also has dependency of LinuxStat. To install the whole gem, you need these packages:
- A Linux Virtual Terminal Emulator (not TTYs)
- Noto Fonts Emoji or Fonts Noto Color Emoji
- GCC
- Make
On ArchLinux, you can install all of them simply:
# pacman -S ruby gcc make noto-fonts-emoji
On Ubuntu, LinuxMint, Kali Linux, Debian and other Debian based distributions however, you also need ruby-dev package once, as a build-time dependency of LinuxStat, you can uninstall it (ruby-dev) once the program is built:
# apt install ruby ruby-dev gcc make fonts-noto-color-emoji
In both cases, gcc and make are buildtime dependency and you can remove them once the program is built.
To install this gem, run:
$ gem install termclock
$ termclock
Here are list of all the arguments:
1. Help and Version:
--help|-h Shows this help section
--version|-v Shows termclock version
2. Style:
--bold|-b Make texts bold
--italic|-i Make texts italic
--character=|char= Draws specified character
--clean Just run the clean bare clock
--colour=|-c= Specify hex colour (4 colours)
--text-colour=|-tc= Specify text colour (2 colours)
⬢ Colours has to be hex, 3 or 6 characters with or
without the leading # in front
3. Information:
--no-date|-nd Shows no date
--no-message|-nm Shows no messages
--no-sysinfo|-ni Shows no system info
--refresh=|r= Specify delay or refresh time
--no-logo|-nl Don't show the logo at the bottom
4. Antiflicker:
--antiflicker|-af Don't flicker terminal
⬢ If refresh time is low or terminal is slow, use this option
5. Formats:
--date-format=|-df= Specify the date format
--time-format=|-tf= Specify the time format
Usually the format looks like this:
%H:%M:%S:%2N or %d %B, %Y
⬢ Run `date --help` to know more formats
Supported characters are 0 - 9, a - z, /, \, !, %, and |.
🕑 This is Termclock v0.5.0
Run termclock --help
or termclock -h
to see the help.
- You can specify the colours:
$ termclock --colour=f55,55f,55f,eee
# Or
$ termclock -c=f55,55f,55f,eee
- You can also change the default characters:
$ termclock -char="⬢"
# Or
$ termclock --character="⬢"
A basic example is: You can pass multiple characters, which will be shown in the termclock.
$ termclock -char="☺ ☹ "
# Or
$ termclock -char="꧁ ꧂ "
The 2nd one looks like:
- To change the default message (text) colour:
termclock --text-colour=fa0,55f
# Or
termclock -tc=fa0,55f
The colours termclock accept are hex colours. You can have either of these formats:
- #ff5555
- #ff5
- ff5555
- ff5
Using either #3eb or 3eb is equivalent to #33eebb. Using either #3ce3b5 is same as 3ce3b5 (no #).
Note that any characters upto 3 bytes work. An emoji can break term clock's look.
Bug reports and pull requests are welcome on GitHub at https://github.com/Souravgoswami/termclock.
The gem is available as open source under the terms of the MIT License.