chore: initialize repository and staged implementation plan
This commit is contained in:
commit
cb0e9d156f
48 files changed
+7343
No files matched your search
@@ -0,0 +1,24 @@
|
||||
from PIL import Image, ImageDraw
|
||||
|
||||
|
||||
class ClockApp:
|
||||
kind = 'clock'
|
||||
title = 'Часы'
|
||||
icon = 'C'
|
||||
cmd = 'clock'
|
||||
|
||||
def __init__(self):
|
||||
pass
|
||||
|
||||
def render(self, fonts, bg, now):
|
||||
img = Image.new('1', (128, 64), 0)
|
||||
d = ImageDraw.Draw(img)
|
||||
d.text((64, 20), now.strftime("%H:%M:%S"),
|
||||
font=fonts['big'], fill=1, anchor="mm")
|
||||
d.text((64, 44), "Esc - выход",
|
||||
font=fonts['small'], fill=1, anchor="mm")
|
||||
return img
|
||||
|
||||
def handle_key(self, code, mods, system):
|
||||
# Clock никаких клавиш не обрабатывает; Esc = system-level.
|
||||
return False
|
||||
Reference in new issue
Block a user