From c6d72e0e0e1266218e4f881b01d0d0e572f9e389 Mon Sep 17 00:00:00 2001 From: W4HO <87742609+W4HO-ham@users.noreply.github.com> Date: Fri, 30 Oct 2026 16:36:51 -0643 Subject: [PATCH] omamobile-shell 0.2.47: the phone rules go to the Hyprland file that is loaded omamobile-setup-user appended the dofile of hypr/phone.lua to looknfeel.lua, which Omarchy's hyprland.lua requires; a hyprland.lua of the user's own that never loads looknfeel.lua left the phone rules out, and with them the above_lock layer rule, so the fingerprint target sat under the session lock and the owner aimed blind. The step now appends to hyprland.lua when it doesn't load looknfeel.lua, and never twice. Test added. --- .../omamobile-shell/bin/omamobile-setup-user | 17 ++++++++++++++--- packages/omamobile-shell/test/setup-user.sh | 15 +++++++++++++++ packages/omamobile-shell/version | 2 +- 3 files changed, 30 insertions(+), 4 deletions(-) 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