Skip to content
Merged
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
2 changes: 1 addition & 1 deletion packages/omamobile-shell/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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) |
Expand Down
5 changes: 3 additions & 2 deletions packages/omamobile-shell/bin/omamobile-setup-user
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand All @@ -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)"; }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
5 changes: 5 additions & 0 deletions packages/omamobile-shell/test/all
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion packages/omamobile-shell/test/setup-user.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion packages/omamobile-shell/version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
0.2.69
0.2.70