diff --git a/packages/omamobile-shell/README.md b/packages/omamobile-shell/README.md index 92fb719f6..f88b0b283 100644 --- a/packages/omamobile-shell/README.md +++ b/packages/omamobile-shell/README.md @@ -20,7 +20,7 @@ Omarchy Mobile's phone profile for Omarchy's own shell. It isn't a fork: these a | `plugins/omamobile.access` | The permission sheet: "Allow Camera to use the camera?" with the app's icon and two large buttons, in place of xdg-desktop-portal-gtk's desktop dialog | | `plugins/omamobile.fingerprint` | The under-display fingerprint sensor: target during verification, enrollment screen | | `profile/shell.json` | The phone layout the setup seeds once | -| `bin/omamobile-setup-user` | Omarchy Mobile's per-user setup (Omarchy lifecycle `setup-user`); `--adopt`, for a user set up by hand rather than by firstboot, marks the once-only steps that would overwrite or repeat what that user has (the shell profile, the monitor scale, the cursor and keyboard lines, the screensaver) done without running them; the other steps run as for a new user (missing phone plugins and an idle block go into `shell.json`, Chromium's flags are written), and the setup service then runs at each login | +| `bin/omamobile-setup-user` | Omarchy Mobile's per-user setup (Omarchy lifecycle `setup-user`); `--adopt`, for a user set up by hand rather than by firstboot, marks the once-only steps that would overwrite or repeat what that user has (the shell profile, the monitor scale, the cursor and keyboard lines, the screensaver, Files' click policy) done without running them; the other steps run as for a new user (missing phone plugins and an idle block go into `shell.json`, Chromium's flags are written), and the setup service then runs at each login | | `bin/omamobile-launch` | One app per screen: every launch from the shell (drawer, home screen, widgets, links, the agent) gets a new empty workspace through a per-launch Hyprland exec rule, or focuses the app's open window; and the switcher's "Show with…" and "Move to its own screen" | | `bin/omamobile-osk-watch` | Reports squeekboard's visibility (sm.puri.OSK0) to the fingerprint, keyboard and launcher plugins | | `bin/omamobile-osk-guard` | Turns the on-screen keyboard (`screen-keyboard-enabled`) back on when it was left off with no screensaver running (a user unit for every graphical session) | diff --git a/packages/omamobile-shell/bin/omamobile-setup-user b/packages/omamobile-shell/bin/omamobile-setup-user index 5a5330bf3..5c34f0880 100755 --- a/packages/omamobile-shell/bin/omamobile-setup-user +++ b/packages/omamobile-shell/bin/omamobile-setup-user @@ -10,7 +10,8 @@ set -euo pipefail # once-only steps that would overwrite or repeat what such a user already # has are marked done without running: the shell profile (shell.json), the # monitor scale, the cursor and on-screen keyboard lines appended to the -# Hyprland files, and the screensaver's branding files. Every other step +# Hyprland files, the screensaver's branding files and Files' click +# policy (a hand-set-up user may have chosen double-click). Every other step # runs as on a new user: most check the user's files first (the menu # entries, foot's touch lines, phone.lua, the idle block), and a few # change what is there (they add the missing phone plugins to shell.json, @@ -19,7 +20,7 @@ set -euo pipefail # step the user does want can be had by removing its marker from # ~/.local/state/omarchy/done/ before the next login. if [[ ${1:-} == --adopt ]]; then - adopt=" omamobile-shell-profile omamobile-monitor-scale omamobile-hide-cursor omamobile-osk omamobile-screensaver " + adopt=" omamobile-shell-profile omamobile-monitor-scale omamobile-hide-cursor omamobile-osk omamobile-screensaver omamobile-files-single-tap " omarchy-done() { if [[ $1 == ensure && $adopt == *" $2 "* ]]; then command omarchy-done check "$2" 2>/dev/null || { command omarchy-done mark "$2"; echo "omamobile-setup-user: adopted $2 (marked done, not run)"; } diff --git a/packages/omamobile-shell/systemd/user/xdg-desktop-portal-gnome-omamobile.conf b/packages/omamobile-shell/systemd/user/xdg-desktop-portal-gnome-omamobile.conf index 6e85537c3..9be058877 100644 --- a/packages/omamobile-shell/systemd/user/xdg-desktop-portal-gnome-omamobile.conf +++ b/packages/omamobile-shell/systemd/user/xdg-desktop-portal-gnome-omamobile.conf @@ -4,5 +4,13 @@ # GDK_BACKEND=wayland,x11,*, and with any GDK_BACKEND other than "wayland" the # backend refuses its dialogs ("GDK backend forced via env var") and exposes # Settings only, so every open or save request failed. Give it plain Wayland. +# +# environment.d/20-omamobile-osk.conf sets GDK_DEBUG=portals and +# GTK_USE_PORTAL=1 so that apps open this chooser. Inside the backend itself +# they make GTK 4 ask the main portal for its Settings at start-up, and the +# main portal is waiting for this backend: both stalled until D-Bus gave up +# after 25 s, and the shell, the voice overlay and the file chooser waited +# with them at every boot (#277). The backend must not use the portal. [Service] Environment=GDK_BACKEND=wayland +UnsetEnvironment=GDK_DEBUG GTK_USE_PORTAL diff --git a/packages/omamobile-shell/test/all b/packages/omamobile-shell/test/all index 5925626cc..ea7a640c3 100755 --- a/packages/omamobile-shell/test/all +++ b/packages/omamobile-shell/test/all @@ -895,6 +895,11 @@ python3 -c 'import json; assert {"id": "omamobile.access"} in json.load(open("pr grep -c 'add_plugin omamobile.access' bin/omamobile-setup-user >/dev/null || fail "existing users get the permission sheet" grep -cx 'org.freedesktop.impl.portal.Access=omamobile;gtk' portal/hyprland-portals.conf >/dev/null || fail "Hyprland's portals.conf picks the sheet for Access only" ! grep -c '^default' portal/hyprland-portals.conf >/dev/null || fail "the override leaves the default portals alone" +# The file chooser's backend must not itself use the portal (#277): the +# session's GDK_DEBUG=portals / GTK_USE_PORTAL=1 made it wait 25 s on the main +# portal, which was waiting for it. +grep -cx 'UnsetEnvironment=GDK_DEBUG GTK_USE_PORTAL' systemd/user/xdg-desktop-portal-gnome-omamobile.conf >/dev/null \ + || fail "xdg-desktop-portal-gnome runs without the session's portal variables" grep -cx 'DBusName=org.freedesktop.impl.portal.desktop.omamobile' portal/omamobile.portal >/dev/null || fail "omamobile.portal names the service" grep -cx 'BusName=org.freedesktop.impl.portal.desktop.omamobile' systemd/user/omamobile-portal-access.service >/dev/null || fail "the unit owns the bus name" if grep -n 'above_lock' hypr/phone.lua | grep -c 'omamobile-access' >/dev/null; then fail "the permission sheet never shows over the lock"; fi diff --git a/packages/omamobile-shell/test/setup-user.sh b/packages/omamobile-shell/test/setup-user.sh index 7f9d20bdc..d963b7c95 100644 --- a/packages/omamobile-shell/test/setup-user.sh +++ b/packages/omamobile-shell/test/setup-user.sh @@ -281,7 +281,7 @@ before=$(snap) RUN_HOME=$ha run --adopt; out=$(cat "$t/out") [[ $(snap) == "$before" ]] || fail "--adopt changed a file an overwriting step owns" python3 -c 'import json,sys; d=json.load(open(sys.argv[1])); assert {"id":"mine"} in d["plugins"]' "$ha/.config/omarchy/shell.json" || fail "--adopt reseeded shell.json" -for s in omamobile-shell-profile omamobile-monitor-scale omamobile-hide-cursor omamobile-osk omamobile-screensaver; do +for s in omamobile-shell-profile omamobile-monitor-scale omamobile-hide-cursor omamobile-osk omamobile-screensaver omamobile-files-single-tap; do [[ -e $ha/.local/state/omarchy/done/$s ]] || fail "--adopt did not mark $s" grep -c "adopted $s" <<<"$out" >/dev/null || fail "--adopt did not say it adopted $s" done diff --git a/packages/omamobile-shell/version b/packages/omamobile-shell/version index b816fa806..a23021e6c 100644 --- a/packages/omamobile-shell/version +++ b/packages/omamobile-shell/version @@ -1 +1 @@ -0.2.69 +0.2.70