From 5a8da8ab392266d5f3bbf3abed61472d6734f31c Mon Sep 17 00:00:00 2001 From: "Danilo M." Date: Tue, 10 Nov 2026 16:34:04 +0100 Subject: feat(windows): preview cards and keystone's workspace icons Each window is a card like the Alt+Tab switcher's: a preview in the window's shape (grim -T on Hyprland's stableId, also for hidden workspaces, refreshed every 5 s), the desktop top left, close top right, the app icon bottom left, each on its own scrim, the title below. Tap focuses, a long press opens the move menu at the press point (the grid re-renders under a title that changes every second, so the card itself may already be gone), and Chrome's image menu is suppressed. Module.image serves module images at /api//image/; windows answers only for a window the last state listed. Workspace tiles, card markers and the move menu use the icons from keystone's Workspaces.qml, falling back to the number; the icon route also searches the theme's places, preferences and categories folders, where two of them live. The workspaces are centred. Co-Authored-By: Claude Opus 5.5 --- deckit/module.py | 3 +++ 1 file changed, 3 insertions(+) (limited to 'deckit/module.py') diff --git a/deckit/module.py b/deckit/module.py index 9680c58..dec2e04 100644 --- a/deckit/module.py +++ b/deckit/module.py @@ -38,6 +38,9 @@ class Module: # action -> (content type, max bytes): actions that take a raw body, # such as a voice clip, instead of a small JSON object. uploads: dict[str, tuple[str, int]] = field(default_factory=dict) + # key -> (bytes, content type) or None: images served at + # /api//image/, such as a window's preview. + image: Callable[[str], tuple[bytes, str] | None] | None = None start: Callable[[], None] | None = None stop: Callable[[], None] | None = None -- cgit v1.2.3