Commit graph

108 commits

Author SHA1 Message Date
Khoa Vo
63c495894e fix: GNOME Shell D-Bus queries via gdbus subprocess as original user
Some checks are pending
Build & Release / Build & test (push) Waiting to run
Build & Release / Build .deb (push) Blocked by required conditions
2026-07-01 13:05:28 +07:00
Khoa Vo
e025ead244 fix: add GNOME Shell D-Bus PID query for Wayland password detection
Some checks are pending
Build & Release / Build & test (push) Waiting to run
Build & Release / Build .deb (push) Blocked by required conditions
2026-07-01 12:59:00 +07:00
Khoa Vo
ddf9f34ad0 fix: add process-based sudo/passwd detection for terminal password prompts
Some checks are pending
Build & Release / Build & test (push) Waiting to run
Build & Release / Build .deb (push) Blocked by required conditions
2026-07-01 12:52:07 +07:00
Khoa Vo
f77b7ea682 fix: recover DBUS_SESSION_BUS_ADDRESS when running as root for AT-SPI2 password detection
Some checks are pending
Build & Release / Build & test (push) Waiting to run
Build & Release / Build .deb (push) Blocked by required conditions
2026-07-01 12:46:38 +07:00
Khoa Vo
cc05e02559 fix: wl-copy --paste-once for fast clipboard on Wayland/GNOME
Some checks are pending
Build & Release / Build & test (push) Waiting to run
Build & Release / Build .deb (push) Blocked by required conditions
2026-07-01 12:41:56 +07:00
Khoa Vo
800d33e6a7 docs: update CHANGELOG with recent fixes, update test count
Some checks are pending
Build & Release / Build & test (push) Waiting to run
Build & Release / Build .deb (push) Blocked by required conditions
2026-07-01 12:11:14 +07:00
Khoa Vo
7ac73485e4 fix: add xprop/wmctrl fallbacks for window detection when xdotool is not installed
Some checks are pending
Build & Release / Build & test (push) Waiting to run
Build & Release / Build .deb (push) Blocked by required conditions
2026-07-01 12:05:20 +07:00
Khoa Vo
81b483e7ac fix: AT-SPI2 connects to a11y bus, not session bus (password detection was silently failing)
Some checks are pending
Build & Release / Build & test (push) Waiting to run
Build & Release / Build .deb (push) Blocked by required conditions
2026-07-01 11:59:40 +07:00
Khoa Vo
94c08bb0da fix: periodic password field re-check every 30 keystrokes for in-terminal prompts
Some checks are pending
Build & Release / Build & test (push) Waiting to run
Build & Release / Build .deb (push) Blocked by required conditions
2026-07-01 11:51:57 +07:00
Khoa Vo
ff607f0559 fix: double space on Ctrl+Space toggle (flush char forwarded twice when engine disabled)
Some checks are pending
Build & Release / Build & test (push) Waiting to run
Build & Release / Build .deb (push) Blocked by required conditions
2026-07-01 11:34:25 +07:00
Khoa Vo
81a2baa5eb fix: improve single-instance lock with PID + stale detection
Some checks are pending
Build & Release / Build & test (push) Waiting to run
Build & Release / Build .deb (push) Blocked by required conditions
2026-07-01 11:25:53 +07:00
Khoa Vo
6beeee2e69 release: v0.1.7 — password detection, Telex enabled, GNOME Wayland support 2026-07-01 11:00:11 +07:00
Khoa Vo
d34180537a fix: improve Ubuntu and derivatives support in install scripts
Some checks are pending
Build & Release / Build & test (push) Waiting to run
Build & Release / Build .deb (push) Blocked by required conditions
2026-07-01 08:12:47 +07:00
Khoa Vo
d7260917b4 docs: separate installation instructions for github and forgejo
Some checks failed
Build & Release / Build & test (push) Has been cancelled
Build & Release / Build .deb (push) Has been cancelled
2026-06-29 21:19:35 +07:00
Khoa Vo
5242473b93 fix: use file locking instead of abstract socket for single instance to avoid rust null byte error
Some checks are pending
Build & Release / Build & test (push) Waiting to run
Build & Release / Build .deb (push) Blocked by required conditions
2026-06-29 21:09:48 +07:00
Khoa Vo
66351de4fd fix: remove invalid local keyword usage outside function
Some checks are pending
Build & Release / Build & test (push) Waiting to run
Build & Release / Build .deb (push) Blocked by required conditions
2026-06-29 20:55:27 +07:00
Khoa Vo
d9091ff66f fix: linuxmint distro detection and rustup default toolchain issue for sudo users
Some checks are pending
Build & Release / Build & test (push) Waiting to run
Build & Release / Build .deb (push) Blocked by required conditions
2026-06-29 20:50:15 +07:00
Khoa Vo
efa831bd0b add installation and packaging scripts
Some checks are pending
Build & Release / Build & test (push) Waiting to run
Build & Release / Build .deb (push) Blocked by required conditions
2026-06-29 20:45:48 +07:00
Khoa Vo
ccc2b46580 docs: add single command installation and uninstallation
Some checks failed
Build & Release / Build & test (push) Has been cancelled
Build & Release / Build .deb (push) Has been cancelled
2026-06-29 20:35:11 +07:00
Khoa Vo
947c7f949d add uninstall script
Some checks are pending
Build & Release / Build & test (push) Waiting to run
Build & Release / Build .deb (push) Blocked by required conditions
2026-06-29 20:34:55 +07:00
Khoa Vo
389c58e1fa feat: ensure single instance to prevent duplicate daemon and tray icons
Some checks are pending
Build & Release / Build & test (push) Waiting to run
Build & Release / Build .deb (push) Blocked by required conditions
2026-06-29 20:33:10 +07:00
Khoa Vo
88d39b4475 release: v0.1.6 — uinput-first injection, window-switch fix, Telex disabled
Some checks are pending
Build & Release / Build & test (push) Waiting to run
Build & Release / Build .deb (push) Blocked by required conditions
- uinput injection is now primary on X11 (XTest fallback)
- X11 XTest keycode offset +8 fixed for all send_keycode paths
- Window switch detection on every keystroke (no more gap > 100ms guard)
- Telex greyed out in tray with '(next version)' label
- Flatpak and AppImage removed; only .deb packaging
- All Cargo.toml versions bumped to 0.1.6
2026-06-29 16:07:15 +07:00
Khoa Vo
7d0b2e520c fix: Vietnamese mode default, Flatpak tray UX, Cinnamon menu entry
Some checks failed
Build & Release / Build & test (push) Has been cancelled
Build & Release / Build packages (push) Has been cancelled
- Change start_enabled default to true (Vietnamese active on launch)
- Tray: detect Flatpak sandbox, skip pointless password prompt
- Tray: write first-launch flag file always (not just after sudo)
- Desktop file: StartupNotify=true, wider categories for Cinnamon menu
- Update tests for new default, README config example
2026-06-29 14:43:49 +07:00
Khoa Vo
98ce9def79 feat: Flatpak tray, X11 dlopen window query, desktop menu entry
Some checks are pending
Build & Release / Build & test (push) Waiting to run
Build & Release / Build packages (push) Blocked by required conditions
- Add system tray (vietc-tray) to Flatpak build; command changed to
  vietc-tray which spawns the daemon
