Repository navigation
Port omarchy-keyboard controller and listener to C99 - #228
Merged
Merged
Conversation
Replaces the Python 3 omarchy-keyboard script with a zero-dependency C99 binary (desktop/configuration/keyboard.c). omarchy-keyboard listen runs continuously for the entire session (11.7 MiB RSS+Swap as Python 3) and omarchy-keyboard show|hide|toggle|quiet|hold|release is spawned on every text-field tap, dismissal, and control-center toggle. The C99 binary (~40 KB ELF, ~0.5 MiB RSS) eliminates both the resident Python interpreter and per-invocation interpreter startup latency while preserving exact policy semantics, colors.toml parsing, and wlr-randr phone-layout detection. Assisted-by: LLM
keyboard.c uses SOCK_NONBLOCK and SOCK_CLOEXEC, which macOS lacks; the repository's suite is green on both, and a test that needs what a Mac lacks skips with its reason (AGENTS.md). Assisted-by: LLM
This was referenced Dec 6, 2026
# Conflicts: # CHANGELOG.md # Makefile # desktop/install-tree # release/audit.py # tests/package_tree.py # tests/test_package.py
Contributor
|
Merged, thank you Tom! The keyboard is the helper people touch most, so dropping the Python start-up here is very welcome. On your branch we merged main in after #221 (the keyboard buffer change) landed. The two didn't overlap in code, only in the shared build files, which now list the keyboard controller next to the other C helpers. We also added the changelog line. Next up: #229. |
This was referenced Dec 6, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Replaces the Python 3
omarchy-keyboardscript with a zero-dependency C99 binary (desktop/configuration/keyboard.c, ~40 KB ELF).omarchy-keyboard listendaemon (~0.5 MiB RSS vs 11.7 MiB RSS+Swap).show|hide|toggle|quiet|hold|releaseinvocation.colors.tomlparsing, andwlr-randr --jsonphone-layout detection.tests/test_keyboard_policy.pyto compilekeyboard.cand run all 35 original policy/phone-layout tests verbatim plus 2 new end-to-end tests.Tested: 74/74 pass (
test_keyboard_policy.py,test_keyboard_shortcuts.py,test_package_staging.py,test_package.py).