From 6b323fc06ec255153e86eafa4dffa67ad8c21f8c Mon Sep 17 00:00:00 2001 From: "Danilo M." Date: Mon, 9 Nov 2026 20:31:56 +0100 Subject: feat: Windows tab shows all workspaces and icon-only launchers --- static/deck.css | 14 +++++++++++++- static/logos/firefox.svg | 1 + static/logos/folder.svg | 15 +++++++++++++++ static/logos/obsstudio.svg | 1 + static/logos/signal.svg | 1 + static/logos/terminal.svg | 16 ++++++++++++++++ static/modules/windows.js | 18 +++++++++++++++--- 7 files changed, 62 insertions(+), 4 deletions(-) create mode 100644 static/logos/firefox.svg create mode 100644 static/logos/folder.svg create mode 100644 static/logos/obsstudio.svg create mode 100644 static/logos/signal.svg create mode 100644 static/logos/terminal.svg (limited to 'static') diff --git a/static/deck.css b/static/deck.css index 6f3fa97..1a09141 100644 --- a/static/deck.css +++ b/static/deck.css @@ -249,7 +249,19 @@ select { cursor: pointer; } .wtile.on { background: var(--udt-accent); color: var(--udt-crust); border-color: var(--udt-accent); } -.wtile.launch { font-size: 13px; font-weight: 500; min-width: 0; } +.wtile.launch { min-width: 64px; min-height: 64px; padding: 0 12px; } +.laticon { + display: block; + width: 30px; + height: 30px; + background: var(--udt-text); + -webkit-mask-repeat: no-repeat; + -webkit-mask-position: center; + -webkit-mask-size: contain; + mask-repeat: no-repeat; + mask-position: center; + mask-size: contain; +} .windows .winlist { display: flex; flex-direction: column; gap: 6px; margin-bottom: 10px; } .wrow { display: flex; diff --git a/static/logos/firefox.svg b/static/logos/firefox.svg new file mode 100644 index 0000000..b32c6a4 --- /dev/null +++ b/static/logos/firefox.svg @@ -0,0 +1 @@ +Firefox \ No newline at end of file diff --git a/static/logos/folder.svg b/static/logos/folder.svg new file mode 100644 index 0000000..e45b3ce --- /dev/null +++ b/static/logos/folder.svg @@ -0,0 +1,15 @@ + + + + diff --git a/static/logos/obsstudio.svg b/static/logos/obsstudio.svg new file mode 100644 index 0000000..090e856 --- /dev/null +++ b/static/logos/obsstudio.svg @@ -0,0 +1 @@ +OBS Studio \ No newline at end of file diff --git a/static/logos/signal.svg b/static/logos/signal.svg new file mode 100644 index 0000000..81bc449 --- /dev/null +++ b/static/logos/signal.svg @@ -0,0 +1 @@ +Signal \ No newline at end of file diff --git a/static/logos/terminal.svg b/static/logos/terminal.svg new file mode 100644 index 0000000..f91c114 --- /dev/null +++ b/static/logos/terminal.svg @@ -0,0 +1,16 @@ + + + + + diff --git a/static/modules/windows.js b/static/modules/windows.js index 7d2d8c8..018cc6a 100644 --- a/static/modules/windows.js +++ b/static/modules/windows.js @@ -61,9 +61,21 @@ export default { const launches = el.querySelector(".launches"); launches.textContent = ""; - for (const key of st.launches ?? []) { - const b = tile(key, () => post("launch", { key })); - b.classList.add("launch"); + for (const item of st.launches ?? []) { + const b = document.createElement("button"); + b.className = "wtile launch"; + b.setAttribute("aria-label", item.label || item.key); + b.title = item.label || item.key; + if (item.icon) { + const icon = document.createElement("span"); + icon.className = "laticon"; + icon.style.webkitMaskImage = `url(/logos/${item.icon}.svg)`; + icon.style.maskImage = `url(/logos/${item.icon}.svg)`; + b.append(icon); + } else { + b.textContent = item.label || item.key; + } + b.onclick = () => post("launch", { key: item.key }); launches.append(b); } }, -- cgit v1.2.3