- Desktop menu entry: Viet+ appears in app launcher for search/install/uninstall
- Tray fixes: find_sibling_binary tries {name}-daemon fallback for Flatpak;
  is_daemon_running checks both vietc and vietc-daemon process names
- Native X11 _NET_ACTIVE_WINDOW via dlopen(libX11.so.6) — third fallback in
  get_active_window_id() that works inside Flatpak sandbox (no xdotool/xprop)
- Update README with install/uninstall commands
- Update CHANGELOG
2026-06-29 14:32:30 +07:00
Khoa Vo
1198d65543 docs: update README and CHANGELOG for v0.1.5 release
Some checks are pending
Build & Release / Build & test (push) Waiting to run
Build & Release / Build packages (push) Blocked by required conditions
- README: fix injection diagram (no X11 dependency for Ctrl+V),
  rename Focus Reset -> Window-Switch Reset with accurate blurb,
  mention warning-free Flatpak build
- CHANGELOG: replace old Event Sourcing entries with actual v0.1.5
  changes: window-switch fix, xprop fallback, dead code cleanup,
  flatpak mkdir fix
2026-06-29 14:14:56 +07:00
Khoa Vo
24e4425665 feat: window-switch engine reset, xprop fallback, clean up dead code
Some checks are pending
Build & Release / Build & test (push) Waiting to run
Build & Release / Build packages (push) Blocked by required conditions
- Fix window-switch engine state carryover (Alt+Tab between apps)
- Add xprop -root _NET_ACTIVE_WINDOW fallback for get_active_window_id()
- Update last_key_time only on character key presses (not modifiers)
- Use log_info for change detection (no per-key eprintln)
- Fix Flatpak build: add mkdir -p /app/share/applications
- Remove unused X11 clipboard code (~300 lines of dead unsafe code)
- Remove unused engine methods: is_empty, is_tone_or_mark_key,
  process_string, last_base_char, apply_cluster_mark, apply_mark
