diff --git a/.github/workflows/packaging-dev.yml b/.github/workflows/packaging-dev.yml new file mode 100644 index 0000000..d302f0e --- /dev/null +++ b/.github/workflows/packaging-dev.yml @@ -0,0 +1,164 @@ +name: Test Packaging Build + +on: + push: + branches: + - dev + pull_request: + branches: + - dev + +jobs: + build-deb: + name: DEB [${{ matrix.codename }}] + strategy: + fail-fast: false + matrix: + include: + - distro: debian:12 + codename: bookworm + parallel: 2 + - distro: debian:13 + codename: trixie + parallel: 4 + - distro: debian:testing + codename: testing + parallel: 4 + - distro: debian:unstable + codename: sid + parallel: 4 + - distro: ubuntu:22.04 + codename: jammy + parallel: 1 + - distro: ubuntu:24.04 + codename: noble + parallel: 2 + - distro: ubuntu:25.04 + codename: plucky + parallel: 4 + - distro: ubuntu:25.10 + codename: questing + parallel: 4 + + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v4 + with: + submodules: recursive + + - name: Prepare debian directory + run: cp -r packaging/debian debian + + - name: Build DEB + uses: jtdor/build-deb-action@v1 + env: + DEB_BUILD_OPTIONS: parallel=${{ matrix.parallel }} + with: + docker-image: ${{ matrix.distro }} + buildpackage-opts: --build=binary --no-sign + + - name: Upload DEB artifact + uses: actions/upload-artifact@v4 + with: + name: deb-${{ matrix.codename }} + path: debian/artifacts/*.deb + retention-days: 3 + + build-rpm-fedora: + name: RPM [fedora-${{ matrix.releasever }}] + strategy: + fail-fast: false + matrix: + include: + - distro: fedora:42 + releasever: 42 + - distro: fedora:43 + releasever: 43 + - distro: fedora:rawhide + releasever: rawhide + + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v4 + with: + submodules: recursive + + - name: Build Fedora RPM + uses: addnab/docker-run-action@v3 + with: + image: ${{ matrix.distro }} + options: -v ${{ github.workspace }}:/work + run: | + dnf install -y \ + rpm-build rpmdevtools cmake extra-cmake-modules \ + gcc-c++ glibc-devel fcitx5-devel libinput-devel \ + systemd-rpm-macros libudev-devel libX11-devel \ + golang libgudev-devel gettext-devel + rpmdev-setuptree + cp /work/packaging/rpm/fedora/fcitx5-lotus.spec ~/rpmbuild/SPECS/ + mkdir -p ~/rpmbuild/SOURCES + cd /work + VERSION=$(grep '^Version:' packaging/rpm/fedora/fcitx5-lotus.spec | awk '{print $2}') + tar --exclude='.git' \ + --exclude='packaging' \ + --transform "s|^\.|fcitx5-lotus-${VERSION}|" \ + -czf ~/rpmbuild/SOURCES/fcitx5-lotus-${VERSION}.tar.gz . + rpmbuild -bb ~/rpmbuild/SPECS/fcitx5-lotus.spec + mkdir -p /work/output + find ~/rpmbuild/RPMS -name '*.rpm' -exec cp {} /work/output/ \; + + - name: Upload RPM artifact + uses: actions/upload-artifact@v4 + with: + name: rpm-fedora-${{ matrix.releasever }} + path: output/*.rpm + retention-days: 3 + + build-rpm-opensuse: + name: RPM [opensuse-${{ matrix.releasever }}] + strategy: + fail-fast: false + matrix: + include: + - distro: opensuse/tumbleweed + releasever: tumbleweed + + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v4 + with: + submodules: recursive + + - name: Build openSUSE RPM + uses: addnab/docker-run-action@v3 + with: + image: ${{ matrix.distro }} + options: -v ${{ github.workspace }}:/work + run: | + zypper install -y \ + rpm-build rpmdevtools cmake extra-cmake-modules \ + gcc-c++ glibc-devel fcitx5-devel libinput-devel \ + systemd-rpm-macros libudev-devel libX11-devel \ + go libgudev-1_0-devel sysuser-tools + rpmdev-setuptree + cp /work/packaging/rpm/opensuse/fcitx5-lotus.spec ~/rpmbuild/SPECS/ + mkdir -p ~/rpmbuild/SOURCES + cd /work + VERSION=$(grep '^Version:' packaging/rpm/opensuse/fcitx5-lotus.spec | awk '{print $2}') + tar --exclude='.git' \ + --exclude='packaging' \ + --transform "s|^\.|fcitx5-lotus-${VERSION}|" \ + -czf ~/rpmbuild/SOURCES/fcitx5-lotus-${VERSION}.tar.gz . + rpmbuild -bb ~/rpmbuild/SPECS/fcitx5-lotus.spec + mkdir -p /work/output + find ~/rpmbuild/RPMS -name '*.rpm' -exec cp {} /work/output/ \; + + - name: Upload RPM artifact + uses: actions/upload-artifact@v4 + with: + name: rpm-opensuse-${{ matrix.releasever }} + path: output/*.rpm + retention-days: 3 diff --git a/.github/workflows/packaging-release.yml b/.github/workflows/packaging-release.yml new file mode 100644 index 0000000..b64f50f --- /dev/null +++ b/.github/workflows/packaging-release.yml @@ -0,0 +1,216 @@ +name: Build & Release + +on: + push: + tags: + - 'v*' + +jobs: + build-deb: + name: DEB [${{ matrix.codename }}] + strategy: + fail-fast: false + matrix: + include: + - distro: debian:12 + codename: bookworm + parallel: 2 + - distro: debian:13 + codename: trixie + parallel: 4 + - distro: debian:testing + codename: testing + parallel: 4 + - distro: debian:unstable + codename: sid + parallel: 4 + - distro: ubuntu:22.04 + codename: jammy + parallel: 1 + - distro: ubuntu:24.04 + codename: noble + parallel: 2 + - distro: ubuntu:25.04 + codename: plucky + parallel: 4 + - distro: ubuntu:25.10 + codename: questing + parallel: 4 + + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v4 + with: + submodules: recursive + + - name: Prepare debian directory + run: cp -r packaging/debian debian + + - name: Build DEB + uses: jtdor/build-deb-action@v1 + env: + DEB_BUILD_OPTIONS: parallel=${{ matrix.parallel }} + with: + docker-image: ${{ matrix.distro }} + buildpackage-opts: --build=binary --no-sign + + - name: Upload DEB artifact + uses: actions/upload-artifact@v4 + with: + name: deb-${{ matrix.codename }} + path: debian/artifacts/*.deb + retention-days: 1 + + build-rpm-fedora: + name: RPM [fedora-${{ matrix.releasever }}] + strategy: + fail-fast: false + matrix: + include: + - distro: fedora:42 + releasever: 42 + - distro: fedora:43 + releasever: 43 + - distro: fedora:rawhide + releasever: rawhide + + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v4 + with: + submodules: recursive + + - name: Build Fedora RPM + uses: addnab/docker-run-action@v3 + with: + image: ${{ matrix.distro }} + options: -v ${{ github.workspace }}:/work + run: | + dnf install -y \ + rpm-build rpmdevtools cmake extra-cmake-modules \ + gcc-c++ glibc-devel fcitx5-devel libinput-devel \ + systemd-rpm-macros libudev-devel libX11-devel \ + golang libgudev-devel gettext-devel + rpmdev-setuptree + cp /work/packaging/rpm/fedora/fcitx5-lotus.spec ~/rpmbuild/SPECS/ + mkdir -p ~/rpmbuild/SOURCES + cd /work + VERSION=$(grep '^Version:' packaging/rpm/fedora/fcitx5-lotus.spec | awk '{print $2}') + tar --exclude='.git' \ + --exclude='packaging' \ + --transform "s|^\.|fcitx5-lotus-${VERSION}|" \ + -czf ~/rpmbuild/SOURCES/fcitx5-lotus-${VERSION}.tar.gz . + rpmbuild -bb ~/rpmbuild/SPECS/fcitx5-lotus.spec + mkdir -p /work/output + find ~/rpmbuild/RPMS -name '*.rpm' -exec cp {} /work/output/ \; + + - name: Write GPG key to file + run: | + echo "${{ secrets.GPG_PRIVATE_KEY }}" > /tmp/gpg.key + + - name: Sign RPM + uses: signalwire/sign-rpm-packages-action@v1.0.0 + with: + gpg_name: 'Nguyen Hoang Ky' + gpg_file: /tmp/gpg.key + rpm_path: output/ + target_path: output/ + + - name: Remove GPG key file + if: always() + run: rm -f /tmp/gpg.key + + - name: Upload RPM artifact + uses: actions/upload-artifact@v4 + with: + name: rpm-fedora-${{ matrix.releasever }} + path: output/*.rpm + retention-days: 1 + + build-rpm-opensuse: + name: RPM [opensuse-${{ matrix.releasever }}] + strategy: + fail-fast: false + matrix: + include: + - distro: opensuse/tumbleweed + releasever: tumbleweed + + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v4 + with: + submodules: recursive + + - name: Build openSUSE RPM + uses: addnab/docker-run-action@v3 + with: + image: ${{ matrix.distro }} + options: -v ${{ github.workspace }}:/work + run: | + zypper install -y \ + rpm-build rpmdevtools cmake extra-cmake-modules \ + gcc-c++ glibc-devel fcitx5-devel libinput-devel \ + systemd-rpm-macros libudev-devel libX11-devel \ + go libgudev-1_0-devel sysuser-tools + rpmdev-setuptree + cp /work/packaging/rpm/opensuse/fcitx5-lotus.spec ~/rpmbuild/SPECS/ + mkdir -p ~/rpmbuild/SOURCES + cd /work + VERSION=$(grep '^Version:' packaging/rpm/opensuse/fcitx5-lotus.spec | awk '{print $2}') + tar --exclude='.git' \ + --exclude='packaging' \ + --transform "s|^\.|fcitx5-lotus-${VERSION}|" \ + -czf ~/rpmbuild/SOURCES/fcitx5-lotus-${VERSION}.tar.gz . + rpmbuild -bb ~/rpmbuild/SPECS/fcitx5-lotus.spec + mkdir -p /work/output + find ~/rpmbuild/RPMS -name '*.rpm' -exec cp {} /work/output/ \; + + - name: Write GPG key to file + run: | + echo "${{ secrets.GPG_PRIVATE_KEY }}" > /tmp/gpg.key + + - name: Sign RPM + uses: signalwire/sign-rpm-packages-action@v1.0.0 + with: + gpg_name: 'Nguyen Hoang Ky' + gpg_file: /tmp/gpg.key + rpm_path: output/ + target_path: output/ + + - name: Remove GPG key file + if: always() + run: rm -f /tmp/gpg.key + + - name: Upload RPM artifact + uses: actions/upload-artifact@v4 + with: + name: rpm-opensuse-${{ matrix.releasever }} + path: output/*.rpm + retention-days: 1 + + release: + name: Create GitHub Release + needs: [build-deb, build-rpm-fedora, build-rpm-opensuse] + runs-on: ubuntu-latest + + steps: + - name: Download all artifacts + uses: actions/download-artifact@v4 + with: + path: artifacts/ + + - name: Upload to GitHub Releases + uses: softprops/action-gh-release@v2 + with: + files: | + artifacts/**/*.deb + artifacts/**/*.rpm + generate_release_notes: true + draft: true + prerelease: false + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/.github/workflows/ubuntu-dev-build.yml b/.github/workflows/ubuntu-dev-build.yml deleted file mode 100644 index 1a13a17..0000000 --- a/.github/workflows/ubuntu-dev-build.yml +++ /dev/null @@ -1,64 +0,0 @@ -name: Build fcitx5-lotus (Dev Branch) - -on: - push: - branches: - - dev - workflow_dispatch: - inputs: - reason: - description: 'Thích thì build thôi' - required: false - default: 'Manual build' - -jobs: - build: - name: Build on Ubuntu 22.04 (Dev) - runs-on: ubuntu-22.04 - permissions: - contents: read - - steps: - - name: Checkout code - uses: actions/checkout@v4 - with: - submodules: recursive - - - name: Install dependencies - run: | - sudo apt-get update - sudo apt-get install -y \ - build-essential \ - cmake \ - extra-cmake-modules \ - libfcitx5core-dev \ - libfcitx5config-dev \ - libfcitx5utils-dev \ - libinput-dev \ - libudev-dev \ - g++ \ - golang \ - hicolor-icon-theme \ - pkg-config \ - gettext \ - libx11-dev - - - name: Create tarball structure - run: | - mkdir -p dist - export LDFLAGS="-Wl,-z,relro -Wl,-z,now $LDFLAGS" - cmake -DCMAKE_INSTALL_PREFIX=/usr -DCMAKE_INSTALL_LIBDIR=/usr/lib . - make -j$(nproc) - make install DESTDIR=$(pwd)/dist - ls -R dist/ - - - name: Compress Artifact - run: | - tar -czf fcitx5-lotus-dev-${{ github.run_id }}.tar.gz -C dist . - - - name: Upload Artifact - uses: actions/upload-artifact@v4 - with: - name: lotus-dev-package - path: fcitx5-lotus-dev-${{ github.run_id }}.tar.gz - retention-days: 7 diff --git a/.github/workflows/ubuntu-release-build.yml b/.github/workflows/ubuntu-release-build.yml deleted file mode 100644 index e21b944..0000000 --- a/.github/workflows/ubuntu-release-build.yml +++ /dev/null @@ -1,70 +0,0 @@ -name: Build fcitx5-lotus - -on: - push: - tags: - - 'v*' - workflow_dispatch: - inputs: - reason: - description: 'Thích thì build thôi' - required: false - default: 'Manual build' - -jobs: - build: - name: Build on Ubuntu 22.04 - runs-on: ubuntu-22.04 - permissions: - contents: write - - steps: - - name: Checkout code - uses: actions/checkout@v4 - with: - submodules: recursive - - - name: Install dependencies - run: | - sudo apt-get update - sudo apt-get install -y \ - build-essential \ - cmake \ - extra-cmake-modules \ - libfcitx5core-dev \ - libfcitx5config-dev \ - libfcitx5utils-dev \ - libinput-dev \ - libudev-dev \ - g++ \ - golang \ - hicolor-icon-theme \ - pkg-config \ - gettext \ - libx11-dev - - - name: Create tarball structure - run: | - mkdir -p dist - export LDFLAGS="-Wl,-z,relro -Wl,-z,now $LDFLAGS" - cmake -DCMAKE_INSTALL_PREFIX=/usr -DCMAKE_INSTALL_LIBDIR=/usr/lib . - make -j$(nproc) - make install DESTDIR=$(pwd)/dist - - ls -R dist/ - - - name: Compress Artifact - run: | - tar -czf fcitx5-lotus-${{ github.ref_name }}.tar.gz -C dist . - - - name: Create Release - if: startsWith(github.ref, 'refs/tags/') - uses: softprops/action-gh-release@v2 - with: - files: fcitx5-lotus-${{ github.ref_name }}.tar.gz - name: Release ${{ github.ref_name }} - tag_name: ${{ github.ref }} - draft: true - prerelease: false - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/README.en.md b/README.en.md index 5eff06d..ec7c0ea 100644 --- a/README.en.md +++ b/README.en.md @@ -294,6 +294,7 @@ After installation, you need to follow these steps to enable the fcitx5-lotus in The server helps the input method interact better with the system (especially sending backspace and fixing errors). - **Bash / Zsh:** + ```bash # Enable and start the service (automatically fixes missing systemd user errors if any) sudo systemctl enable --now fcitx5-lotus-server@$(whoami).service || \ @@ -301,6 +302,7 @@ sudo systemctl enable --now fcitx5-lotus-server@$(whoami).service || \ ``` - **Fish shell:** + ```fish # Enable and start the service (automatically fixes missing systemd user errors if any) sudo systemctl enable --now fcitx5-lotus-server@(whoami).service; or begin @@ -308,7 +310,6 @@ sudo systemctl enable --now fcitx5-lotus-server@(whoami).service; or begin end ``` - ```bash # Check status (if you see green active (running), it's OK) systemctl status fcitx5-lotus-server@$(whoami).service @@ -319,6 +320,7 @@ systemctl status fcitx5-lotus-server@$(whoami).service The input method will not work without these variables. - **Bash / Zsh:** + ```bash # This command will add the configuration to ~/.bash_profile, do the same for .zprofile cat <> ~/.bash_profile @@ -331,6 +333,7 @@ EOF ``` - **Fish shell:** + ```fish # Add configuration to ~/.config/fish/config.fish cat >> ~/.config/fish/config.fish <<'EOF' @@ -344,7 +347,6 @@ set -gx GLFW_IM_MODULE ibus EOF ``` - Log out and log in to apply changes.
@@ -551,7 +553,11 @@ The project is distributed under the GNU General Public License v3. See [`LICENS ## ✨ Star History - Star History Chart + + + + Star History Chart + --- diff --git a/README.md b/README.md index 35e290a..1f70309 100644 --- a/README.md +++ b/README.md @@ -45,84 +45,84 @@ Dự án này là bản fork được tối ưu hóa từ [bộ gõ VMK](https://github.com/thanhpy2009/VMK). Chân thành cảm ơn tác giả Thành đã đặt nền móng cho bộ gõ này. > **Lưu ý:** Gỡ và xoá cấu hình `fcitx5-vmk` trước khi cài đặt `fcitx5-lotus` để tránh phát sinh lỗi. -> +> >
> Gỡ và xoá cấu hình fcitx5-vmk -> +> >
> Arch / Arch-based - AUR >
-> +> > Bạn có thể dùng `pacman` (khuyên dùng), `yay` hoặc `paru` để gỡ cài đặt: -> +> > ```bash > sudo pacman -Rns fcitx5-vmk > ``` -> +> > ```bash > yay -Rns fcitx5-vmk > ``` -> +> > ```bash > paru -Rns fcitx5-vmk > ``` -> +> > > **Lưu ý:** Các file config ở `$HOME` sẽ được giữ lại. -> +> >
-> +> >
> Debian / Ubuntu / Fedora / openSUSE - Open Build Service >
-> +> > - Debian/Ubuntu -> +> > ```bash > sudo apt remove fcitx5-vmk > ``` -> +> > - Fedora -> +> > ```bash > sudo dnf remove fcitx5-vmk > ``` -> +> > - openSUSE -> +> > ```bash > sudo zypper remove fcitx5-vmk > ``` -> +> >
-> +> >
> NixOS >
-> +> > Xóa (hoặc comment) dòng `services.fcitx5-vmk` và `inputs` trong file config, sau đó rebuild lại system. NixOS sẽ tự dọn dẹp. -> +> >
-> +> >
> Biên dịch từ nguồn >
-> +> > Vào lại thư mục source code đã build và chạy: -> +> > ```bash > sudo make uninstall > ``` -> +> >
-> +> > --- -> +> > Xóa cấu hình `vmk` không tương thích: -> +> > ```bash > rm ~/.config/fcitx5/conf/vmk-*.conf > ``` -> +> >
@@ -236,9 +236,9 @@ Rebuild lại system để cài đặt.
> **KHUYẾN CÁO QUAN TRỌNG:** -> +> > Vui lòng **KHÔNG** sử dụng cách này nếu distro của bạn đã được hỗ trợ thông qua **Open Build Service**. -> +> > Việc biên dịch thủ công đòi hỏi bạn phải hiểu rõ về cấu trúc thư mục của hệ thống. Nếu bạn gặp lỗi "Not Available" hoặc thiếu thư viện khi cài theo cách này trên các distro phổ biến (Ubuntu/Fedora...), hãy quay lại dùng Open Build Service để đảm bảo tính ổn định và tự động cập nhật. ##### Yêu cầu hệ thống @@ -294,6 +294,7 @@ Sau khi cài đặt xong, bạn cần thực hiện các bước sau để bật Server giúp bộ gõ tương tác với hệ thống tốt hơn (đặc biệt là gửi phím xóa và sửa lỗi). - **Bash / Zsh:** + ```bash # Bật và khởi động service (tự động fix lỗi thiếu user systemd nếu có) sudo systemctl enable --now fcitx5-lotus-server@$(whoami).service || \ @@ -301,6 +302,7 @@ sudo systemctl enable --now fcitx5-lotus-server@$(whoami).service || \ ``` - **Fish shell:** + ```fish # Bật và khởi động service (tự động fix lỗi thiếu user systemd nếu có) sudo systemctl enable --now fcitx5-lotus-server@(whoami).service; or begin @@ -318,6 +320,7 @@ systemctl status fcitx5-lotus-server@$(whoami).service Bộ gõ sẽ không hoạt động nếu thiếu các biến này. - **Bash / Zsh:** + ```bash # Thêm cấu hình vào ~/.bash_profile (với .zprofile làm tương tự) cat <> ~/.bash_profile @@ -330,6 +333,7 @@ EOF ``` - **Fish shell:** + ```fish # Thêm cấu hình vào ~/.config/fish/config.fish cat >> ~/.config/fish/config.fish <<'EOF' @@ -378,7 +382,7 @@ killall ibus-daemon || ibus exit Thêm Fcitx5 vào Autostart cho từng DE / WM (GNOME, Hyprland ...) | DE / WM | Hướng dẫn chi tiết | -|:-------------- |:---------------------------------------------------------------------------------------------------------------------------- | +| :------------- | :--------------------------------------------------------------------------------------------------------------------------- | | **GNOME** | _GNOME Tweaks_ → _Startup Applications_ → Add → `Fcitx 5` | | **KDE Plasma** | _System Settings_ → _Autostart_ → Add... → Add Application... → `Fcitx 5` | | **Xfce** | _Settings_ → _Session and Startup_ → _Application Autostart_ → Add → `Fcitx 5` | @@ -403,16 +407,17 @@ Sau khi đã log out và log in lại: 2. Tìm **Lotus** ở cột bên phải. 3. Nhấn mũi tên **<** để thêm nó sang cột bên trái. 4. Apply. - +
Cấu hình thêm cho Wayland (KDE, Hyprland) + - **KDE Plasma:** _System Settings_ → _Keyboard_ → _Virtual Keyboard_ → Chọn **Fcitx 5**. - **Hyprland:** Thêm dòng sau vào `~/.config/hypr/hyprland.conf`: - + ```ini permission = fcitx5-lotus-server, keyboard, allow ``` - +
--- @@ -426,7 +431,7 @@ Sau khi đã log out và log in lại: - **Cách truy cập:** Nhấp chuột phải vào biểu tượng Lotus trên system tray để mở tuỳ chỉnh. | Tùy chọn | Mô tả | Mặc định | -|:----------------------- |:----------------------------------------------------------------------------------------------------------------- |:--------------- | +| :---------------------- | :---------------------------------------------------------------------------------------------------------------- | :-------------- | | **Typing Mode** | Chọn chế độ gõ. | Uinput (Smooth) | | **Input Method** | Chọn kiểu gõ. | Telex | | **Charset** | Chọn bảng mã. | Unicode | @@ -434,7 +439,7 @@ Sau khi đã log out và log in lại: | **Macro** | Bật/tắt gõ tắt. | Bật | | **Capitalize Macro** | Bật/tắt gõ tắt chữ hoa. | Bật | | **Auto non-VN restore** | Bât/tắt tự động khôi phục với từ không phải tiếng Việt. | Bật | -| **Modern Style** | Bật/tắt kiểu đặt dấu thanh hiện đại *(ví dụ: oà, _uý thay vì òa, _úy)*. | Bật | +| **Modern Style** | Bật/tắt kiểu đặt dấu thanh hiện đại _(ví dụ: oà, *uý thay vì òa, *úy)_. | Bật | | **Free Marking** | Bật/tắt bỏ dấu tự do. | Bật | | **Fix Uinput with ack** | Bật/tắt sửa lỗi chế độ `uinput` với ack
Nên bật khi sử dụng các ứng dụng Chromium (Chrome, Brave, Edge, ...). | Tắt | @@ -443,16 +448,16 @@ Sau khi đã log out và log in lại: Khi đang ở trong bất kỳ ứng dụng nào, nhấn phím **`** để mở menu chọn chế độ gõ, có thể dùng chuột hoặc phím tắt để chọn. | Chế độ | Phím tắt | Mô tả | -|:--------------------- |:--------:|:------------------------------------------------------------------------------------------------------------------------------------ | -| **Uinput (Smooth)** | **1** | Chế độ mặc định, phản hồi nhanh.
**Tối ưu:** ứng dụng có tốc độ xử lý input cao. | -| **Uinput (Slow)** | **2** | Tương tự Uinput (Smooth) nhưng tốc độ gửi phím chậm hơn.
**Tối ưu:** ứng dụng có tốc độ xử lý input thấp _(ví dụ: Libre Office)_. | -| **Uinput (Hardcore)** | **3** | Biến thể của Uinput (Smooth).
**Tối ưu:** ứng dụng Windows qua Wine. | -| **Surrounding Text** | **4** | Cho phép sửa dấu trên văn bản đã gõ, hoạt động mượt.
**Tối ưu:** ứng dụng Qt/GTK. | -| **Preedit** | **Q** | Hiển thị gạch chân khi gõ.
**Tối ưu:** hầu hết ứng dụng. | -| **Emoji Picker** | **W** | Tìm kiếm và nhập Emoji (nguồn EmojiOne, hỗ trợ fuzzy search). | -| **OFF** | **E** | Tắt bộ gõ. | -| **Default Typing** | **R** | Chế độ gõ mặc định được cấu hình tại tuỳ chọn _Typing mode_. | -| **Type `** | **`** | Nhập ký tự **`**. | +| :-------------------- | :------: | :----------------------------------------------------------------------------------------------------------------------------------- | +| **Uinput (Smooth)** | **1** | Chế độ mặc định, phản hồi nhanh.
**Tối ưu:** ứng dụng có tốc độ xử lý input cao. | +| **Uinput (Slow)** | **2** | Tương tự Uinput (Smooth) nhưng tốc độ gửi phím chậm hơn.
**Tối ưu:** ứng dụng có tốc độ xử lý input thấp _(ví dụ: Libre Office)_. | +| **Uinput (Hardcore)** | **3** | Biến thể của Uinput (Smooth).
**Tối ưu:** ứng dụng Windows qua Wine. | +| **Surrounding Text** | **4** | Cho phép sửa dấu trên văn bản đã gõ, hoạt động mượt.
**Tối ưu:** ứng dụng Qt/GTK. | +| **Preedit** | **Q** | Hiển thị gạch chân khi gõ.
**Tối ưu:** hầu hết ứng dụng. | +| **Emoji Picker** | **W** | Tìm kiếm và nhập Emoji (nguồn EmojiOne, hỗ trợ fuzzy search). | +| **OFF** | **E** | Tắt bộ gõ. | +| **Default Typing** | **R** | Chế độ gõ mặc định được cấu hình tại tuỳ chọn _Typing mode_. | +| **Type `** | **`** | Nhập ký tự **`**. | Bộ gõ sẽ tự động lưu chế độ gõ đã dùng gần nhất cho từng ứng dụng và khôi phục cấu hình đó khi bạn mở lại chúng. @@ -563,7 +568,11 @@ Dự án được phân phối dưới giấy phép GNU General Public License v ## ✨ Lịch sử sao - Star History Chart + + + + Star History Chart + --- diff --git a/data/icons/scalable/apps/fcitx-lotus-emoji.svg b/data/icons/scalable/apps/fcitx-lotus-emoji.svg index 4848ff3..c505995 100644 --- a/data/icons/scalable/apps/fcitx-lotus-emoji.svg +++ b/data/icons/scalable/apps/fcitx-lotus-emoji.svg @@ -1,10 +1,17 @@ - - - - - + + + + + + + + + + + + \ No newline at end of file diff --git a/data/icons/scalable/apps/fcitx-lotus-off.svg b/data/icons/scalable/apps/fcitx-lotus-off.svg index ca3397c..8004b14 100644 --- a/data/icons/scalable/apps/fcitx-lotus-off.svg +++ b/data/icons/scalable/apps/fcitx-lotus-off.svg @@ -1,6 +1,31 @@ - - - + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/data/icons/scalable/apps/fcitx-lotus.svg b/data/icons/scalable/apps/fcitx-lotus.svg index 32fac55..03c1659 100644 --- a/data/icons/scalable/apps/fcitx-lotus.svg +++ b/data/icons/scalable/apps/fcitx-lotus.svg @@ -1,6 +1,6 @@ - + = 22 && strcmp(exe_path + strlen(exe_path) - 22, "/bin/fcitx5-lotus-server") == 0)' substituteInPlace server/lotus-server.cpp \ diff --git a/packaging/debian/changelog b/packaging/debian/changelog new file mode 100644 index 0000000..57bad7f --- /dev/null +++ b/packaging/debian/changelog @@ -0,0 +1,5 @@ +fcitx5-lotus (1.0.0-0) unstable; urgency=medium + + * First stable release + + -- Nguyen Hoang Ky Sun, 19 Feb 2026 19:35:00 +0700 \ No newline at end of file diff --git a/packaging/debian/compat b/packaging/debian/compat new file mode 100644 index 0000000..ca7bf83 --- /dev/null +++ b/packaging/debian/compat @@ -0,0 +1 @@ +13 \ No newline at end of file diff --git a/packaging/debian/control b/packaging/debian/control new file mode 100644 index 0000000..7ca20a5 --- /dev/null +++ b/packaging/debian/control @@ -0,0 +1,22 @@ +Source: fcitx5-lotus +Section: utils +Priority: optional +Maintainer: Nguyen Hoang Ky +Build-Depends: debhelper (>= 13), + cmake, + g++, + golang, + extra-cmake-modules, + libfcitx5core-dev, + libfcitx5config-dev, + libfcitx5utils-dev, + libinput-dev, + libudev-dev, + pkg-config, + libx11-dev +Standards-Version: 4.6.0 + +Package: fcitx5-lotus +Architecture: any +Depends: fcitx5, udev, hicolor-icon-theme, ${misc:Depends}, ${shlibs:Depends} +Description: Vietnamese input method for fcitx5 diff --git a/packaging/debian/postinst b/packaging/debian/postinst new file mode 100644 index 0000000..1a26b9c --- /dev/null +++ b/packaging/debian/postinst @@ -0,0 +1,34 @@ +#!/bin/sh +set -e + +blue='\033[1;34m' +green='\033[1;32m' +bold='\033[1;1m' +all_off='\033[0m' + +if [ "$1" = "configure" ]; then + modprobe uinput || true + + # Reload udev + if command -v udevadm >/dev/null; then + udevadm control --reload-rules || true + udevadm trigger || true + fi + systemd-sysusers || true + + echo -e "${blue}--- Cấu hình Lotus ---${all_off}" + echo -e "${bold}Hướng dẫn sau cài đặt:${all_off}" + echo -e "1. Kích hoạt Server cho user của bạn:" + echo -e " ${blue}sudo systemctl enable --now fcitx5-lotus-server@\$(whoami).service${all_off}" + echo "" + echo -e "2. Cấu hình Fcitx5:" + echo -e " - Mở 'Fcitx5 Configuration', thêm bộ gõ ${green}Lotus${all_off}." + echo "" + echo -e "3. Lưu ý cho Wayland (KDE):" + echo -e " - Hãy chọn 'Fcitx 5' trong phần Virtual Keyboard của hệ thống." + echo "------------------------------------------------" +fi + +#DEBHELPER# + +exit 0 diff --git a/packaging/debian/rules b/packaging/debian/rules new file mode 100644 index 0000000..8630292 --- /dev/null +++ b/packaging/debian/rules @@ -0,0 +1,8 @@ +#!/usr/bin/make -f + +export DEB_BUILD_MAINT_OPTIONS = hardening=+all optimize=-lto +export DEB_CFLAGS_MAINT_STRIP = -g +export DEB_CXXFLAGS_MAINT_STRIP = -g + +%: + dh $@ \ No newline at end of file diff --git a/packaging/debian/source/format b/packaging/debian/source/format new file mode 100644 index 0000000..89ae9db --- /dev/null +++ b/packaging/debian/source/format @@ -0,0 +1 @@ +3.0 (native) diff --git a/packaging/rpm/fedora/fcitx5-lotus.spec b/packaging/rpm/fedora/fcitx5-lotus.spec new file mode 100644 index 0000000..75106aa --- /dev/null +++ b/packaging/rpm/fedora/fcitx5-lotus.spec @@ -0,0 +1,110 @@ +%global _lto_cflags %nil +%global optflags %(echo "%{optflags}" | sed 's/-g[^ ]*//g') + +Name: fcitx5-lotus +Version: 1.0.0 +Release: 1 +Summary: Vietnamese input method for fcitx5 +License: GPL-3.0-or-later +URL: https://github.com/LotusInputMethod/fcitx5-lotus +Source0: %{name}-%{version}.tar.gz + +BuildRequires: cmake +BuildRequires: extra-cmake-modules +BuildRequires: gcc-c++ +BuildRequires: glibc-devel +BuildRequires: fcitx5-devel +BuildRequires: libinput-devel +BuildRequires: systemd-rpm-macros +BuildRequires: pkgconfig(libudev) +BuildRequires: libX11-devel + +BuildRequires: golang +BuildRequires: libgudev-devel + +%{?systemd_requires} + +Requires: fcitx5 +Requires: libinput +Requires: hicolor-icon-theme + +%description +Vietnamese input method for fcitx5 + +%prep +%setup -q + +%build +%cmake +%cmake_build + +%install +%cmake_install +%find_lang %{name} + +%files -f %{name}.lang +%defattr(-,root,root,-) +%dir %{_datadir}/licenses/%{name} +%license %{_datadir}/licenses/%{name}/GPL-3.0-or-later.txt +%license %{_datadir}/licenses/%{name}/LGPL-2.1-or-later.txt +%{_bindir}/fcitx5-lotus-server + +%dir %{_libdir}/fcitx5 +%{_libdir}/fcitx5/liblotus.so + +%{_prefix}/lib/modules-load.d/fcitx5-lotus.conf +%{_unitdir}/fcitx5-lotus-server@.service +%{_prefix}/lib/sysusers.d/lotus.conf +%{_prefix}/lib/udev/rules.d/99-lotus.rules + +%{_datadir}/fcitx5/addon/lotus.conf +%{_datadir}/fcitx5/inputmethod/lotus.conf + +%dir %{_datadir}/fcitx5/lotus +%{_datadir}/fcitx5/lotus/vietnamese.cm.dict + +%{_datadir}/icons/hicolor/scalable/apps/fcitx-lotus.svg +%{_datadir}/icons/hicolor/scalable/apps/org.fcitx.Fcitx5.fcitx-lotus.svg +%{_datadir}/icons/hicolor/scalable/apps/fcitx-lotus-off.svg +%{_datadir}/icons/hicolor/scalable/apps/org.fcitx.Fcitx5.fcitx-lotus-off.svg +%{_datadir}/icons/hicolor/scalable/apps/fcitx-lotus-emoji.svg +%{_datadir}/icons/hicolor/scalable/apps/org.fcitx.Fcitx5.fcitx-lotus-emoji.svg +%{_datadir}/metainfo/org.fcitx.Fcitx5.Addon.Lotus.metainfo.xml + +%clean +rm -rf %{buildroot} +rm -rf %{_builddir}/%{name}-%{version} + +%pre + +%post +%systemd_post fcitx5-lotus-server@.service +if [ $1 -ge 1 ]; then + if [ -x /usr/bin/udevadm ]; then + /usr/sbin/modprobe uinput >/dev/null 2>&1 || : + /usr/bin/udevadm control --reload-rules >/dev/null 2>&1 || : + /usr/bin/udevadm trigger >/dev/null 2>&1 || : + fi +fi + +echo "--- Cấu hình Lotus ---" +echo "Hướng dẫn sau cài đặt:" +echo "1. Kích hoạt Server cho user của bạn:" +echo " sudo systemctl enable --now fcitx5-lotus-server@\$(whoami).service" +echo "" +echo "2. Cấu hình Fcitx5:" +echo " - Mở 'Fcitx5 Configuration', thêm bộ gõ Lotus" +echo "" +echo "3. Lưu ý cho Wayland (KDE):" +echo " - Hãy chọn 'Fcitx 5' trong phần Virtual Keyboard của hệ thống." +echo "------------------------------------------------" + +%preun +%systemd_preun fcitx5-lotus-server@.service + +%postun +%systemd_postun_with_restart fcitx5-lotus-server@.service + +%changelog +* Thu Feb 19 2026 Nguyen Hoang Ky - 1.0.0-1 +- First stable release \ No newline at end of file diff --git a/packaging/rpm/opensuse/fcitx5-lotus.spec b/packaging/rpm/opensuse/fcitx5-lotus.spec new file mode 100644 index 0000000..c17cd9f --- /dev/null +++ b/packaging/rpm/opensuse/fcitx5-lotus.spec @@ -0,0 +1,115 @@ +%define _lto_cflags %{nil} + +%global optflags %(echo "%{optflags}" | sed 's/-g[^ ]*//g') + +Name: fcitx5-lotus +Version: 1.0.0 +Release: 1 +Summary: Vietnamese input method for fcitx5 +License: GPL-3.0-or-later +URL: https://github.com/LotusInputMethod/fcitx5-lotus +Source0: %{name}-%{version}.tar.gz + +BuildRequires: cmake +BuildRequires: extra-cmake-modules +BuildRequires: gcc-c++ +BuildRequires: glibc-devel +BuildRequires: fcitx5-devel +BuildRequires: libinput-devel +BuildRequires: systemd-rpm-macros +BuildRequires: pkgconfig(libudev) +BuildRequires: libX11-devel + +BuildRequires: go +Requires(post): udev +BuildRequires: sysuser-tools +BuildRequires: libgudev-1_0-devel + +%{?systemd_requires} + +Requires: fcitx5 +Requires: libinput +Requires: hicolor-icon-theme + +%description +Vietnamese input method for fcitx5 + +%prep +%setup -q + +%build +%cmake +%cmake_build +%sysusers_generate_pre %{_prefix}/lib/sysusers.d/lotus.conf lotus + +%install +%cmake_install +%find_lang %{name} + +%files -f %{name}.lang +%defattr(-,root,root,-) +%dir %{_datadir}/licenses/%{name} +%license %{_datadir}/licenses/%{name}/GPL-3.0-or-later.txt +%license %{_datadir}/licenses/%{name}/LGPL-2.1-or-later.txt +%{_bindir}/fcitx5-lotus-server + +%dir %{_libdir}/fcitx5 +%{_libdir}/fcitx5/liblotus.so + +%{_prefix}/lib/modules-load.d/fcitx5-lotus.conf +%{_unitdir}/fcitx5-lotus-server@.service +%{_prefix}/lib/sysusers.d/lotus.conf +%{_prefix}/lib/udev/rules.d/99-lotus.rules + +%{_datadir}/fcitx5/addon/lotus.conf +%{_datadir}/fcitx5/inputmethod/lotus.conf + +%dir %{_datadir}/fcitx5/lotus +%{_datadir}/fcitx5/lotus/vietnamese.cm.dict + +%{_datadir}/icons/hicolor/scalable/apps/fcitx-lotus.svg +%{_datadir}/icons/hicolor/scalable/apps/org.fcitx.Fcitx5.fcitx-lotus.svg +%{_datadir}/icons/hicolor/scalable/apps/fcitx-lotus-off.svg +%{_datadir}/icons/hicolor/scalable/apps/org.fcitx.Fcitx5.fcitx-lotus-off.svg +%{_datadir}/icons/hicolor/scalable/apps/fcitx-lotus-emoji.svg +%{_datadir}/icons/hicolor/scalable/apps/org.fcitx.Fcitx5.fcitx-lotus-emoji.svg +%{_datadir}/metainfo/org.fcitx.Fcitx5.Addon.Lotus.metainfo.xml + +%clean +rm -rf %{buildroot} +rm -rf %{_builddir}/%{name}-%{version} + +%pre +%sysusers_create_package lotus %{_prefix}/lib/sysusers.d/lotus.conf + +%post +%systemd_post fcitx5-lotus-server@.service +if [ $1 -ge 1 ]; then + if [ -x /usr/bin/udevadm ]; then + /usr/sbin/modprobe uinput >/dev/null 2>&1 || : + /usr/bin/udevadm control --reload-rules >/dev/null 2>&1 || : + /usr/bin/udevadm trigger >/dev/null 2>&1 || : + fi +fi + +echo "--- Cấu hình Lotus ---" +echo "Hướng dẫn sau cài đặt:" +echo "1. Kích hoạt Server cho user của bạn:" +echo " sudo systemctl enable --now fcitx5-lotus-server@\$(whoami).service" +echo "" +echo "2. Cấu hình Fcitx5:" +echo " - Mở 'Fcitx5 Configuration', thêm bộ gõ Lotus" +echo "" +echo "3. Lưu ý cho Wayland (KDE):" +echo " - Hãy chọn 'Fcitx 5' trong phần Virtual Keyboard của hệ thống." +echo "------------------------------------------------" + +%preun +%systemd_preun fcitx5-lotus-server@.service + +%postun +%systemd_postun_with_restart fcitx5-lotus-server@.service + +%changelog +* Thu Feb 19 2026 Nguyen Hoang Ky - 1.0.0-1 +- First stable release \ No newline at end of file