From 79d3be64f0a3e4552b08c80f1678649ccbff2a7c Mon Sep 17 00:00:00 2001 From: "Danilo M." Date: Wed, 11 Nov 2026 10:01:11 +0100 Subject: feat(windows): a new window brings the Windows tab forward When a window id appears that the last poll did not list, the tablet shows the Windows tab for [windows] peek seconds (default 8, 0 off) and then goes back to the tab it was on. A touch on the page or a tab change meanwhile keeps it there; another new window restarts the timer. The hook is generic: a panel's peek(state) returns seconds, app.js does the switching. The first poll only learns what is open, and an error state keeps what it knew, so neither triggers it. Co-Authored-By: Claude Opus 5.5 --- deckit/modules/windows.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'deckit/modules') diff --git a/deckit/modules/windows.py b/deckit/modules/windows.py index a15f44c..edca5b5 100644 --- a/deckit/modules/windows.py +++ b/deckit/modules/windows.py @@ -157,6 +157,7 @@ def make(cfg: dict) -> Module: apps = [str(a) for a in cfg.get("launch", {}).get("apps", [])] workspaces = cfg.get("windows", {}).get("workspaces", list(range(1, 11))) ws_icons = workspace_icons(cfg.get("windows", {}).get("workspace_icons", "")) + peek = max(0, int(cfg.get("windows", {}).get("peek", 8))) entries = _desktop_entries() icons = _desktop_icons(entries) shot = cfg.get("shot", _shot) @@ -208,7 +209,7 @@ def make(cfg: dict) -> Module: known = sorted(set(int(n) for n in workspaces) | set(st["workspaces"])) launches = [{"key": a, "icon": entries[a]["icon"], "label": entries[a]["name"] or a} for a in apps if a in entries] - return {**st, "workspaces": known, "launches": launches, + return {**st, "workspaces": known, "launches": launches, "peek": peek, "wsIcons": {str(n): ws_icons[n] for n in known if n in ws_icons}} def image(key): -- cgit v1.2.3