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/server.py | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) (limited to 'deckit/server.py') diff --git a/deckit/server.py b/deckit/server.py index 19edbef..9dd5229 100644 --- a/deckit/server.py +++ b/deckit/server.py @@ -89,7 +89,11 @@ def icon_path(name: str, theme: str | None = None, bases=ICON_BASES): for th in (theme or icon_theme(), "hicolor"): for base in bases: # Themes lay out category/size (candy-icons) or size/category (hicolor). - for sub in ("apps/scalable", "apps/64", "apps/48", "apps/32", "scalable/apps"): + # Apps first; places and preferences hold the workspace icons + # keystone's bar uses (network-server, applications-graphics). + for sub in ("apps/scalable", "apps/64", "apps/48", "apps/32", "scalable/apps", + "places/scalable", "places/48", "scalable/places", + "preferences/scalable", "categories/scalable", "scalable/categories"): path = Path(base) / th / sub / f"{name}.svg" if path.is_file(): return path @@ -207,6 +211,13 @@ class Handler(BaseHTTPRequestHandler): if len(parts) == 2 and parts[1] == "bg": image = background() return self._send(200, image[0], image[1], cache=True) if image else self._send(404) + if len(parts) == 4 and parts[2] == "image": + try: + fn = REGISTRY.get(parts[1]).image + except module.ModuleError: + fn = None + image = fn(parts[3]) if fn else None + return self._send(200, image[0], image[1], cache=True) if image else self._send(404) if len(parts) == 2 and parts[1] == "modules": return self._json(REGISTRY.names()) if len(parts) == 2: -- cgit v1.2.3