Skip to content

omamobile-shell: omamobile-keyboard-languages add, a layout without switching (#892 b) - #1020

Open
Somnius wants to merge 1 commit into
derekross:mainfrom
Somnius:shell-kbd-languages-add
Open

Somnius wants to merge 1 commit into
derekross:mainfrom
Somnius:shell-kbd-languages-add

Conversation

@Somnius

@Somnius Somnius commented Nov 24, 2026

Copy link
Copy Markdown
Contributor

This is (b) from #892: the add verb for omamobile-keyboard-languages, as its own small shell PR so it can go in before the Settings Keyboard page (a).

omamobile-keyboard-languages add NAME appends NAME to org.gnome.desktop.input-sources sources when it isn't there and leaves the first entry alone, so the on-screen keyboard doesn't switch. set moves NAME to the front, which does switch it. A name that's already listed writes nothing. With an empty list it writes us, NAME, so squeekboard's fallback stays in the list (set keeps it too, as the second entry); add us on an empty list writes nothing.

The page in (a) will call this for each new layout squeekboard has a file for, never remove, so there's one writer for that list.

Tests: new add cases in test/keyboard-languages.sh (append, already there, empty list, us on empty, no name, option-like name). The package's test/all and tests/grep-q-pipes pass in the Arch CI container as uid 1000, and tools/pr-check is clean. docs/KEYBOARD-LAYOUTS.md and the README row mention add, and I updated the doc's line refs to the script to match.

Not run on the phone yet (so "doesn't switch" is from the code and the tests, not a look at the keyboard), it's off charging. Version left for you.

…witching

add NAME appends NAME to org.gnome.desktop.input-sources sources when it
isn't there and leaves the first entry (the current layout) alone; set
moves NAME to the front, which switches the keyboard. An empty list
becomes us, NAME, so squeekboard's fallback stays in the list (set keeps
it too, as the second entry), and a listed name writes nothing. The
Settings Keyboard page (derekross#892, part a) uses it so the on-screen keyboard's
list is only ever added to, with one writer.

Signed-off-by: Lef <me@lefteros.com>

@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, Lef. This is exactly the small, separate piece I asked for: add leaves the first entry alone, writes nothing when the layout is already there, and keeps squeekboard's fallback in an empty list, and the dispatcher change leaves set and remove as they were. I ran your tests and removed each of the three new rules in turn; each removal fails the case it should, so the tests really hold them.

I'll set the version when I merge (0.2.144 if nothing takes it first), and I'll leave "(#892 b)" out of the commit title, since (b) in our split is the bar label in #949; this one is the add verb from question 5. Nothing calls it until #1022, so it can go in now, and #1022 rebases onto main after it.

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