- Remove unused RuleEffect enum and special_rules field
- Suppress verbose paste debug logging in uinput_monitor
2026-06-29 14:12:30 +07:00
Khoa Vo
a714dca0be release: v0.1.5 — Event Sourcing, Flatpak build fixes, icons
Some checks are pending
Build & Release / Build & test (push) Waiting to run
Build & Release / Build packages (push) Blocked by required conditions
2026-06-28 21:20:19 +07:00
Khoa Vo
769d84aa80 docs: Flatpak-only install in README, update CHANGELOG
Some checks are pending
Build & Release / Build & test (push) Waiting to run
Build & Release / Build packages (push) Blocked by required conditions
- README: keep only Flatpak install/build instructions, remove everything else
- CHANGELOG: add Flatpak packaging entry to v0.1.4
2026-06-28 08:22:21 +07:00
Khoa Vo
1aa109f5bf docs: update README with safe build instructions
Some checks failed
Build & Release / Build & test (push) Has been cancelled
Build & Release / Build packages (push) Has been cancelled
- Add safety note about cargo builds never touching libc
- Add Quick Start instructions (run without installing)
- Add Full Install step-by-step guide
- Update Flatpak packaging: include tray, add D-Bus session bus permission
- Update build-finish-args: device=all, session-bus socket
2026-06-28 08:11:03 +07:00
Khoa Vo
faf4b3224d fix: restore build-deb.sh accidentally deleted 2026-06-28 07:11:05 +07:00
Khoa Vo
4972612856 feat: add Flatpak packaging support
- Manifest: org.gnome.Platform 47, Rust SDK extension
- Builds daemon, CLI, Uinputd, tray (optional)
- Bundles xclip for clipboard operations
- Compiles vietc-xrecord C helper
- Entry: vietc-wrapper.sh (daemon + tray launcher)
- Permissions: X11, Wayland, input devices, IPC
- Makefile target: 'make flatpak'
2026-06-28 07:10:37 +07:00
Khoa Vo
b097b18199 docs: v0.1.4 — clipboard race fix, CI/CD pipeline, update README
Some checks are pending
Build & Release / Build & test (push) Waiting to run
Build & Release / Build packages (push) Blocked by required conditions
2026-06-27 08:40:23 +07:00
vndangkhoa
fcd7b4e61f
Merge pull request #6 from vndangkhoa/devin/1782522350-clipboard-and-cicd
Debounce the clipboard restore so the user's clipboard is never written
back while a just-pasted Vietnamese word may still be read by the target
app, which caused old clipboard content to appear in the text mid-typing.
Applied to both vietc-uinputd and the in-process UinputInjector.

Add a GitHub Actions workflow that builds the .deb and AppImage on the
runner (artifacts on push/PR, GitHub Release on v* tags), and include
vietc-uinputd + vietc-xrecord in the .deb.

