Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions docs/TOUCH-PLAN.md
Original file line number Diff line number Diff line change
Expand Up @@ -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 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/<host>`), 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.
Expand All @@ -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 (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.
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
# 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/<host>), which also keeps it out of the
# hand-off to a running browser; its window class stays
# chrome-<host>__-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,29 @@ if [[ -z $browser_exec ]]; then
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/omamobile/webapps/<host>, 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-<host>__-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
2 changes: 1 addition & 1 deletion packages/omamobile-omarchy/version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
0.1.48
0.1.49