diff --git a/packages/omamobile-shell/bin/omamobile-setup-user b/packages/omamobile-shell/bin/omamobile-setup-user index 69043b972..be3081dbf 100755 --- a/packages/omamobile-shell/bin/omamobile-setup-user +++ b/packages/omamobile-shell/bin/omamobile-setup-user @@ -166,14 +166,25 @@ if omarchy-done ensure omamobile-suspend-off; then touch ~/.local/state/omarchy/toggles/suspend-off fi -# Phone window rules (apps fill the screen instead of floating at desktop -# sizes), loaded after Omarchy's defaults from the user's override file, once. +# Phone window and layer rules (apps fill the screen instead of floating at +# desktop sizes; the fingerprint target, the keyboard and the call card draw +# above the lock), loaded after Omarchy's defaults from the user's override +# file, once. Omarchy's hyprland.lua requires looknfeel.lua, so the dofile +# goes there; a hyprland.lua of the user's own that never loads looknfeel.lua +# (a bring-up gate, say) gets it appended directly, or the rules would never +# run and the fingerprint target would sit under the lock, unseen. if omarchy-done ensure omamobile-phone-rules; then - cat >>~/.config/hypr/looknfeel.lua <>"$phone_rules_target" </dev/null || fail "the phone rules are loaded from looknfeel.lua" +[[ $(grep -c 'hypr/phone.lua' "$H/.config/hypr/looknfeel.lua") == 1 ]] || fail "the phone rules are added once" +mkdir -p "$t/gate/.config/hypr" "$t/gate/.config/omarchy/extensions" +printf 'dofile("/usr/share/omarchy/default/hypr/bootstrap.lua")\nrequire("default.hypr.omarchy")\n' >"$t/gate/.config/hypr/hyprland.lua" +for f in monitors looknfeel autostart; do echo "-- $f" >"$t/gate/.config/hypr/$f.lua"; done +printf 'local omarchy_gdk_scale = 2\nlocal omarchy_monitor_scale = "auto"\n' >"$t/gate/.config/hypr/monitors.lua" +cp "$H/.config/omarchy/extensions/omarchy-menu.jsonc" "$t/gate/.config/omarchy/extensions/" +RUN_HOME=$t/gate run +grep -c 'dofile(".*hypr/phone.lua")' "$t/gate/.config/hypr/hyprland.lua" >/dev/null || fail "a hyprland.lua that skips looknfeel.lua gets the phone rules itself" +grep -c 'hypr/phone.lua' "$t/gate/.config/hypr/looknfeel.lua" >/dev/null && fail "the phone rules aren't put where Hyprland never reads them" +pass "the phone rules go to the file Hyprland loads, once" + # GDK_SCALE follows the phone's monitor scale (TOUCH-PLAN 2.8) grep -cx 'local omarchy_monitor_scale = 3' "$H/.config/hypr/monitors.lua" >/dev/null || fail "the monitor scale is 3" grep -cx 'local omarchy_gdk_scale = 3' "$H/.config/hypr/monitors.lua" >/dev/null || fail "GDK_SCALE is 3 with it" diff --git a/packages/omamobile-shell/version b/packages/omamobile-shell/version index 16c9e92a2..b14085d14 100644 --- a/packages/omamobile-shell/version +++ b/packages/omamobile-shell/version @@ -1 +1 @@ -0.2.45 +0.2.47