Co-authored-by: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
Co-authored-by: vndangkhoa <vonguyendangkhoa@gmail.com>
2026-06-27 08:18:28 +07:00
Devin AI
4595ce7044 Fix clipboard-into-text race and add CI/CD for .deb + AppImage
Debounce the clipboard restore so the user's clipboard is never written
back while a just-pasted Vietnamese word may still be read by the target
app, which caused old clipboard content to appear in the text mid-typing.
Applied to both vietc-uinputd and the in-process UinputInjector.

Add a GitHub Actions workflow that builds the .deb and AppImage on the
runner (artifacts on push/PR, GitHub Release on v* tags), and include
vietc-uinputd + vietc-xrecord in the .deb.

Co-Authored-By: vndangkhoa <vonguyendangkhoa@gmail.com>
2026-06-27 01:16:48 +00:00
Khoa Vo
a13e0bbd05 release: v0.1.3 — 106 tests, clipboard fix, ua-horn cluster
- Update README version badge to 0.1.3 + test count
- Update CHANGELOG with v0.1.3 release notes
- DEB (976K) + AppImage (2.2M) on GitHub + Forgejo
2026-06-26 19:27:24 +07:00
Khoa Vo
be8943bf52 docs: update CHANGELOG for PR #5 merge — ua-horn, spacing, clipboard 2026-06-26 19:22:39 +07:00
vndangkhoa
01ba0c7dde
Merge pull request #5 from vndangkhoa/devin/1782475848-telex-spacing-clipboard
Co-authored-by: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
Co-authored-by: vndangkhoa <vonguyendangkhoa@gmail.com>
2026-06-26 19:12:17 +07:00
Devin AI
a5bc2add40 Fix TELEX ua-horn, word-spacing/control-key consumption, and clipboard preservation
Co-Authored-By: vndangkhoa <vonguyendangkhoa@gmail.com>
2026-06-26 12:10:48 +00:00
Khoa Vo
e34fbbc620 docs: update CHANGELOG for v0.1.2
- Flush/spacing fixes, auto-restore English words
- Tone placement for qu/gi/gio and uê/uơ clusters
- Skip auto-repeat, Enter key, clipboard fixes
- 102 tests total across all crates
2026-06-26 17:52:47 +07:00
vndangkhoa
575de7a5a5
Merge pull request #4 from vndangkhoa/devin/1782470733-fix-flush-spacing-v2
The auto-restore merge reintroduced the spacing bug: on every flush char
the engine re-emitted a Replace and the daemon backspaced+retyped the
already-on-screen composed word, racing against the separately-forwarded
flush char and eating spaces (mất sự->mấtsự, đầu ngã xuống->đầungãxuống).

Now flush only backspaces+retypes when auto-restore actually changes the
word (English/invalid Vietnamese -> raw keystrokes). For a normal composed
word the engine returns None and the daemon types only the flush char,
leaving the correct word untouched on screen.

Co-authored-by: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
Co-authored-by: vndangkhoa <vonguyendangkhoa@gmail.com>
2026-06-26 17:48:39 +07:00
Devin AI
51949fe02b Fix flush spacing regression while preserving auto-restore
The auto-restore merge reintroduced the spacing bug: on every flush char
the engine re-emitted a Replace and the daemon backspaced+retyped the
already-on-screen composed word, racing against the separately-forwarded
flush char and eating spaces (mất sự->mấtsự, đầu ngã xuống->đầungãxuống).

Now flush only backspaces+retypes when auto-restore actually changes the
word (English/invalid Vietnamese -> raw keystrokes). For a normal composed
word the engine returns None and the daemon types only the flush char,
leaving the correct word untouched on screen.

Co-Authored-By: vndangkhoa <vonguyendangkhoa@gmail.com>
2026-06-26 10:47:43 +00:00
vndangkhoa
4a8d777744
Merge pull request #3 from vndangkhoa/devin/1782470334-fix-flush-spacing
The flush-char handling backspaced and re-typed the already-on-screen
word before/around the forwarded space. In the grabbed-device injection
path this raced against the separately-forwarded space, eating spaces
and merging finished words (e.g. "mất sự" -> "mấtsự",
"đầu ngã xuống" -> "đầungãxuống").

