From 863f7453f9e136cadc93db9f3f0b8f257f798ce8 Mon Sep 17 00:00:00 2001 From: "Danilo M." Date: Fri, 13 Nov 2026 14:06:41 +0100 Subject: feat(tablet): a font of the PC's for the dim cover's clock [tablet] clock_font names a font family installed on the PC; the server finds its file with fc-match and serves it at /fonts/clock, and the cover's clock uses it, the date too while clock_font_date is on (default). fc-match falls back to any font, so the route answers only when the returned family is the one named; otherwise the page font stays. The font file never enters the repo, so a personal-use font can be used on one's own tablet without redistributing it. Co-Authored-By: Claude Opus 5.5 --- deckit/modules/tablet.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'deckit/modules') diff --git a/deckit/modules/tablet.py b/deckit/modules/tablet.py index 71f7a95..08f12fa 100644 --- a/deckit/modules/tablet.py +++ b/deckit/modules/tablet.py @@ -112,6 +112,7 @@ def make(cfg: dict) -> Module: tcfg = cfg.get("tablet", {}) dim_after = max(0, int(tcfg.get("dim_after", 120))) level = min(255, max(0, int(tcfg.get("dim_brightness", 8)))) + clock = {"clock_font": bool(tcfg.get("clock_font")), "clock_font_date": bool(tcfg.get("clock_font_date", True))} saved = {} # mode and brightness from before a dim; empty while bright try: saved["mode"], saved["level"] = DIM_FILE.read_text().split() @@ -154,5 +155,5 @@ def make(cfg: dict) -> Module: pass return Module(name="tablet", title="Tablet", - state=lambda: {**state(), "dim_after": dim_after}, + state=lambda: {**state(), "dim_after": dim_after, **clock}, actions={"dim": dim, "undim": undim}, stop=stop) -- cgit v1.2.3