Files
aeoformandClaude Opus 4.7 2912aefed5 feat(linux): replace enigo with fcitx5 plugin for Wayland input
- fcitx5 C++ plugin (scripts/linux-fcitx5-plugin/) with DBus interface:
  CommitText, SetHotkey/SetHotkeyRaw, DictationKeyEvent signal
- linux_fcitx.rs: DBus client to call plugin from Rust
- coordinator/dictation.rs: Wayland insertion via fcitx5 commit_text,
  streaming insert enabled on Wayland
- insertion.rs: fcitx5 commit_text on Linux with clipboard fallback
- unicode_keystroke.rs: Linux path uses fcitx5 commit_text
- Capsule window show-once on Linux to avoid stealing focus

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-16 08:53:06 +08:00

30 lines
759 B
Bash
Executable File

#!/usr/bin/env bash
#
# Build and optionally install the fcitx5 OpenLess plugin.
#
# Usage:
# ./build.sh # build only, .so in build/libopenless.so
# ./build.sh install # build + install to system fcitx5 dirs (requires sudo)
#
set -euo pipefail
cd "$(dirname "$0")"
BUILD_DIR="${BUILD_DIR:-build}"
echo "==> Configuring..."
cmake -S . -B "$BUILD_DIR" -DCMAKE_BUILD_TYPE=Release
echo "==> Building..."
cmake --build "$BUILD_DIR" --parallel
echo "==> Plugin built: ${BUILD_DIR}/libopenless.so"
if [ "${1:-}" = "install" ]; then
echo "==> Installing (requires sudo)..."
sudo cmake --install "$BUILD_DIR"
echo "==> Done. Restart fcitx5 to pick up the new plugin."
else
echo "==> Use '$0 install' to install system-wide."
fi