I want to have Conky display the time using words and not numbers.
What I want to do is more or less how the Pebble Watch looks (Red watch).
Like in the image, even if only the time and not the date can be shown.
Is this possible?
I want to have Conky display the time using words and not numbers.
What I want to do is more or less how the Pebble Watch looks (Red watch).
Like in the image, even if only the time and not the date can be shown.
Is this possible?
Lua scripting solution
This is indeed possible using Lua scripting. You can use the script below (the number conversion is taken from rosettacode.org).
The script can do a boring option, which will translate 12:45 to "twelve forty-five", and an awesome option which will translate it to "a quarter to one". It also does a Uri Herrera option which does the hour bold ;)
Also it automatically refreshes, when the time changes.
Now save it somewhere, for the purpose of this question assume we save it as
~/.config/conky/scripts/pretty_time.lua
Now edit your
.conkyrc
, beforeTEXT
add a linethis loads the script so we can access the functions.
Then, at the appropriate place below
TEXT
, you can call the functions in the following way (conky automatically adds theconky_
prefix)This will result in
If you want the seconds, this shouldn't be too hard to add yourself.
Yes, it's possible, but only through Lua scripting. You'll need a script that takes in numbers and outputs words. A lot of frameworks like Django have this feature, but you might be on your own unless there's an equivalent Lua library for it:
You may just simply want to write a Python script which leverages Django for the translation using its templating language.
you can write a python script for this using
pynum2word
library available at this sourceforge pageBasically what it does is:
a trivial example is what I did here:
Now to make this rendered by conky, create a directory inside your conky config directory e.g.
~/.conky/pyscripts/
and putpynum2word
library inside it, now create another file saytimeToWord
and put this script into this file:You can change the formatting of time and include the date too, if you want. For formatting options have a look at this page.
then open the conky config file
/etc/conky/conky.conf
and put this line somewhere:What this line does is, it execute the script file every 30 seconds and update the output on conky window.
Of course you can freely place the script files in any directory but make sure the
pynum2word
library is in same directory.Couldn't you create a symbol-font which consists of images of the written word for every numeral? Than you should just have to choose this font (if possible) for the display of time.