Binary Clock for Conky

Conky

Source (link to git-repo or to original if based on someone elses unmodified work): Add the source-code for this project on opencode.net

0
Score 50.0%
Description:

This is a python script to display a binary clock with conky. The last preview is an example of how to read the time. You must have the font "Pizza Dude Bullets" installed which is included in the archive along with a sample conkyrc. The clock can be either horizontal or vertical, 12 hour or 24 hour, and the column numbers can be turned on or off. It can even display different timezones. Make sure to read the help.


Usage: byclock.py -v|-o|-m|-c|-f|--vertical|--offset|--military|--font|--columns

Options:
--version show program's version number and exit
-h, --help show this help message and exit
-v, --vertical Output a vertical clock
-o OFFSET, --offset=OFFSET
Use a different time zone by specifying the offset
-m, --military Output a 24-hour clock
-c, --columns Display column numbers
-f FONT, --font=FONT Specify a font for the column numbers. Default is Sans
if not specified



I'm sure there's probably some bugs in it. If you find any, let me know.
Last changelog:

10 years ago

0.9
Initial release.

lonerocker

10 years ago

I don't know if it is a bug or not, but it didn't work well. With the script the conky displayed repeated, like a black shadow behind every character; besides, some pizza fonts appeared on top, when the clock was on bottom, and the clock itself wasn't right either, some characters were on top of others, some on the side... it was a mess.
But the idea is really good.

Report

C

downdiagonal

10 years ago

Hi lonerocker,

Can you post a screenshot so that I can maybe tell what the problem is?

Also, you might try changing draw_shades to no.

Report

lonerocker

10 years ago

Ok, it's strange, but before the shades were set to yes and weren't displayed, so I changed it to no, and now looks better and those characters on top are no longer. But there's still a problem of alignment, as you can see in the screenshot.

http://img255.imageshack.us/img255/4880/pantallazo2xp7.png

Again, nice work with the nerdy clock.

Report

C

downdiagonal

10 years ago

Thanks.

That seems to be a problem with trying to use the clock in an existing conkyrc. You might try adding a ${font} tag before the call to the clock, or we can try to add some space to that first line to make it line up. To do that, you'll have to change the line:

Quote:
for g,i in enumerate(horzclock(hours,minutes,seconds)): print cols(columns,g,options.font)+fontpiz + ' '.join(i)

To:
Quote:
for g,i in enumerate(horzclock(hours,minutes,seconds)): print ['',' '][g==0] + cols(columns,g,options.font)+fontpiz + ' '.join(i)


Note that that should still be just one line. You should be able to change the number of spaces in this part, ,' '] until you can get it to line up correctly.

Report

lonerocker

10 years ago

the script had this line, not exactly like the one you say

Quote:for g,i in enumerate(horzclock(hours,minutes,seconds)): print '${offset %s}' % hoffset,cols(columns,g,options.font), fontpiz + ' '.join(i)

when replaced, it got all aligned.

Report

10 years ago

0.9
Initial release.

12345678910
product-maker Count: 4 Rating: 5.0
File (click to download) Version Description Downloads Date Filesize DL OCS-Install
Pling
*Needs ocs-url or ocs-store to install things
Details
license
version
0.9
updated Feb 15 2009
added Feb 15 2009
downloads 24h
0
page views 24h 3