Skip to content

omamobile-shell 0.2.134: a choice of on-screen keyboard in Setup > Keyboard, squeekboard unless the owner picks Tactus - #896

Open
W4HO-ham wants to merge 2 commits into
derekross:mainfrom
W4HO-ham:shell-keyboard-chooser
Open

W4HO-ham wants to merge 2 commits into
derekross:mainfrom
W4HO-ham:shell-keyboard-chooser

Conversation

@W4HO-ham

Copy link
Copy Markdown
Contributor

The shell part of #888, split out as you asked there: it changes how every phone starts its keyboard, whether or not Tactus is installed, so it gets its own review and your 7 Pro run.

What it does:

  • omamobile-osk runs the keyboard the owner chose: squeekboard unless they picked Tactus, and squeekboard again when the choice can't be met (Tactus removed, anything else in the file).
  • The session's autostart line runs it, and now falls back to squeekboard itself where omamobile-osk is gone, as you suggested: sh -c 'command -v omamobile-osk >/dev/null && exec omamobile-osk; exec squeekboard'. An older omamobile-shell installed over this one still leaves a keyboard. The line omamobile-setup-user wrote before is changed once; a line the owner wrote is left alone.
  • squeekboard's user unit runs it too, through a drop-in, for a session that starts the keyboard that way.
  • Setup > Keyboard in Omarchy's menu offers Standard and Tactus with a tick on the one in use. It shows only where Tactus is installed, so on a phone without it nothing changes in the menu.
  • hypr/phone.lua keeps Tactus's virtual keyboard out of the hardware-key binds and Omarchy's own, as it does squeekboard's.

Tested:

  • test/osk.sh: the choice, the fallback, and how a change is carried out (through the unit where there is one, else the old keyboard stopped and the new one started through Hyprland). Its PATH is now only the fakes and links to the few real tools the script and the fakes use (bash, head, tr, id, mkdir, mv, seq, sleep, sed, rm), so a Tactus installed on the machine running the tests doesn't count.
  • test/setup-user.sh: the start line written once, what it runs with omamobile-osk there and without it, the old line changed once and an owner's own kept, and the menu entries. test/all, tests/all and tools/pr-check origin/main pass.
  • On my Pixel 9a (7.3.0-rc6-omamobile-tegu-s2mpg15-m1-g991042e2eff3-dirty) the script, phone.lua's two lists and the menu entries ran by hand: Tactus chosen in Setup > Keyboard by touch and back, and after a reboot the chosen keyboard was the one that started.

Not tested: the shell package itself installed on a phone, and the change with squeekboard on any phone but mine, where Tactus is the keyboard.

The version is yours to set; it says 0.2.134 like the other shell pull requests.

W4HO-ham added a commit to W4HO-ham/omarchy-mobile that referenced this pull request Nov 18, 2026
…yped, opt-in beside squeekboard

squeekboard types what is tapped and nothing else. Tactus is a second keyboard an owner may install beside it: it corrects a word when it is ended (by where each tap landed in its key, how common the word is and the usual slips), puts back what was typed on a Backspace right after, starts sentences with a capital, makes a full stop of two spaces, offers a letter's accented forms on a long press, and has an emoji page with a search. English only, and opt-in: no image installs it, nothing depends on it, and squeekboard stays the phone's keyboard until the owner picks Tactus. It draws itself in the applied Omarchy theme's colours, and takes a new theme's at once; without a theme, or where the owner keeps them, it has light and dark colours of its own.

packages/tactus builds it from Stevia 0.59.0 (GPL-3.0-or-later): six patches to Stevia's files, each with its reason in its header and the files' upstream notices kept, and Tactus's own sources (the typing engine, the autocorrection, the drawing) with the checks that run with no window. Everything is installed under /usr/lib/tactus with the binary named tactus, so it sits beside squeekboard, which Arch's stevia package conflicts with. Stevia's own word completion is off by a settings default compiled into the package's own schemas. The word counts are hermitdave's FrequencyWords (CC-BY-SA-4.0), fetched at the first commit whose README gives that licence (the file is the same since it was added).

