From 7308ca0491afa3ed38cbe41088d4e49dfb9ddc6e Mon Sep 17 00:00:00 2001 From: den-kloot <1522975+den-kloot@users.noreply.github.com> Date: Tue, 10 Nov 2026 12:28:59 +0100 Subject: [PATCH 1/3] omamobile-omarchy 0.1.41: the WhatsApp web app gets a desktop user agent omamobile-setup-user gives Chromium an Android user agent so sites send their phone versions. WhatsApp Web answers it with "Use WhatsApp Web by going to web.whatsapp.com from a browser on your computer" and no sign-in code, so the WhatsApp web app was no use on a phone (docs/TOUCH-PLAN.md 3.1 expected this). A new patch in both families (legacy-4.0.6/0031, patches/0029) makes omarchy-launch-webapp start https://web.whatsapp.com with its own profile (~/.local/share/omarchy/webapps/web.whatsapp.com) and a desktop user agent for the browser's major version and the machine. A user agent is per browser process, so the own profile is what lets it differ; it also skips the hand-off to a running browser. The window class stays chrome-web.whatsapp.com__-Default, which the shell's launch matching expects. Every other web app launches as before. Google Messages for Web shows the same page with either user agent, so it is not listed. Tested on a Pixel 9a with Chromium as the web-app browser and the setup-user flags: before, WhatsApp's "use a computer" page; with the patched launcher, its "Scan to log in" page, in a chrome-web.whatsapp.com__-Default window. test/all: 165 ok; with OMARCHY_PKG set to the signed aarch64 omarchy 4.0.6-1 (30 patches applied, none upstream) and 4.5.0-3 (the 4.5 series applies): pass. test/source-family.py counts 30 legacy patches. Co-Authored-By: Claude Opus 5.5 --- ...atsapp-web-with-a-desktop-user-agent.patch | 44 +++++++++++++++++++ ...atsapp-web-with-a-desktop-user-agent.patch | 44 +++++++++++++++++++ .../omamobile-omarchy/test/source-family.py | 2 +- packages/omamobile-omarchy/version | 2 +- 4 files changed, 90 insertions(+), 2 deletions(-) create mode 100644 packages/omamobile-omarchy/legacy-4.0.6/0031-webapp-whatsapp-web-with-a-desktop-user-agent.patch create mode 100644 packages/omamobile-omarchy/patches/0029-webapp-whatsapp-web-with-a-desktop-user-agent.patch diff --git a/packages/omamobile-omarchy/legacy-4.0.6/0031-webapp-whatsapp-web-with-a-desktop-user-agent.patch b/packages/omamobile-omarchy/legacy-4.0.6/0031-webapp-whatsapp-web-with-a-desktop-user-agent.patch new file mode 100644 index 000000000..168b221ea --- /dev/null +++ b/packages/omamobile-omarchy/legacy-4.0.6/0031-webapp-whatsapp-web-with-a-desktop-user-agent.patch @@ -0,0 +1,44 @@ +# Web apps: WhatsApp Web with a desktop user agent in its own browser +# process. On a phone, omamobile-setup-user gives Chromium an Android user +# agent (chromium-flags.conf) so sites send their phone versions; WhatsApp +# Web answers that with "Use WhatsApp Web by going to web.whatsapp.com from +# a browser on your computer" and no sign-in code, so its web app was no +# use (docs/TOUCH-PLAN.md 3.1 expected this). A user agent is per browser +# process, so the web app gets its own profile +# (~/.local/share/omarchy/webapps/), which also keeps it out of the +# hand-off to a running browser; its window class stays +# chrome-__-Default. Every other web app launches as before. Google +# Messages for Web looks the same with either user agent, so it is not +# listed. Not for upstream Omarchy: a desktop has no phone user agent. +# +# Against Omarchy 4.0.6 (edge 4.0.6-1). +diff --git i/bin/omarchy-launch-webapp w/bin/omarchy-launch-webapp +--- i/bin/omarchy-launch-webapp ++++ w/bin/omarchy-launch-webapp +@@ -12,6 +12,26 @@ + + browser_exec=$(sed -n 's/^Exec=\([^ ]*\).*/\1/p' {~/.local,~/.nix-profile,/usr}/share/applications/$browser 2>/dev/null | head -1) + ++# A web app whose site refuses a phone's browser gets a desktop user agent. ++# On a phone, omamobile-setup-user gives Chromium an Android user agent so ++# sites send their phone versions, and WhatsApp Web answers it with "Use ++# WhatsApp Web by going to web.whatsapp.com from a browser on your ++# computer" instead of its sign-in code. A user agent is set per browser ++# process, so the web app gets a process of its own: its own profile under ++# ~/.local/share/omarchy/webapps/, which also skips the hand-off to a ++# running browser. Its window class stays chrome-__-Default. ++case $1 in ++https://web.whatsapp.com | https://web.whatsapp.com/*) ++ site=${1#https://} ++ site=${site%%/*} ++ major=$("$browser_exec" --version 2>/dev/null | grep -oE '[0-9]+' | head -1) ++ exec setsid uwsm-app -- $browser_exec \ ++ --user-data-dir="${XDG_DATA_HOME:-$HOME/.local/share}/omarchy/webapps/$site" \ ++ "--user-agent=Mozilla/5.0 (X11; Linux $(uname -m)) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/${major:-150}.0.0.0 Safari/537.36" \ ++ --app="$1" "${@:2}" ++ ;; ++esac ++ + if ! omarchy-cmd-browser-handoff "$browser_exec" --app="$1" "${@:2}"; then + exec setsid uwsm-app -- $browser_exec --app="$1" "${@:2}" + fi diff --git a/packages/omamobile-omarchy/patches/0029-webapp-whatsapp-web-with-a-desktop-user-agent.patch b/packages/omamobile-omarchy/patches/0029-webapp-whatsapp-web-with-a-desktop-user-agent.patch new file mode 100644 index 000000000..b7faac251 --- /dev/null +++ b/packages/omamobile-omarchy/patches/0029-webapp-whatsapp-web-with-a-desktop-user-agent.patch @@ -0,0 +1,44 @@ +# Web apps: WhatsApp Web with a desktop user agent in its own browser +# process. On a phone, omamobile-setup-user gives Chromium an Android user +# agent (chromium-flags.conf) so sites send their phone versions; WhatsApp +# Web answers that with "Use WhatsApp Web by going to web.whatsapp.com from +# a browser on your computer" and no sign-in code, so its web app was no +# use (docs/TOUCH-PLAN.md 3.1 expected this). A user agent is per browser +# process, so the web app gets its own profile +# (~/.local/share/omarchy/webapps/), which also keeps it out of the +# hand-off to a running browser; its window class stays +# chrome-__-Default. Every other web app launches as before. Google +# Messages for Web looks the same with either user agent, so it is not +# listed. Not for upstream Omarchy: a desktop has no phone user agent. +# +# Against Omarchy 4.5.0. +diff --git i/bin/omarchy-launch-webapp w/bin/omarchy-launch-webapp +--- i/bin/omarchy-launch-webapp ++++ w/bin/omarchy-launch-webapp +@@ -30,6 +30,26 @@ + exit 1 + fi + ++# A web app whose site refuses a phone's browser gets a desktop user agent. ++# On a phone, omamobile-setup-user gives Chromium an Android user agent so ++# sites send their phone versions, and WhatsApp Web answers it with "Use ++# WhatsApp Web by going to web.whatsapp.com from a browser on your ++# computer" instead of its sign-in code. A user agent is set per browser ++# process, so the web app gets a process of its own: its own profile under ++# ~/.local/share/omarchy/webapps/, which also skips the hand-off to a ++# running browser. Its window class stays chrome-__-Default. ++case $1 in ++https://web.whatsapp.com | https://web.whatsapp.com/*) ++ site=${1#https://} ++ site=${site%%/*} ++ major=$("$browser_exec" --version 2>/dev/null | grep -oE '[0-9]+' | head -1) ++ exec setsid uwsm-app -- $browser_exec \ ++ --user-data-dir="${XDG_DATA_HOME:-$HOME/.local/share}/omarchy/webapps/$site" \ ++ "--user-agent=Mozilla/5.0 (X11; Linux $(uname -m)) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/${major:-150}.0.0.0 Safari/537.36" \ ++ --app="$1" "${@:2}" ++ ;; ++esac ++ + if ! omarchy-cmd-browser-handoff "$browser_exec" --app="$1" "${@:2}"; then + exec setsid uwsm-app -- $browser_exec --app="$1" "${@:2}" + fi diff --git a/packages/omamobile-omarchy/test/source-family.py b/packages/omamobile-omarchy/test/source-family.py index c2a881b3a..787faf75e 100644 --- a/packages/omamobile-omarchy/test/source-family.py +++ b/packages/omamobile-omarchy/test/source-family.py @@ -17,5 +17,5 @@ else: raise AssertionError('unsupported source family accepted') -assert len(list((package / 'legacy-4.0.6').glob('*.patch'))) == 29 +assert len(list((package / 'legacy-4.0.6').glob('*.patch'))) == 30 print('PASS: actual selector rejects unsupported families; legacy archive retained') diff --git a/packages/omamobile-omarchy/version b/packages/omamobile-omarchy/version index 528bd040e..37f868fba 100644 --- a/packages/omamobile-omarchy/version +++ b/packages/omamobile-omarchy/version @@ -1 +1 @@ -0.1.39 +0.1.41 From 6c1a09baebd7eee2ff8161143589124c2e9c3ccf Mon Sep 17 00:00:00 2001 From: den-kloot <1522975+den-kloot@users.noreply.github.com> Date: Tue, 10 Nov 2026 20:36:37 +0100 Subject: [PATCH 2/3] omamobile-omarchy 0.1.41: keep the WhatsApp profile under omamobile/, name x86_64 in its user agent Review of #610. ~/.local/share/omarchy is not a free name: Omarchy's upgrade tools still treat it as the old checkout, and omarchy-upgrade-to-quattro moves it aside and leaves a symlink to /usr/share/omarchy. On a phone where that happens, the WhatsApp sign-in would end up in the backup and Chromium would be asked to create its profile under /usr/share/omarchy. The profile now lives in a directory of ours, ${XDG_DATA_HOME:-$HOME/.local/share}/omamobile/webapps/, in both families and their comments. Desktop Chromium on Linux sends "X11; Linux x86_64" on every CPU, so the user agent names x86_64 instead of $(uname -m), which gave aarch64, a string hardly any real desktop sends. Both patches were regenerated from the launcher in the signed aarch64 omarchy 4.0.6-1 and 4.5.0-3 packages and apply to them with --fuzz=0. On the Pixel 9a the new 4.0.6 launcher, with a throwaway profile, opened WhatsApp at "Scan to log in" in a chrome-web.whatsapp.com__-Default window, its profile under omamobile/webapps/web.whatsapp.com. docs/TOUCH-PLAN.md 3.1 records that WhatsApp is done and Google Messages needed nothing. Co-Authored-By: Claude Opus 5.5 --- docs/TOUCH-PLAN.md | 4 +-- ...atsapp-web-with-a-desktop-user-agent.patch | 25 ++++++++++++------- ...atsapp-web-with-a-desktop-user-agent.patch | 25 ++++++++++++------- 3 files changed, 34 insertions(+), 20 deletions(-) diff --git a/docs/TOUCH-PLAN.md b/docs/TOUCH-PLAN.md index 38ad3136e..241e3724a 100644 --- a/docs/TOUCH-PLAN.md +++ b/docs/TOUCH-PLAN.md @@ -54,7 +54,7 @@ Priorities: **P1** broken, unsafe, or a dead end on a phone; **P2** noticeably a ## Phase 3: apps, browser and polish -- **3.1 Chromium (P2):** add `--enable-wayland-ime --wayland-text-input-version=3` so web text fields raise the keyboard (test first). The global mobile user agent probably breaks the WhatsApp and Google Messages web apps: a per-site flag patch to `omarchy-launch-webapp`. Its tabs and menus stay desktop-sized; GNOME Web (Epiphany) is the phone-shaped option. +- **3.1 Chromium (P2):** add `--enable-wayland-ime --wayland-text-input-version=3` so web text fields raise the keyboard (test first). The global mobile user agent probably breaks the WhatsApp and Google Messages web apps: a per-site flag patch to `omarchy-launch-webapp`. Done for WhatsApp, the only one that needed it: patch 0029 (0031 in the 4.0.6 family), omamobile-omarchy 0.1.41, starts `web.whatsapp.com` with a desktop user agent in its own browser process (profile in `~/.local/share/omamobile/webapps/`), and WhatsApp then shows its sign-in code instead of "use a computer" (Pixel 9a). Google Messages for Web shows the same page with either user agent, so it needed nothing. Its tabs and menus stay desktop-sized; GNOME Web (Epiphany) is the phone-shaped option. - **3.2 File pickers (P2):** GTK3 and Qt Widgets apps open the desktop chooser. Add `GTK_USE_PORTAL=1` and `GDK_DEBUG=portals`; test `QT_QPA_PLATFORMTHEME=xdgdesktopportal`. - **3.3 Menu rows that can't work here (P2):** x86-only installers (Steam, Chrome, Edge, Dropbox, Spotify, the Windows VM), Direct boot (EFI), the drive password, bar position, keybinding guides. Hide them through a package-owned menu-extension directory (an upstreamable Omarchy patch), not sed edits. - **3.4 Launcher clean-up (P2):** hide Disks, Evince (Papers stays), Snapshot (omacam is the camera), Fcitx 5 Configuration, CMake, lstopo, the printing apps, Foot Server/Client. LibreOffice, OBS, Kdenlive and the dev tools are unusable at 480 px; leave them installable but consider hiding. @@ -68,7 +68,7 @@ Priorities: **P1** broken, unsafe, or a dead end on a phone; **P2** noticeably a 2. Menu: back chevron and swipe back (1.3). Patch 0018, omamobile-omarchy 0.1.10 (offline as above); the Settings entry is still open. 3. Menu: a platform extension directory (`$XDG_DATA_DIRS/omarchy/menu.d`) so packages hide rows without editing user files (0.2, 0.3, 3.3). 4. Refresh scripts keep platform additions (0.3). -5. Web apps: per-site browser flags (3.1). +5. Web apps: per-site browser flags (3.1). For WhatsApp a phone-only patch (0029), omamobile-omarchy 0.1.41; an upstream version would need a generic per-site flag mechanism in `omarchy-launch-webapp`, since a desktop has no phone user agent to work around. 6. Later: a gum shim that uses the shell's dmenu mode on touch (1.11). 7. Notifications: platform phrasing. On a touch platform `omarchy-notification-send` says "Tap to" for "Click to", "Tap to edit/open" for the screenshot and recording toasts' "Super + Alt + , (or click this)", points Voxtype's "Hold F9" at the Dictation tile (1.12), and drops parenthesised or whole-line "Super + …" hints; a desktop sends what it did before. Patch 0020, omamobile-omarchy 0.1.12 (offline as above). 8. Lock: the battery on the lock screen (the bar's glyph, which carries the bolt while charging, and the percentage), top right over the glance and the PIN view, nothing on a device without a battery. Patch 0026, omamobile-omarchy 0.1.25 (built and tested offline against Omarchy 4.0.6 under qmltestrunner; checked on the Pixel 8 Pro on the PIN view while charging: the glyph with its bolt and the percentage top right; the glance view and unplugging are not checked on a phone yet). The percentage comes from the first present battery whose `scope` is not `Device` (a paired controller, keyboard or mouse is a `Battery` supply too, and sorts before the 7 Pro's `max170xx_battery`), and only that battery's Charging/Full counts. Charging otherwise follows the charger supply being online, as `omamobile-update` reads it, since the fuel gauge says Discharging while plugged in whenever the net current is negative. A supply read that hangs is cut by `timeout` (3 s) and a stale timer and clears the state; a blank drops the bolt so a wake never paints a stale one. diff --git a/packages/omamobile-omarchy/legacy-4.0.6/0031-webapp-whatsapp-web-with-a-desktop-user-agent.patch b/packages/omamobile-omarchy/legacy-4.0.6/0031-webapp-whatsapp-web-with-a-desktop-user-agent.patch index 168b221ea..cad31015a 100644 --- a/packages/omamobile-omarchy/legacy-4.0.6/0031-webapp-whatsapp-web-with-a-desktop-user-agent.patch +++ b/packages/omamobile-omarchy/legacy-4.0.6/0031-webapp-whatsapp-web-with-a-desktop-user-agent.patch @@ -5,17 +5,21 @@ # a browser on your computer" and no sign-in code, so its web app was no # use (docs/TOUCH-PLAN.md 3.1 expected this). A user agent is per browser # process, so the web app gets its own profile -# (~/.local/share/omarchy/webapps/), which also keeps it out of the +# (~/.local/share/omamobile/webapps/), which also keeps it out of the # hand-off to a running browser; its window class stays -# chrome-__-Default. Every other web app launches as before. Google -# Messages for Web looks the same with either user agent, so it is not -# listed. Not for upstream Omarchy: a desktop has no phone user agent. +# chrome-__-Default. The profile is under omamobile/, not omarchy/: +# Omarchy's upgrade tools still treat ~/.local/share/omarchy as its old +# checkout and move it aside, which would take the WhatsApp sign-in with +# it. The user agent names x86_64, as desktop Chromium on Linux does on +# every CPU. Every other web app launches as before. Google Messages for +# Web looks the same with either user agent, so it is not listed. Not for +# upstream Omarchy: a desktop has no phone user agent. # # Against Omarchy 4.0.6 (edge 4.0.6-1). diff --git i/bin/omarchy-launch-webapp w/bin/omarchy-launch-webapp --- i/bin/omarchy-launch-webapp +++ w/bin/omarchy-launch-webapp -@@ -12,6 +12,26 @@ +@@ -12,6 +12,29 @@ esac browser_exec=$(sed -n 's/^Exec=\([^ ]*\).*/\1/p' {~/.local,~/.nix-profile,/usr}/share/applications/$browser 2>/dev/null | head -1) @@ -25,16 +29,19 @@ diff --git i/bin/omarchy-launch-webapp w/bin/omarchy-launch-webapp +# WhatsApp Web by going to web.whatsapp.com from a browser on your +# computer" instead of its sign-in code. A user agent is set per browser +# process, so the web app gets a process of its own: its own profile under -+# ~/.local/share/omarchy/webapps/, which also skips the hand-off to a -+# running browser. Its window class stays chrome-__-Default. ++# ~/.local/share/omamobile/webapps/, which also skips the hand-off to ++# a running browser. That directory is ours: Omarchy's upgrade tools still ++# treat ~/.local/share/omarchy as its old checkout and move it aside. Its ++# window class stays chrome-__-Default. The user agent names x86_64, ++# as desktop Chromium on Linux does on every CPU. +case $1 in +https://web.whatsapp.com | https://web.whatsapp.com/*) + site=${1#https://} + site=${site%%/*} + major=$("$browser_exec" --version 2>/dev/null | grep -oE '[0-9]+' | head -1) + exec setsid uwsm-app -- $browser_exec \ -+ --user-data-dir="${XDG_DATA_HOME:-$HOME/.local/share}/omarchy/webapps/$site" \ -+ "--user-agent=Mozilla/5.0 (X11; Linux $(uname -m)) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/${major:-150}.0.0.0 Safari/537.36" \ ++ --user-data-dir="${XDG_DATA_HOME:-$HOME/.local/share}/omamobile/webapps/$site" \ ++ "--user-agent=Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/${major:-150}.0.0.0 Safari/537.36" \ + --app="$1" "${@:2}" + ;; +esac diff --git a/packages/omamobile-omarchy/patches/0029-webapp-whatsapp-web-with-a-desktop-user-agent.patch b/packages/omamobile-omarchy/patches/0029-webapp-whatsapp-web-with-a-desktop-user-agent.patch index b7faac251..511d39728 100644 --- a/packages/omamobile-omarchy/patches/0029-webapp-whatsapp-web-with-a-desktop-user-agent.patch +++ b/packages/omamobile-omarchy/patches/0029-webapp-whatsapp-web-with-a-desktop-user-agent.patch @@ -5,17 +5,21 @@ # a browser on your computer" and no sign-in code, so its web app was no # use (docs/TOUCH-PLAN.md 3.1 expected this). A user agent is per browser # process, so the web app gets its own profile -# (~/.local/share/omarchy/webapps/), which also keeps it out of the +# (~/.local/share/omamobile/webapps/), which also keeps it out of the # hand-off to a running browser; its window class stays -# chrome-__-Default. Every other web app launches as before. Google -# Messages for Web looks the same with either user agent, so it is not -# listed. Not for upstream Omarchy: a desktop has no phone user agent. +# chrome-__-Default. The profile is under omamobile/, not omarchy/: +# Omarchy's upgrade tools still treat ~/.local/share/omarchy as its old +# checkout and move it aside, which would take the WhatsApp sign-in with +# it. The user agent names x86_64, as desktop Chromium on Linux does on +# every CPU. Every other web app launches as before. Google Messages for +# Web looks the same with either user agent, so it is not listed. Not for +# upstream Omarchy: a desktop has no phone user agent. # # Against Omarchy 4.5.0. diff --git i/bin/omarchy-launch-webapp w/bin/omarchy-launch-webapp --- i/bin/omarchy-launch-webapp +++ w/bin/omarchy-launch-webapp -@@ -30,6 +30,26 @@ +@@ -30,6 +30,29 @@ if [[ -z $browser_exec ]]; then exit 1 fi @@ -25,16 +29,19 @@ diff --git i/bin/omarchy-launch-webapp w/bin/omarchy-launch-webapp +# WhatsApp Web by going to web.whatsapp.com from a browser on your +# computer" instead of its sign-in code. A user agent is set per browser +# process, so the web app gets a process of its own: its own profile under -+# ~/.local/share/omarchy/webapps/, which also skips the hand-off to a -+# running browser. Its window class stays chrome-__-Default. ++# ~/.local/share/omamobile/webapps/, which also skips the hand-off to ++# a running browser. That directory is ours: Omarchy's upgrade tools still ++# treat ~/.local/share/omarchy as its old checkout and move it aside. Its ++# window class stays chrome-__-Default. The user agent names x86_64, ++# as desktop Chromium on Linux does on every CPU. +case $1 in +https://web.whatsapp.com | https://web.whatsapp.com/*) + site=${1#https://} + site=${site%%/*} + major=$("$browser_exec" --version 2>/dev/null | grep -oE '[0-9]+' | head -1) + exec setsid uwsm-app -- $browser_exec \ -+ --user-data-dir="${XDG_DATA_HOME:-$HOME/.local/share}/omarchy/webapps/$site" \ -+ "--user-agent=Mozilla/5.0 (X11; Linux $(uname -m)) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/${major:-150}.0.0.0 Safari/537.36" \ ++ --user-data-dir="${XDG_DATA_HOME:-$HOME/.local/share}/omamobile/webapps/$site" \ ++ "--user-agent=Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/${major:-150}.0.0.0 Safari/537.36" \ + --app="$1" "${@:2}" + ;; +esac From 88508178b4ed0437b8fac9fe651d6b135f2e8e6a Mon Sep 17 00:00:00 2001 From: den-kloot <1522975+den-kloot@users.noreply.github.com> Date: Fri, 20 Nov 2026 18:54:51 +0100 Subject: [PATCH 3/3] omamobile-omarchy 0.1.49: the WhatsApp fix in patches/ only, not in legacy-4.0.6 Since phones moved to Omarchy 4.5, legacy-4.0.6/ carries only what a phone needs to get through that update. Drop legacy-4.0.6/0031, put the source-family count back to 29, and have TOUCH-PLAN name patch 0032 alone. Co-Authored-By: Claude Opus 5.5 --- docs/TOUCH-PLAN.md | 4 +- ...atsapp-web-with-a-desktop-user-agent.patch | 51 ------------------- .../omamobile-omarchy/test/source-family.py | 2 +- 3 files changed, 3 insertions(+), 54 deletions(-) delete mode 100644 packages/omamobile-omarchy/legacy-4.0.6/0031-webapp-whatsapp-web-with-a-desktop-user-agent.patch diff --git a/docs/TOUCH-PLAN.md b/docs/TOUCH-PLAN.md index 88d402b9d..1c99a464e 100644 --- a/docs/TOUCH-PLAN.md +++ b/docs/TOUCH-PLAN.md @@ -54,7 +54,7 @@ Priorities: **P1** broken, unsafe, or a dead end on a phone; **P2** noticeably a ## Phase 3: apps, browser and polish -- **3.1 Chromium (P2):** add `--enable-wayland-ime --wayland-text-input-version=3` so web text fields raise the keyboard (test first). The global mobile user agent probably breaks the WhatsApp and Google Messages web apps: a per-site flag patch to `omarchy-launch-webapp`. Done for WhatsApp, the only one that needed it: patch 0032 (0031 in the 4.0.6 family), omamobile-omarchy 0.1.49, starts `web.whatsapp.com` with a desktop user agent in its own browser process (profile in `~/.local/share/omamobile/webapps/`), and WhatsApp then shows its sign-in code instead of "use a computer" (Pixel 9a). Google Messages for Web shows the same page with either user agent, so it needed nothing. Its tabs and menus stay desktop-sized; GNOME Web (Epiphany) is the phone-shaped option. +- **3.1 Chromium (P2):** add `--enable-wayland-ime --wayland-text-input-version=3` so web text fields raise the keyboard (test first). The global mobile user agent probably breaks the WhatsApp and Google Messages web apps: a per-site flag patch to `omarchy-launch-webapp`. Done for WhatsApp, the only one that needed it: patch 0032, omamobile-omarchy 0.1.49, starts `web.whatsapp.com` with a desktop user agent in its own browser process (profile in `~/.local/share/omamobile/webapps/`), and WhatsApp then shows its sign-in code instead of "use a computer" (Pixel 9a). Google Messages for Web shows the same page with either user agent, so it needed nothing. Its tabs and menus stay desktop-sized; GNOME Web (Epiphany) is the phone-shaped option. - **3.2 File pickers (P2):** GTK3 and Qt Widgets apps open the desktop chooser. Add `GTK_USE_PORTAL=1` and `GDK_DEBUG=portals`; test `QT_QPA_PLATFORMTHEME=xdgdesktopportal`. - **3.3 Menu rows that can't work here (P2):** x86-only installers (Steam, Chrome, Edge, Dropbox, Spotify, the Windows VM), Direct boot (EFI), the drive password, bar position, keybinding guides. Hide them through a package-owned menu-extension directory (an upstreamable Omarchy patch), not sed edits. - **3.4 Launcher clean-up (P2):** hide Disks, Evince (Papers stays), Snapshot (omacam is the camera), Fcitx 5 Configuration, CMake, lstopo, the printing apps, Foot Server/Client. LibreOffice, OBS, Kdenlive and the dev tools are unusable at 480 px; leave them installable but consider hiding. @@ -68,7 +68,7 @@ Priorities: **P1** broken, unsafe, or a dead end on a phone; **P2** noticeably a 2. Menu: back chevron and swipe back (1.3). Patch 0018, omamobile-omarchy 0.1.10 (offline as above); the Settings entry is still open. 3. Menu: a platform extension directory (`$XDG_DATA_DIRS/omarchy/menu.d`) so packages hide rows without editing user files (0.2, 0.3, 3.3). 4. Refresh scripts keep platform additions (0.3). -5. Web apps: per-site browser flags (3.1). For WhatsApp a phone-only patch (0032; 0031 for 4.0.6), omamobile-omarchy 0.1.49; an upstream version would need a generic per-site flag mechanism in `omarchy-launch-webapp`, since a desktop has no phone user agent to work around. +5. Web apps: per-site browser flags (3.1). For WhatsApp a phone-only patch (0032), omamobile-omarchy 0.1.49; an upstream version would need a generic per-site flag mechanism in `omarchy-launch-webapp`, since a desktop has no phone user agent to work around. 6. Later: a gum shim that uses the shell's dmenu mode on touch (1.11). 7. Notifications: platform phrasing. On a touch platform `omarchy-notification-send` says "Tap to" for "Click to", "Tap to edit/open" for the screenshot and recording toasts' "Super + Alt + , (or click this)", points Voxtype's "Hold F9" at the Dictation tile (1.12), and drops parenthesised or whole-line "Super + …" hints; a desktop sends what it did before. Patch 0020, omamobile-omarchy 0.1.12 (offline as above). 8. Lock: the battery on the lock screen (the bar's glyph, which carries the bolt while charging, and the percentage), top right over the glance and the PIN view, nothing on a device without a battery. Patch 0026, omamobile-omarchy 0.1.25 (built and tested offline against Omarchy 4.0.6 under qmltestrunner; checked on the Pixel 8 Pro on the PIN view while charging: the glyph with its bolt and the percentage top right; the glance view and unplugging are not checked on a phone yet). The percentage comes from the first present battery whose `scope` is not `Device` (a paired controller, keyboard or mouse is a `Battery` supply too, and sorts before the 7 Pro's `max170xx_battery`), and only that battery's Charging/Full counts. Charging otherwise follows the charger supply being online, as `omamobile-update` reads it, since the fuel gauge says Discharging while plugged in whenever the net current is negative. A supply read that hangs is cut by `timeout` (3 s) and a stale timer and clears the state; a blank drops the bolt so a wake never paints a stale one. diff --git a/packages/omamobile-omarchy/legacy-4.0.6/0031-webapp-whatsapp-web-with-a-desktop-user-agent.patch b/packages/omamobile-omarchy/legacy-4.0.6/0031-webapp-whatsapp-web-with-a-desktop-user-agent.patch deleted file mode 100644 index cad31015a..000000000 --- a/packages/omamobile-omarchy/legacy-4.0.6/0031-webapp-whatsapp-web-with-a-desktop-user-agent.patch +++ /dev/null @@ -1,51 +0,0 @@ -# Web apps: WhatsApp Web with a desktop user agent in its own browser -# process. On a phone, omamobile-setup-user gives Chromium an Android user -# agent (chromium-flags.conf) so sites send their phone versions; WhatsApp -# Web answers that with "Use WhatsApp Web by going to web.whatsapp.com from -# a browser on your computer" and no sign-in code, so its web app was no -# use (docs/TOUCH-PLAN.md 3.1 expected this). A user agent is per browser -# process, so the web app gets its own profile -# (~/.local/share/omamobile/webapps/), which also keeps it out of the -# hand-off to a running browser; its window class stays -# chrome-__-Default. The profile is under omamobile/, not omarchy/: -# Omarchy's upgrade tools still treat ~/.local/share/omarchy as its old -# checkout and move it aside, which would take the WhatsApp sign-in with -# it. The user agent names x86_64, as desktop Chromium on Linux does on -# every CPU. Every other web app launches as before. Google Messages for -# Web looks the same with either user agent, so it is not listed. Not for -# upstream Omarchy: a desktop has no phone user agent. -# -# Against Omarchy 4.0.6 (edge 4.0.6-1). -diff --git i/bin/omarchy-launch-webapp w/bin/omarchy-launch-webapp ---- i/bin/omarchy-launch-webapp -+++ w/bin/omarchy-launch-webapp -@@ -12,6 +12,29 @@ esac - - browser_exec=$(sed -n 's/^Exec=\([^ ]*\).*/\1/p' {~/.local,~/.nix-profile,/usr}/share/applications/$browser 2>/dev/null | head -1) - -+# A web app whose site refuses a phone's browser gets a desktop user agent. -+# On a phone, omamobile-setup-user gives Chromium an Android user agent so -+# sites send their phone versions, and WhatsApp Web answers it with "Use -+# WhatsApp Web by going to web.whatsapp.com from a browser on your -+# computer" instead of its sign-in code. A user agent is set per browser -+# process, so the web app gets a process of its own: its own profile under -+# ~/.local/share/omamobile/webapps/, which also skips the hand-off to -+# a running browser. That directory is ours: Omarchy's upgrade tools still -+# treat ~/.local/share/omarchy as its old checkout and move it aside. Its -+# window class stays chrome-__-Default. The user agent names x86_64, -+# as desktop Chromium on Linux does on every CPU. -+case $1 in -+https://web.whatsapp.com | https://web.whatsapp.com/*) -+ site=${1#https://} -+ site=${site%%/*} -+ major=$("$browser_exec" --version 2>/dev/null | grep -oE '[0-9]+' | head -1) -+ exec setsid uwsm-app -- $browser_exec \ -+ --user-data-dir="${XDG_DATA_HOME:-$HOME/.local/share}/omamobile/webapps/$site" \ -+ "--user-agent=Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/${major:-150}.0.0.0 Safari/537.36" \ -+ --app="$1" "${@:2}" -+ ;; -+esac -+ - if ! omarchy-cmd-browser-handoff "$browser_exec" --app="$1" "${@:2}"; then - exec setsid uwsm-app -- $browser_exec --app="$1" "${@:2}" - fi diff --git a/packages/omamobile-omarchy/test/source-family.py b/packages/omamobile-omarchy/test/source-family.py index 787faf75e..c2a881b3a 100644 --- a/packages/omamobile-omarchy/test/source-family.py +++ b/packages/omamobile-omarchy/test/source-family.py @@ -17,5 +17,5 @@ else: raise AssertionError('unsupported source family accepted') -assert len(list((package / 'legacy-4.0.6').glob('*.patch'))) == 30 +assert len(list((package / 'legacy-4.0.6').glob('*.patch'))) == 29 print('PASS: actual selector rejects unsupported families; legacy archive retained')