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
10 changes: 10 additions & 0 deletions packages/omamobile-shell/bin/omamobile-setup-user
Original file line number Diff line number Diff line change
Expand Up @@ -624,3 +624,13 @@ if omarchy-done ensure omamobile-lock-after-screensaver; then
mkdir -p ~/.local/state/omarchy/toggles
touch ~/.local/state/omarchy/toggles/lock-after-screensaver
fi

# Omarchy's installer gives each user an unencrypted default keyring (no
# password, never locked)
# (install/user/default-keyring.sh), so apps that keep secrets, Chromium
# among them, don't ask for a keyring password that the phone's autologin
# never types (on the Pixel 9a, Chromium's first start opened a "Choose
# password for new keyring" prompt). A phone user is made without that
# installer, so run Omarchy's own script: it creates only what is missing.
keyring=${OMARCHY_PATH:-/usr/share/omarchy}/install/user/default-keyring.sh
if [[ -f $keyring ]]; then bash "$keyring"; fi
21 changes: 21 additions & 0 deletions packages/omamobile-shell/test/setup-user.sh
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,12 @@ printf '[Desktop Entry]\nType=Application\nName=Papers\nExec=papers\n' >"$A/org.
for b in gs201-cheetah:gs201 zumapro-tegu:zumapro; do
mkdir -p "$t/dt-${b%%:*}"; printf 'google,%s\0google,%s\0' "${b%%:*}" "${b#*:}" >"$t/dt-${b%%:*}/compatible"
done
# Omarchy's default-keyring step, as Omarchy ships it (only what's missing)
mkdir -p "$t/omarchy/install/user"
cat >"$t/omarchy/install/user/default-keyring.sh" <<'KR'
d="$HOME/.local/share/keyrings"; mkdir -p "$d"
[[ -f $d/default ]] || echo Default_keyring >"$d/default"
KR
run() {
env -i HOME="${RUN_HOME:-$H}" PATH="$F:/usr/bin:/bin" XDG_RUNTIME_DIR="$t" OMAMOBILE_SHELL_SHARE="$pkg" OMAMOBILE_SYSTEM_APPLICATIONS="$A" \
OMAMOBILE_DT="${RUN_DT:-$t/dt-gs201-cheetah}" OMAMOBILE_SQUEEKBOARD_SHARE="$pkg/squeekboard/keyboards" \
Expand Down Expand Up @@ -403,3 +409,18 @@ RUN_HOME=$hn GSETTINGS_NO_CLICK_POLICY=1 run
grep -q '^gsettings set org.gnome.nautilus.preferences' "$hn/calls" && fail "nothing is set on a Nautilus without click-policy"
[[ ! -e $hn/.local/state/omarchy/done/omamobile-files-single-tap ]] || fail "the step isn't marked done when the key is missing"
pass "Files: one tap opens a folder, set once, skipped on a Nautilus without the key"

# The default keyring: Omarchy's own step runs, and a user's keyring is kept
hk=$t/keyring; mkdir -p "$hk/.config/hypr"; cp "$H"/.config/hypr/*.lua "$hk/.config/hypr/"
RUN_HOME=$hk run
[[ $(cat "$hk/.local/share/keyrings/default" 2>/dev/null) == Default_keyring ]] || fail "a new user gets Omarchy's default keyring"
echo mine >"$hk/.local/share/keyrings/default"
RUN_HOME=$hk run
[[ $(cat "$hk/.local/share/keyrings/default") == mine ]] || fail "a user's own default keyring is kept"
pass "the default keyring: Omarchy's step runs, and a user's own keyring is kept"

# Without Omarchy's step (a later Omarchy may move it), the setup still succeeds
he=$t/no-keyring-step; mkdir -p "$he/.config/hypr" "$t/empty-omarchy"; cp "$H"/.config/hypr/*.lua "$he/.config/hypr/"
RUN_HOME=$he RUN_OMARCHY_PATH=$t/empty-omarchy run
[[ ! -e $he/.local/share/keyrings/default ]] || fail "no keyring is made without Omarchy's step"
pass "without Omarchy's keyring step the setup still succeeds"
2 changes: 1 addition & 1 deletion packages/omamobile-shell/version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
0.2.97
0.2.98