The composed word is already correct on screen, so a non-macro flush
now finalizes state without backspace+retype:
- engine: process_key returns None on flush (macros still Replace)
- daemon replay_and_inject: just types the flush char
- daemon did_flush branch: clears state without retyping

Add regression tests for flush behavior and multi-word spacing.

Co-authored-by: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
Co-authored-by: vndangkhoa <vonguyendangkhoa@gmail.com>
Co-authored-by: vndangkhoa <60398697+vndangkhoa@users.noreply.github.com>
2026-06-26 17:44:18 +07:00
vndangkhoa
19589d279a
Merge branch 'main' into devin/1782470334-fix-flush-spacing 2026-06-26 17:44:02 +07:00
Devin AI
bbd273bdd6 Fix spacing bug: stop retyping finished word on flush char
The flush-char handling backspaced and re-typed the already-on-screen
word before/around the forwarded space. In the grabbed-device injection
path this raced against the separately-forwarded space, eating spaces
and merging finished words (e.g. "mất sự" -> "mấtsự",
"đầu ngã xuống" -> "đầungãxuống").

The composed word is already correct on screen, so a non-macro flush
now finalizes state without backspace+retype:
- engine: process_key returns None on flush (macros still Replace)
- daemon replay_and_inject: just types the flush char
- daemon did_flush branch: clears state without retyping

Add regression tests for flush behavior and multi-word spacing.

Co-Authored-By: vndangkhoa <vonguyendangkhoa@gmail.com>
2026-06-26 10:38:54 +00:00
vndangkhoa
141df163e5
Merge pull request #2 from vndangkhoa/devin/1782469883-auto-restore-english
When Vietnamese mode is on, the engine transformed every word including
English (test->tét, cargo->cảgo, status->státu). This wires up the
previously-dead english.rs dictionary and spelling.rs validator so that on
word commit, words that are clearly English or not phonologically valid
Vietnamese are reverted to the raw keystrokes typed. Genuine Vietnamese
(tiếng, việt, quả) is kept. Gated by the existing [auto_restore] enabled
config (default on).

Co-authored-by: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
Co-authored-by: vndangkhoa <vonguyendangkhoa@gmail.com>
2026-06-26 17:35:19 +07:00
Devin AI
7569e7e218 feat: auto-restore English words and invalid Vietnamese syllables
When Vietnamese mode is on, the engine transformed every word including
English (test->tét, cargo->cảgo, status->státu). This wires up the
previously-dead english.rs dictionary and spelling.rs validator so that on
word commit, words that are clearly English or not phonologically valid
Vietnamese are reverted to the raw keystrokes typed. Genuine Vietnamese
(tiếng, việt, quả) is kept. Gated by the existing [auto_restore] enabled
config (default on).

Co-Authored-By: vndangkhoa <vonguyendangkhoa@gmail.com>
2026-06-26 10:31:37 +00:00
Khoa Vo
0770cc59cc fix: remove clipboard save/restore — leaked content into text
- xclip -o read triggered unwanted paste in some apps
- Clipboard save/restore was over-engineering the Ctrl+C/V fix
- Simple clipboard write+paste is sufficient
2026-06-26 17:18:04 +07:00
vndangkhoa
a4c83e06b9
Merge pull request #1 from vndangkhoa/devin/1782468642-tone-placement
Co-authored-by: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
Co-authored-by: vndangkhoa <vonguyendangkhoa@gmail.com>
2026-06-26 17:13:05 +07:00
Devin AI
6e48d8b2fb fix: correct tone placement for qu/gi onset glides and uê/uơ clusters
Co-Authored-By: vndangkhoa <vonguyendangkhoa@gmail.com>
2026-06-26 10:10:42 +00:00
Khoa Vo
9b8bce4184 fix: save/restore user clipboard around injection
- read_clipboard() saves current content before Vietnamese injection
- Restores after paste so user's Ctrl+C copy isn't overwritten
- Fixes Ctrl+C/V conflict with daemon's clipboard injection
2026-06-26 17:04:47 +07:00