Launcher: home panel with a Windows button that opens Recents

The panel under the clock holds a Windows button. Android lets only
accessibility services open Recents, so a minimal RecentsService does
just performGlobalAction(GLOBAL_ACTION_RECENTS); until the user turns
it on, the button opens Accessibility settings instead.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01M9yVmqTBBDyq8bEYt2rVq6
This commit is contained in:
Claude committed 2026-10-21 19:03:52 +00:00
1 parent a52108e95f
commit ab03efd389
9 files changed
+132 -1

No files matched your search

+29
View File
@@ -41,6 +41,11 @@ def open_settings() -> None:
def pick_wallpaper() -> None:
pass
@jscall
def open_recents() -> None:
"""Show the system's list of open windows (Recents)."""
pass
@jscall
def haptic() -> None:
pass
@@ -87,6 +92,7 @@ INFO: Const[i32] = 29 # arg: home slot
SETTINGS: Const[i32] = 30
WALLPAPER: Const[i32] = 31
NOTICE_DONE: Const[i32] = 32
RECENTS: Const[i32] = 33
CAP: Const[i32] = 512
HOME_CAP: Const[i32] = 40
@@ -462,6 +468,8 @@ def update(msg: i32, arg: i32) -> None:
elif msg == WALLPAPER:
pick_wallpaper()
sheet = NONE
elif msg == RECENTS:
open_recents()
elif msg == NOTICE_DONE:
if arg == notice_gen:
s_clear(notice)
@@ -530,6 +538,25 @@ def view_home_slot(i: i32) -> None:
end()
def view_panel() -> None:
"""The panel under the clock: shortcuts to system surfaces."""
el("section")
cls("panel")
attr("aria-label", "Shortcuts")
el("button")
cls("panel-btn")
on_click(RECENTS, 0)
el("span")
cls("windows-glyph")
attr("aria-hidden", "true")
end()
el("span")
text("Windows")
end()
end()
end()
def view_home() -> None:
i: i32
div("home")
@@ -550,6 +577,8 @@ def view_home() -> None:
end()
end()
view_panel()
el("ul")
cls("slots")
for i in range(nh):
BIN
View File
Binary file not shown.
+2
View File
@@ -30,6 +30,7 @@
placeWidgets: () => {},
openSettings: () => toast("Open system settings"),
pickWallpaper: () => toast("Pick a wallpaper"),
openRecents: () => toast("Show open windows"),
haptic: () => navigator.vibrate?.(10),
is24Hour: () => false,
};
@@ -89,6 +90,7 @@
remove_widget: (id) => host.removeWidget(id),
open_settings: () => host.openSettings(),
pick_wallpaper: () => host.pickWallpaper(),
open_recents: () => host.openRecents(),
haptic: () => host.haptic(),
clock_time: (h) => { strs[h] = fmtTime.format(new Date()).replace(/\s?[AP]M$/i, ""); },
clock_date: (h) => { strs[h] = fmtDate.format(new Date()); },
+13
View File
@@ -26,6 +26,19 @@ body { margin: 0; min-height: 100vh; color: #fff; -webkit-tap-highlight-color: t
font-variant-numeric: tabular-nums; }
.clock .date { margin-top: .5rem; font-size: 1rem; opacity: .9; }
.panel { display: flex; gap: .5rem; margin: 0 auto 2rem; padding: .5rem; max-width: 22rem;
border-radius: 1.25rem; background: rgb(255 255 255 / .12); border: 1px solid rgb(255 255 255 / .16);
backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); }
.panel-btn { flex: 1; display: flex; align-items: center; justify-content: center; gap: .6rem;
min-height: 3rem; padding: .5rem 1rem; border: 0; border-radius: .9rem;
background: rgb(255 255 255 / .1); color: #fff; font: inherit; font-weight: 500;
cursor: pointer; text-shadow: 0 1px 4px rgb(0 0 0 / .35); }
.panel-btn:hover, .panel-btn:active { background: rgb(255 255 255 / .22); }
.windows-glyph { position: relative; width: 1.1rem; height: 1.1rem; }
.windows-glyph::before, .windows-glyph::after { content: ""; position: absolute; border: 2px solid currentColor;
border-radius: .25rem; box-sizing: border-box; }
.windows-glyph::before { inset: 0 .3rem .3rem 0; opacity: .6; }
.windows-glyph::after { inset: .3rem 0 0 .3rem; background: rgb(255 255 255 / .15); }
.slots, .apps { list-style: none; margin: 0; padding: 0; display: grid; gap: 1.25rem .5rem;
grid-template-columns: repeat(4, minmax(0, 1fr)); }
@media (min-width: 480px) { .slots, .apps { grid-template-columns: repeat(5, minmax(0, 1fr)); } }