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 --- static/deck.css | 36 +++++++++++++++++++++--------------- 1 file changed, 21 insertions(+), 15 deletions(-) (limited to 'static/deck.css') diff --git a/static/deck.css b/static/deck.css index 03b9d43..98a2c2a 100644 --- a/static/deck.css +++ b/static/deck.css @@ -305,20 +305,24 @@ select { .wtile.on { background: var(--udt-accent); color: var(--udt-crust); border-color: var(--udt-accent); } .wtile.launch { min-width: 64px; min-height: 64px; padding: 0 12px; } .laticon { display: block; width: 32px; height: 32px; object-fit: contain; } -.windows .winlist { display: flex; flex-direction: column; gap: 6px; margin-bottom: 10px; } -.wrow { - display: flex; - align-items: center; - gap: 8px; - min-height: 44px; - padding: 0 6px 0 10px; - border-radius: 10px; - background: var(--udt-surface1); -} -.wrow.on { color: var(--udt-accent); } -.wt { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; cursor: pointer; } -.wicon { width: 24px; height: 24px; object-fit: contain; flex: none; } -.wmenu { flex: none; width: 40px; height: 40px; padding: 0; font-size: 1.286rem; line-height: 1; } +.windows .ws { justify-content: center; } +.wgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 16px 14px; } +.wcard { display: flex; flex-direction: column; gap: 6px; padding: 0; font: inherit; background: none; border: 0; color: inherit; cursor: pointer; min-width: 0; } +.wbox { + position: relative; aspect-ratio: 16 / 10; border-radius: 10px; overflow: hidden; + background: var(--udt-surface0); border: 1px solid var(--udt-surface1); + display: flex; align-items: center; justify-content: center; +} +.wcard.cur .wbox { border-color: var(--udt-accent); box-shadow: 0 0 14px color-mix(in srgb, var(--udt-accent) 45%, transparent); } +.wshot { pointer-events: none; -webkit-touch-callout: none; user-select: none; max-width: calc(100% - 8px); max-height: calc(100% - 8px); object-fit: contain; border-radius: 4px; } +/* Each overlay carries its own scrim: it sits on an arbitrary preview. */ +.wws, .wx, .wbox .wicon { position: absolute; background: color-mix(in srgb, var(--udt-base) 75%, transparent); } +.wws { left: 8px; top: 8px; min-width: 34px; height: 34px; border-radius: 8px; display: grid; place-items: center; color: var(--udt-accent); font-size: 0.929rem; } +.wx { right: 8px; top: 8px; width: 40px; height: 40px; border-radius: 20px; display: grid; place-items: center; font-size: 1.6rem; line-height: 1; color: var(--udt-text); } +.wx:active { background: var(--udt-red); } +.wbox .wicon { left: 8px; bottom: 8px; width: 40px; height: 40px; padding: 5px; border-radius: 10px; box-sizing: border-box; } +.wtitle { font-size: 0.929rem; color: var(--udt-subtext0); text-align: center; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } +.wcard.cur .wtitle { color: var(--udt-text); } .windows .launches { display: flex; flex-wrap: wrap; gap: 8px; } .wpop { @@ -337,7 +341,6 @@ select { } .wpop-title { font-weight: 600; font-size: 0.929rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } .wpop-label { font-size: 0.786rem; text-transform: uppercase; letter-spacing: .08em; color: var(--udt-overlay0); } -.wpop-close { text-align: left; } .wpop-ws { display: flex; flex-wrap: wrap; gap: 6px; } .wpop-ws button { min-width: 44px; min-height: 44px; padding: 0; font-size: 1.143rem; font-weight: 600; } @@ -713,3 +716,6 @@ select { margin: 0 0 6px; font: 200 3rem/1.1 system-ui, sans-serif; letter-spacing: -.02em; color: var(--udt-text); } .assistant .as-hello p { margin: 0; font: 300 1.15rem/1.4 system-ui, sans-serif; color: var(--udt-overlay0); } +.windows .ws .wtile img { width: 32px; height: 32px; object-fit: contain; } +.wws img { width: 22px; height: 22px; object-fit: contain; } +.wpop-ws button img { width: 24px; height: 24px; object-fit: contain; } -- cgit v1.2.3