Skip to content
Closed
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
9 changes: 9 additions & 0 deletions packages/omamobile-shell/bin/omamobile-setup-user
Original file line number Diff line number Diff line change
Expand Up @@ -141,6 +141,15 @@ o.launch_on_start("squeekboard")
LUA
fi

# Files (Nautilus) opens folders with one tap: a double tap is a mouse habit
# (issue #261). Set once, so a user who goes back to double-click keeps it;
# skipped when this Nautilus has no click-policy key, so a release that drops
# it can't break the login setup.
if gsettings list-keys org.gnome.nautilus.preferences 2>/dev/null | grep -qx click-policy \
&& omarchy-done ensure omamobile-files-single-tap; then
gsettings set org.gnome.nautilus.preferences click-policy single
fi

# Terminals get squeekboard's terminal layout (Tab, Ctrl, Alt, arrows); ours
# adds Esc to its top row, for vim and friends. squeekboard reads layouts only
# from the user's data dir, so link ours there unless the user has their own.
Expand Down
19 changes: 18 additions & 1 deletion packages/omamobile-shell/test/setup-user.sh
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,12 @@ case $1 in
ensure) [[ -e $d/$2 ]] && exit 1; touch "$d/$2" ;;
mark) touch "$d/$2" ;;
esac'
fake gsettings 'echo "gsettings $*" >>"$HOME/calls"'
# gsettings: logs calls; list-keys answers for Nautilus (click-policy unless
# GSETTINGS_NO_CLICK_POLICY plays a Nautilus without the key)
fake gsettings 'echo "gsettings $*" >>"$HOME/calls"
if [[ $1 == list-keys && $2 == org.gnome.nautilus.preferences ]]; then
printf "default-folder-viewer\n"; [[ -n ${GSETTINGS_NO_CLICK_POLICY:-} ]] || printf "click-policy\n"
fi'
fake systemctl 'echo "systemctl $*" >>"$HOME/calls"'
fake chromium 'echo "Chromium 153.0.0.0"'
fake omamobile-keyboard-theme 'echo "omamobile-keyboard-theme $*" >>"$HOME/calls"'
Expand Down Expand Up @@ -49,6 +54,7 @@ done
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" \
GSETTINGS_NO_CLICK_POLICY="${GSETTINGS_NO_CLICK_POLICY:-}" \
bash bin/omamobile-setup-user >"$t/out" 2>&1 || { cat "$t/out"; fail "omamobile-setup-user runs"; }
}
run
Expand Down Expand Up @@ -255,3 +261,14 @@ RUN_HOME=$hk run
|| fail "a layout the user wrote stays"
[[ -L $hk/.local/share/squeekboard/keyboards/fr.yaml ]] || fail "the others are linked beside it"
pass "the keyboard: a layout of the user's own stays"

# Files opens folders with one tap (issue #261): set once (H ran three times),
# and not at all on a Nautilus without the click-policy key
[[ $(grep -c '^gsettings set org.gnome.nautilus.preferences click-policy single$' "$H/calls") == 1 ]] \
|| fail "Nautilus's click-policy is set to single once"
hn=$t/no-click-policy; mkdir -p "$hn/.config/hypr" "$hn/.config/omarchy/extensions"
cp "$H"/.config/hypr/{looknfeel,autostart,monitors}.lua "$hn/.config/hypr/"
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"
2 changes: 1 addition & 1 deletion packages/omamobile-shell/version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
0.2.66
0.2.69