Choosing it takes the shell part, omamobile-osk and Setup > Keyboard, which is its own pull request (derekross#896). The typing engine's trace and its debug lines name letter counts, never what was typed.

In Chromium the keyboard has to answer the text field. Chromium (156, text-input-v3) sends new state only once the last done's serial equals its count of commits, and Hyprland sends a text field done only when the keyboard commits something, so its surrounding text is one key behind and a delete_surrounding_text sent then is dropped: the corrected word lands after the wrong one. Tactus sends an empty input-method commit after a field's first sign of life and after every report with text, and a key that would take text away waits up to a quarter of a second for the field to show what was sent before it. The typing engine's test has a browser-like field, answered and unanswered.

The panel's top corners are round, and what shows past them is the application in front, not the wallpaper: the keyboard reserves a little less room than its panel is high (8 px on a screen 360 wide), so the window reaches that far under the panel's top, and the corners are cut no deeper. A taller page takes its room only once it is on the screen and a lower one gives it back at once, so the wallpaper doesn't show between the window and the keyboard while the page changes.

Tested: packages/tactus builds with makepkg in the project's Arch Linux ARM build image, check() included (typing 126 checks, the word list, the keys 80 with the theme's colours, the fallback and the owner's choice of Tactus's own, the emoji page 28, and a run with the trace and the debug lines on that holds nothing typed); test/all with --upstream applies the patches to the untouched Stevia 0.59.0 with no fuzz. On a Pixel 9a the package was installed, chosen in Setup > Keyboard by touch, changed to squeekboard and back, and started by itself after each reboot; it typed and corrected in a GTK 3 text view, in Chromium 156 (a text area, an editable block, a one-line field) and in a GPUI application, in light and in dark, and with the keyboard up no wallpaper showed past the corners or while the page changed. The theme colours ran off screen only so far.
W4HO-ham added a commit to W4HO-ham/omarchy-mobile that referenced this pull request Nov 18, 2026
…yped, opt-in beside squeekboard

squeekboard types what is tapped and nothing else. Tactus is a second keyboard an owner may install beside it: it corrects a word when it is ended (by where each tap landed in its key, how common the word is and the usual slips), puts back what was typed on a Backspace right after, starts sentences with a capital, makes a full stop of two spaces, offers a letter's accented forms on a long press, and has an emoji page with a search. English only, and opt-in: no image installs it, nothing depends on it, and squeekboard stays the phone's keyboard until the owner picks Tactus. It draws itself in the applied Omarchy theme's colours, and takes a new theme's at once; without a theme, or where the owner keeps them, it has light and dark colours of its own.

packages/tactus builds it from Stevia 0.59.0 (GPL-3.0-or-later): six patches to Stevia's files, each with its reason in its header and the files' upstream notices kept, and Tactus's own sources (the typing engine, the autocorrection, the drawing) with the checks that run with no window. Everything is installed under /usr/lib/tactus with the binary named tactus, so it sits beside squeekboard, which Arch's stevia package conflicts with. Stevia's own word completion is off by a settings default compiled into the package's own schemas. The word counts are hermitdave's FrequencyWords (CC-BY-SA-4.0), fetched at the first commit whose README gives that licence (the file is the same since it was added).

Choosing it takes the shell part, omamobile-osk and Setup > Keyboard, which is its own pull request (derekross#896). The typing engine's trace and its debug lines name letter counts, never what was typed.

In Chromium the keyboard has to answer the text field. Chromium (156, text-input-v3) sends new state only once the last done's serial equals its count of commits, and Hyprland sends a text field done only when the keyboard commits something, so its surrounding text is one key behind and a delete_surrounding_text sent then is dropped: the corrected word lands after the wrong one. Tactus sends an empty input-method commit after a field's first sign of life and after every report with text, and a key that would take text away waits up to a quarter of a second for the field to show what was sent before it. The typing engine's test has a browser-like field, answered and unanswered.

The panel's top corners are round, and what shows past them is the application in front, not the wallpaper: the keyboard reserves a little less room than its panel is high (8 px on a screen 360 wide), so the window reaches that far under the panel's top, and the corners are cut no deeper. A taller page takes its room only once it is on the screen and a lower one gives it back at once, so the wallpaper doesn't show between the window and the keyboard while the page changes.

Tested: packages/tactus builds with makepkg in the project's Arch Linux ARM build image, check() included (typing 126 checks, the word list, the keys 80 with the theme's colours, the fallback and the owner's choice of Tactus's own, the emoji page 28, and a run with the trace and the debug lines on that holds nothing typed); test/all with --upstream applies the patches to the untouched Stevia 0.59.0 with no fuzz. On a Pixel 9a the package was installed, chosen in Setup > Keyboard by touch, changed to squeekboard and back, and started by itself after each reboot; it typed and corrected in a GTK 3 text view, in Chromium 156 (a text area, an editable block, a one-line field) and in a GPUI application, in light and in dark, and with the keyboard up no wallpaper showed past the corners or while the page changed. The theme colours ran off screen only so far.

