[clock.py] Option to fill the watch face

Nowadays I prefer the clock face black.
This commit is contained in:
M1dgard 2019-03-01 17:58:32 +01:00
parent bb22bfb6df
commit 0f2d1939de
Signed by untrusted user who does not match committer: midgard
GPG key ID: 511C112F1331BBB4

View file

@ -6,6 +6,9 @@ import time
import pytz
FILL_CLOCK_FACE = False
try:
# if len(sys.argv) < 3:
# print("Usage: {scriptname} timezone_left timezone_right".format(scriptname=sys.argv[0]), file=sys.stderr)
@ -26,7 +29,10 @@ try:
minute = minutehands[ t.minute // 5 ]
hour = hourhands [ t.hour % 12 ]
return color_for(t) + "%{T8}%{F}%{F#000}%{O-27}" + hour + "%{O-27}" + minute + "%{T-}%{F}"
if FILL_CLOCK_FACE:
return color_for(t) + "%{T8}%{F#000}%{O-27}" + hour + "%{O-27}" + minute + "%{T-}%{F}"
else:
return "%{O1}%{T8}" + color_for(t) + "%{O-27}" + hour + "%{O-27}" + minute + "%{T-}%{F}"
def color_for(t):