diff options
| author | Danilo M. <danix@danix.xyz> | 2026-11-11 10:01:11 +0100 |
|---|---|---|
| committer | Danilo M. <danix@danix.xyz> | 2026-11-11 10:01:11 +0100 |
| commit | 79d3be64f0a3e4552b08c80f1678649ccbff2a7c (patch) | |
| tree | 9f6532b6119a6a71dd08d108bd1527cec6b8ce41 /deckit | |
| parent | 978ec811803cdbeb10dc2e6924ab33aa2b84bec6 (diff) | |
| download | deck-it-79d3be64f0a3e4552b08c80f1678649ccbff2a7c.tar.gz deck-it-79d3be64f0a3e4552b08c80f1678649ccbff2a7c.zip | |
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 <noreply@anthropic.com>
Diffstat (limited to 'deckit')
| -rw-r--r-- | deckit/modules/windows.py | 3 |
1 files changed, 2 insertions, 1 deletions
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): |
