* Unify input methods with the installer keyboard selection * Preserve inherited input keys and later keyboard changes * Exercise input engines across desktop toolkits * Show input modes in the keyboard indicator * Keep Pinyin setup prompts visible * Remember input selections before an app gains focus * Remove the Japanese input welcome notification * Show explicit choices on notification cards * Suppress the Cloudpinyin first-use prompt * Show the input switching shortcut in keyboard hints * Verify input setup and composition stay quiet * Use Super+I for input switching independently of Fcitx keys * Restore linked input settings and attribute test notifications to Fcitx * Correct the input setup shortcut hint * Keep input tooltips to the name and switching shortcut * Place the input language selector with the right bar widgets * Show input switching only for multiple layouts or methods * Unify input method and keyboard layout switching * Select keyboard layouts and input methods in the Typing menu * Apply typing selections immediately from the menu * Use installer keyboard choices and keep typing selections accurate * Queue typing changes and wait for saved selections * Keep queued typing selections when reopening the menu * Cycle keyboard layouts alongside composition engines * Avoid shadowing Python typing and retain pending mixed input selections * Keep input clicks working through controller and compositor failures * Move the keyboard layout widget to the right side of existing bars Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * Map keyboard choices to the layouts the installer sets Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * Keep the switching order when changing input methods Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * Set input method fonts only after the selection saves Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * Restore confirmed picker checks when an immediate change fails Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * Route Super+I through the shell's input reader so unfocused choices stick Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * Restore the input group when the font preference cannot be written Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * Drop the azerty conversion now that the installer no longer offers it Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * Apply the owner's keyboard layout once before persisting the input choice A quattro merge kept a second apply_keyboard after the retry loop, which re-ran loadkeys and firstboot, ignored their failure, and overwrote the XKB layout setup supplies for keymaps kbd-model-map lacks. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * Give the Lao keyboard choice a Lao desktop layout The row used la-latin1, kbd's Latin American Spanish keymap, so Lao installs typed Spanish. There is no Lao console keymap; like Korean, the console stays US and the desktop gets la, which Omarchy keeps behind US as a non-Latin layout. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * Load engines installed after Fcitx started when they are selected The Typing menu refused an engine whose package an update had installed, since Fcitx discovers engines only at startup. Restart input once and wait for the engine; name the package when it really is not installed. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * Cycle input methods back with Super+Shift+I Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * Drop notification action buttons now that the Pinyin prompt is suppressed Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * Cycle input only through the shell's reader Without the shell there is no bar or menu either, so the one-shot cycling path only duplicated the reader's logic. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * Add engines from the command line through the Typing menu's path omarchy setup input <engine> had its own restart, append, select and live-rollback code in configure.py, parallel to the menu's. It now installs the packages and appends through typing_setup, leaving configure.py with install-time seeding and update defaults. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * Keep Ctrl+Space out of Fcitx's toggles instead of probing for it The terminal prefix bind read the Fcitx config and profile on every press to avoid fighting a Ctrl+Space toggle. configure --defaults now removes that key from every trigger list, so the bind only checks for a terminal. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * Run the input-method scripts with the system Python A bare python resolves through PATH, so a mise, pyenv or venv interpreter could run them without the system's PyGObject. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
98 lines
3.8 KiB
Bash
98 lines
3.8 KiB
Bash
#!/bin/bash
|
|
set -euo pipefail
|
|
source "$(cd -- "$(dirname -- "${BASH_SOURCE[0]}")" && pwd)/base-test.sh"
|
|
|
|
work=$(mktemp -d)
|
|
trap 'rm -rf "$work"' EXIT
|
|
mkdir -p "$work/bin" "$work/home"
|
|
export TEST_CALLS="$work/calls"
|
|
for command in omarchy-pkg-add omarchy-hook-install omarchy-input-method systemctl; do
|
|
cat >"$work/bin/$command" <<'SH'
|
|
#!/bin/bash
|
|
printf '%s %s\n' "${0##*/}" "$*" >>"$TEST_CALLS"
|
|
case "$*" in
|
|
'configure --defaults') [[ ${TEST_INPUT_FAIL:-0} == 0 ]] ;;
|
|
'--user enable owed.service') [[ ${TEST_TTY:-0} == 0 ]] ;;
|
|
'--user is-active --quiet graphical-session.target') [[ ${TEST_TTY:-0} == 0 ]] ;;
|
|
'--user start owed.service') [[ ${TEST_START_FAIL:-0} == 0 ]] ;;
|
|
*) exit 0 ;;
|
|
esac
|
|
SH
|
|
chmod +x "$work/bin/$command"
|
|
done
|
|
|
|
migration="$ROOT/migrations/1789764927.sh"
|
|
run_migration() {
|
|
HOME="$work/home" PATH="$work/bin:$PATH" bash -euo pipefail "$migration"
|
|
}
|
|
run_migration
|
|
run_migration
|
|
grep -Fx 'omarchy-pkg-add owe owe-lockfeed' "$TEST_CALLS" >/dev/null
|
|
grep -Fx 'omarchy-hook-install theme-set /usr/share/owe/10-owe-sync' "$TEST_CALLS" >/dev/null
|
|
grep -Fx 'systemctl --user start owed.service' "$TEST_CALLS" >/dev/null
|
|
pass "migration installs OWE, its theme refresh hook, and starts the graphical session service"
|
|
|
|
: >"$TEST_CALLS"
|
|
TEST_TTY=1 run_migration
|
|
TEST_TTY=1 run_migration
|
|
[[ $(readlink "$work/home/.config/systemd/user/graphical-session.target.wants/owed.service") == /usr/lib/systemd/user/owed.service ]]
|
|
if grep -F 'systemctl --user start' "$TEST_CALLS" >/dev/null; then
|
|
fail "TTY migration must not start the renderer"
|
|
fi
|
|
pass "TTY migrations enable the next login without starting a renderer"
|
|
|
|
: >"$TEST_CALLS"
|
|
OMARCHY_UPGRADE_TO_QUATTRO_LIVE=1 run_migration
|
|
if grep -F 'systemctl --user start' "$TEST_CALLS" >/dev/null; then
|
|
fail "Quattro upgrade must defer OWE until the new graphical session"
|
|
fi
|
|
pass "Quattro upgrade enables OWE without starting it in the old shell"
|
|
|
|
if TEST_START_FAIL=1 run_migration; then
|
|
fail "a failed live service start leaves the migration pending"
|
|
fi
|
|
pass "a failed live service start fails the migration"
|
|
|
|
: >"$TEST_CALLS"
|
|
HOME="$work/home" PATH="$work/bin:$PATH" bash "$ROOT/install/user/first-run/enable-user-units.sh"
|
|
grep -E '^systemctl --user enable --now .*owed.service' "$TEST_CALLS" >/dev/null
|
|
grep -Fx 'omarchy-hook-install theme-set /usr/share/owe/10-owe-sync' "$TEST_CALLS" >/dev/null
|
|
pass "fresh installs enable OWE and install the theme refresh hook"
|
|
|
|
: >"$TEST_CALLS"
|
|
HOME="$work/home" PATH="$work/bin:$PATH" TEST_INPUT_FAIL=1 bash "$ROOT/install/user/first-run/enable-user-units.sh"
|
|
grep -Fx 'omarchy-input-method configure --defaults' "$TEST_CALLS" >/dev/null
|
|
grep -E '^systemctl --user enable --now .*owed.service' "$TEST_CALLS" >/dev/null
|
|
pass "failed input defaults do not block enabling first-run services"
|
|
|
|
cat >"$work/bin/ffmpegthumbnailer" <<'SH'
|
|
#!/bin/bash
|
|
printf 'thumbnail\n' >>"$TEST_CALLS"
|
|
while (( $# )); do
|
|
case "$1" in
|
|
-o) output=$2; shift 2 ;;
|
|
*) shift ;;
|
|
esac
|
|
done
|
|
[[ ${TEST_POSTER_FAIL:-0} == 0 ]] || exit 1
|
|
printf 'poster\n' >"$output"
|
|
SH
|
|
chmod +x "$work/bin/ffmpegthumbnailer"
|
|
source_path="$work/video with 'quotes'.mp4"
|
|
printf 'source\n' >"$source_path"
|
|
poster() {
|
|
PATH="$work/bin:$PATH" XDG_CACHE_HOME="$work/cache" bash "$ROOT/shell/plugins/lock/poster.sh" "$source_path"
|
|
}
|
|
: >"$TEST_CALLS"
|
|
first=$(poster)
|
|
[[ -s $first && $(poster) == "$first" ]]
|
|
[[ $(wc -l <"$TEST_CALLS") == 1 ]]
|
|
printf 'changed source\n' >>"$source_path"
|
|
second=$(poster)
|
|
[[ -s $second && $second != "$first" && ! -e $first ]]
|
|
pass "lock posters are cached, refreshed after source changes, and old frames are evicted"
|
|
printf 'broken source\n' >>"$source_path"
|
|
if TEST_POSTER_FAIL=1 poster; then fail "failed poster generation must fail"; fi
|
|
[[ -z $(find "$work/cache" -name '.poster-*.jpg' -print -quit) ]]
|
|
pass "failed poster generation never publishes a partial image"
|