@derekross derekross left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for splitting this out and for taking the start line as far as you did: with command -v omamobile-osk … ; exec squeekboard an older package leaves a keyboard, and test/osk.sh now runs on fakes alone. I read all of it against Omarchy 4.5's own launch_on_start (it prefixes uwsm-app -- and Hyprland runs the result through sh -c), and I checked that Omarchy has no setup.keyboard entry of its own that yours would replace. On a phone without Tactus I expect nothing visible to change: the old start line is rewritten once, squeekboard comes up through two more execs, and the menu entry stays hidden.

It waits on my decision about Tactus (#888), since without it this is a chooser with one choice; I'll come back on that. One thing does need changing before it can merge:

  1. test/setup-user.sh has the fault test/osk.sh had. The start-line check runs PATH="$lt/without:/usr/bin:/bin" sh -c "$cmd" to show that squeekboard starts where omamobile-osk is gone. On a phone that has this package installed, /usr/bin/omamobile-osk is there, so the "without" case runs the installed script; and on a phone where Tactus is chosen (yours) that script starts the real Tactus inside the package's check(), which never returns. A PATH of the fake folder plus a link to sh fixes it, as in test/osk.sh.

And two I'd like, though they only matter once someone has chosen Tactus or keeps their config in a dotfile repository:

  1. Tactus chosen but failing to start. omamobile-osk falls back to squeekboard when Tactus isn't installed, but not when it is installed and exits at once. On a lock that takes a password that is the same lock-out the start line now avoids. Could it run Tactus without exec and, if it exits with an error within a few seconds, exec squeekboard?
  2. A linked autostart.lua. The once-only rewrite ends in mv -f, which replaces a link with a copy, and a failed write there stops the setup for that login. The same two cases you just handled for the portal file in #886.

When it's ready I'll run it on my Pixel 7 Pro before merging (the start line through uwsm-app, a theme change, the lock's password field, a second login), since no phone has started its keyboard through the package yet. It will be the last of the shell pull requests to go in, and before #888; I'll set its number then.

W4HO-ham added a commit to W4HO-ham/omarchy-mobile that referenced this pull request Nov 18, 2026
…a linked autostart file left alone, the start-line test on fakes only

From the review of derekross#896. omamobile-osk runs a chosen Tactus as its child rather than with exec, and when Tactus ends with an error or a crash within its first seconds (OMAMOBILE_OSK_GRACE, 5), it starts squeekboard instead, so a Tactus that can't start no longer leaves a lock that takes a password without a keyboard. A Tactus that quits, runs past its first seconds or is stopped by a signal is not followed; a signal to omamobile-osk is passed on to it. The once-only rewrite of the old start line leaves an autostart.lua that is a link as it is and says what to change, and a write that fails is reported, the setup goes on, and the next login tries again. test/setup-user.sh runs the start line with only its fakes and sh on PATH, as test/osk.sh does, so an installed omamobile-osk can't be what runs. New cases in test/osk.sh and test/setup-user.sh cover each; taking out the fallback, or letting a signal to omamobile-osk bring squeekboard, makes test/osk.sh fail.
@W4HO-ham

Copy link
Copy Markdown
Contributor Author

Thank you for reading it against Omarchy's own launch_on_start. All three are in 7b78dcb, on top of the first commit, rebased onto main (so the version file now reads main's 0.2.134; the number is yours to set, as you said):

  1. test/setup-user.sh's start-line check now runs with only its fakes and a link to sh on PATH (PATH="$lt/with" "$lt/with/sh" -c "$cmd", the same for "without"), so an installed /usr/bin/omamobile-osk can't be what runs.
  2. Tactus chosen but failing at its start. omamobile-osk runs Tactus as its child rather than with exec. If Tactus ends with an error or a crash (SIGILL, SIGTRAP from g_error, SIGABRT, SIGBUS, SIGFPE, SIGSEGV) within its first seconds (OMAMOBILE_OSK_GRACE, 5), it says so on stderr and exec squeekboard. A Tactus that quits with 0, runs past those seconds, or is stopped by a signal from elsewhere (the pkill of a change of keyboard) is not followed. A TERM, INT or HUP to omamobile-osk itself (the unit's stop, the session's end) is passed on to Tactus, and nothing follows it either, whatever status Tactus ends with. test/osk.sh covers each case: an error and a crash at the start bring squeekboard, a quit, a late error and a kill -TERM from elsewhere don't, and a TERM to omamobile-osk stops a Tactus that exits 1 on TERM without bringing squeekboard. Taking out the fallback, or the passing-on, makes it fail.
  3. A linked autostart.lua. The once-only rewrite leaves a link as it is and prints the line to change (as the portal file does in omamobile-shell 0.2.134: the touch file chooser and the permission sheet survive Omarchy 4.5's portal file #886). A rewrite that fails (the test puts a folder where the .new copy goes, so it also fails as root) is reported, the rest of the setup goes on, and the marker is removed, so the next login tries again; the test checks all three.

The package's test/all, tests/all and tools/pr-check origin/main pass.

Understood on the order: last of the shell pull requests, before #888, after your Pixel 7 Pro run.

@W4HO-ham
W4HO-ham force-pushed the shell-keyboard-chooser branch from 2e72651 to 7b78dcb Compare November 18, 2026 18:40
@derekross

Copy link
Copy Markdown
Owner

The Tactus decision is made (see #888): yes in principle, as an opt-in package, after I've tried it on my Pixel 7 Pro. So this is no longer waiting on that; it waits on point 1 above (the PATH in test/setup-user.sh), ideally points 2 and 3, and then my run of the start line on the 7 Pro.

…yboard, squeekboard unless the owner picks Tactus

The shell part of the Tactus pull request, split out as the review asked: it changes how every phone starts its keyboard, whether or not Tactus is installed.

omamobile-osk runs the keyboard the owner chose: squeekboard unless they picked Tactus, and squeekboard again when the choice can't be met. The session's autostart line runs it, and falls back to squeekboard itself where omamobile-osk is gone (an older omamobile-shell installed over this one), so a session never starts without a keyboard. The line omamobile-setup-user wrote before is changed once; a line the owner wrote is left alone. squeekboard's user unit runs omamobile-osk too, through a drop-in. Setup > Keyboard in Omarchy's menu offers Standard and Tactus with a tick on the one in use, and shows only where Tactus is installed. hypr/phone.lua keeps Tactus's virtual keyboard out of the hardware-key binds and Omarchy's own, as it does squeekboard's.

Tested: test/osk.sh (the choice, the fallback, how a change is carried out; only the fakes and a few real tools on its PATH, so a keyboard installed on the test machine doesn't count), test/setup-user.sh (the start line once, what it runs with omamobile-osk and without it, the old line changed once, an owner's own kept, the menu entries), test/all, tools/pr-check. On a Pixel 9a the script, phone.lua's two lists and the menu entries ran by hand, with Tactus chosen by touch and back; the shell package itself has not been installed on a phone.
…a linked autostart file left alone, the start-line test on fakes only

From the review of derekross#896. omamobile-osk runs a chosen Tactus as its child rather than with exec, and when Tactus ends with an error or a crash within its first seconds (OMAMOBILE_OSK_GRACE, 5), it starts squeekboard instead, so a Tactus that can't start no longer leaves a lock that takes a password without a keyboard. A Tactus that quits, runs past its first seconds or is stopped by a signal is not followed; a signal to omamobile-osk is passed on to it. The once-only rewrite of the old start line leaves an autostart.lua that is a link as it is and says what to change, and a write that fails is reported, the setup goes on, and the next login tries again. test/setup-user.sh runs the start line with only its fakes and sh on PATH, as test/osk.sh does, so an installed omamobile-osk can't be what runs. New cases in test/osk.sh and test/setup-user.sh cover each; taking out the fallback, or letting a signal to omamobile-osk bring squeekboard, makes test/osk.sh fail.
@W4HO-ham
W4HO-ham force-pushed the shell-keyboard-chooser branch from 7b78dcb to 3a831a1 Compare November 18, 2026 21:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants