From 1735b2dfc85fcf1f637f9e088fd9dfb6b0fdb384 Mon Sep 17 00:00:00 2001 From: Nguyen Hoang Ky Date: Fri, 20 Feb 2026 07:01:30 +0700 Subject: [PATCH 1/8] add distro packaging --- .github/workflows/packaging.yml | 175 +++++++++++++++++++++++ packaging/debian/changelog | 5 + packaging/debian/compat | 1 + packaging/debian/control | 22 +++ packaging/debian/postinst | 34 +++++ packaging/debian/rules | 8 ++ packaging/debian/source/format | 1 + packaging/rpm/fedora/fcitx5-lotus.spec | 109 ++++++++++++++ packaging/rpm/opensuse/fcitx5-lotus.spec | 114 +++++++++++++++ 9 files changed, 469 insertions(+) create mode 100644 .github/workflows/packaging.yml create mode 100644 packaging/debian/changelog create mode 100644 packaging/debian/compat create mode 100644 packaging/debian/control create mode 100644 packaging/debian/postinst create mode 100644 packaging/debian/rules create mode 100644 packaging/debian/source/format create mode 100644 packaging/rpm/fedora/fcitx5-lotus.spec create mode 100644 packaging/rpm/opensuse/fcitx5-lotus.spec diff --git a/.github/workflows/packaging.yml b/.github/workflows/packaging.yml new file mode 100644 index 0000000..b45c4be --- /dev/null +++ b/.github/workflows/packaging.yml @@ -0,0 +1,175 @@ +name: Test Packaging Build + +on: + push: + branches: + - feat/packaging + pull_request: + branches: + - feat/packaging + +jobs: + build-deb: + name: DEB [${{ matrix.codename }}] [${{ matrix.arch }}] + strategy: + fail-fast: false + matrix: + include: + # Debian + - distro: debian:12 + codename: bookworm + arch: amd64 + - distro: debian:13 + codename: trixie + arch: amd64 + - distro: debian:testing + codename: testing + arch: amd64 + - distro: debian:unstable + codename: sid + arch: amd64 + - distro: debian:unstable + codename: sid + arch: arm64 + + # Ubuntu + - distro: ubuntu:22.04 + codename: jammy + arch: amd64 + - distro: ubuntu:24.04 + codename: noble + arch: amd64 + - distro: ubuntu:25.04 + codename: plucky + arch: amd64 + - distro: ubuntu:25.10 + codename: questing + arch: amd64 + + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v4 + + - name: Set up QEMU + if: matrix.arch == 'arm64' + uses: docker/setup-qemu-action@v3 + + - name: Prepare debian directory + run: cp -r packaging/debian debian + + - name: Build DEB + uses: jtdor/build-deb-action@v1 + with: + docker-image: ${{ matrix.distro }} + host-arch: ${{ matrix.arch }} + buildpackage-opts: --build=binary --no-sign + + - name: Upload DEB artifact + uses: actions/upload-artifact@v4 + with: + name: deb-${{ matrix.codename }}-${{ matrix.arch }} + path: debian/artifacts/*.deb + retention-days: 3 + + build-rpm-fedora: + name: RPM [fedora-${{ matrix.releasever }}] [${{ matrix.arch }}] + strategy: + fail-fast: false + matrix: + include: + - distro: fedora:42 + releasever: 42 + arch: x86_64 + - distro: fedora:43 + releasever: 43 + arch: x86_64 + - distro: fedora:rawhide + releasever: rawhide + arch: x86_64 + + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v4 + + - name: Set up QEMU + if: matrix.arch == 'aarch64' + uses: docker/setup-qemu-action@v3 + + - 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 + 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 }}-${{ matrix.arch }} + path: output/*.rpm + retention-days: 3 + + build-rpm-opensuse: + name: RPM [opensuse-${{ matrix.releasever }}] [${{ matrix.arch }}] + strategy: + fail-fast: false + matrix: + include: + - distro: opensuse/tumbleweed + releasever: tumbleweed + arch: x86_64 + + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v4 + + - 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 }}-${{ matrix.arch }} + path: output/*.rpm + retention-days: 3 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..33e4407 --- /dev/null +++ b/packaging/debian/source/format @@ -0,0 +1 @@ +Format: 3.0 (native) \ No newline at end of file diff --git a/packaging/rpm/fedora/fcitx5-lotus.spec b/packaging/rpm/fedora/fcitx5-lotus.spec new file mode 100644 index 0000000..7e5aad0 --- /dev/null +++ b/packaging/rpm/fedora/fcitx5-lotus.spec @@ -0,0 +1,109 @@ +%global _lto_cflags %nil +%endif%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 +* 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..d4a0cfb --- /dev/null +++ b/packaging/rpm/opensuse/fcitx5-lotus.spec @@ -0,0 +1,114 @@ +%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 +* First stable release \ No newline at end of file From 6817b9960d24e28fd2d445175c1af8ece6faeb1f Mon Sep 17 00:00:00 2001 From: Nguyen Hoang Ky Date: Fri, 20 Feb 2026 07:10:50 +0700 Subject: [PATCH 2/8] fix build --- .github/workflows/packaging.yml | 45 +++++++----------------- packaging/debian/source/format | 2 +- packaging/rpm/fedora/fcitx5-lotus.spec | 5 +-- packaging/rpm/opensuse/fcitx5-lotus.spec | 3 +- 4 files changed, 18 insertions(+), 37 deletions(-) diff --git a/.github/workflows/packaging.yml b/.github/workflows/packaging.yml index b45c4be..db5dea6 100644 --- a/.github/workflows/packaging.yml +++ b/.github/workflows/packaging.yml @@ -10,50 +10,34 @@ on: jobs: build-deb: - name: DEB [${{ matrix.codename }}] [${{ matrix.arch }}] + name: DEB [${{ matrix.codename }}] strategy: fail-fast: false matrix: include: - # Debian - distro: debian:12 codename: bookworm - arch: amd64 - distro: debian:13 codename: trixie - arch: amd64 - distro: debian:testing codename: testing - arch: amd64 - distro: debian:unstable codename: sid - arch: amd64 - - distro: debian:unstable - codename: sid - arch: arm64 - - # Ubuntu - distro: ubuntu:22.04 codename: jammy - arch: amd64 - distro: ubuntu:24.04 codename: noble - arch: amd64 - distro: ubuntu:25.04 codename: plucky - arch: amd64 - distro: ubuntu:25.10 codename: questing - arch: amd64 runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 - - - name: Set up QEMU - if: matrix.arch == 'arm64' - uses: docker/setup-qemu-action@v3 + with: + submodules: recursive - name: Prepare debian directory run: cp -r packaging/debian debian @@ -62,40 +46,34 @@ jobs: uses: jtdor/build-deb-action@v1 with: docker-image: ${{ matrix.distro }} - host-arch: ${{ matrix.arch }} buildpackage-opts: --build=binary --no-sign - name: Upload DEB artifact uses: actions/upload-artifact@v4 with: - name: deb-${{ matrix.codename }}-${{ matrix.arch }} + name: deb-${{ matrix.codename }} path: debian/artifacts/*.deb retention-days: 3 build-rpm-fedora: - name: RPM [fedora-${{ matrix.releasever }}] [${{ matrix.arch }}] + name: RPM [fedora-${{ matrix.releasever }}] strategy: fail-fast: false matrix: include: - distro: fedora:42 releasever: 42 - arch: x86_64 - distro: fedora:43 releasever: 43 - arch: x86_64 - distro: fedora:rawhide releasever: rawhide - arch: x86_64 runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 - - - name: Set up QEMU - if: matrix.arch == 'aarch64' - uses: docker/setup-qemu-action@v3 + with: + submodules: recursive - name: Build Fedora RPM uses: addnab/docker-run-action@v3 @@ -124,24 +102,25 @@ jobs: - name: Upload RPM artifact uses: actions/upload-artifact@v4 with: - name: rpm-fedora-${{ matrix.releasever }}-${{ matrix.arch }} + name: rpm-fedora-${{ matrix.releasever }} path: output/*.rpm retention-days: 3 build-rpm-opensuse: - name: RPM [opensuse-${{ matrix.releasever }}] [${{ matrix.arch }}] + name: RPM [opensuse-${{ matrix.releasever }}] strategy: fail-fast: false matrix: include: - distro: opensuse/tumbleweed releasever: tumbleweed - arch: x86_64 runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 + with: + submodules: recursive - name: Build openSUSE RPM uses: addnab/docker-run-action@v3 @@ -170,6 +149,6 @@ jobs: - name: Upload RPM artifact uses: actions/upload-artifact@v4 with: - name: rpm-opensuse-${{ matrix.releasever }}-${{ matrix.arch }} + name: rpm-opensuse-${{ matrix.releasever }} path: output/*.rpm retention-days: 3 diff --git a/packaging/debian/source/format b/packaging/debian/source/format index 33e4407..89ae9db 100644 --- a/packaging/debian/source/format +++ b/packaging/debian/source/format @@ -1 +1 @@ -Format: 3.0 (native) \ No newline at end of file +3.0 (native) diff --git a/packaging/rpm/fedora/fcitx5-lotus.spec b/packaging/rpm/fedora/fcitx5-lotus.spec index 7e5aad0..cca756a 100644 --- a/packaging/rpm/fedora/fcitx5-lotus.spec +++ b/packaging/rpm/fedora/fcitx5-lotus.spec @@ -1,5 +1,5 @@ %global _lto_cflags %nil -%endif%global optflags %(echo "%{optflags}" | sed 's/-g[^ ]*//g') +%global optflags %(echo "%{optflags}" | sed 's/-g[^ ]*//g') Name: fcitx5-lotus Version: 1.0.0 @@ -106,4 +106,5 @@ echo "------------------------------------------------" %systemd_postun_with_restart fcitx5-lotus-server@.service %changelog -* First stable release \ No newline at end of file +* Sun 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 index d4a0cfb..663dde6 100644 --- a/packaging/rpm/opensuse/fcitx5-lotus.spec +++ b/packaging/rpm/opensuse/fcitx5-lotus.spec @@ -111,4 +111,5 @@ echo "------------------------------------------------" %systemd_postun_with_restart fcitx5-lotus-server@.service %changelog -* First stable release \ No newline at end of file +* Sun Feb 19 2026 Nguyen Hoang Ky - 1.0.0-1 +- First stable release \ No newline at end of file From e00810930bd64f0c198b9bb985a4692ba7a33d8f Mon Sep 17 00:00:00 2001 From: Loc Huynh Date: Wed, 18 Feb 2026 23:56:59 +0700 Subject: [PATCH 3/8] docs: update README with uninstallation instructions for fcitx5-vmk --- .../icons/scalable/apps/fcitx-lotus-emoji.svg | 23 ++++++++----- data/icons/scalable/apps/fcitx-lotus-off.svg | 33 ++++++++++++++++--- data/icons/scalable/apps/fcitx-lotus.svg | 10 +++--- 3 files changed, 49 insertions(+), 17 deletions(-) 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 @@ - + Date: Fri, 20 Feb 2026 19:12:26 +0700 Subject: [PATCH 4/8] fix build option --- .github/workflows/packaging.yml | 4 +++- packaging/rpm/fedora/fcitx5-lotus.spec | 2 +- packaging/rpm/opensuse/fcitx5-lotus.spec | 2 +- 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/.github/workflows/packaging.yml b/.github/workflows/packaging.yml index db5dea6..342f200 100644 --- a/.github/workflows/packaging.yml +++ b/.github/workflows/packaging.yml @@ -44,6 +44,8 @@ jobs: - name: Build DEB uses: jtdor/build-deb-action@v1 + env: + DEB_BUILD_OPTIONS: parallel=2 with: docker-image: ${{ matrix.distro }} buildpackage-opts: --build=binary --no-sign @@ -85,7 +87,7 @@ jobs: 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 + golang libgudev-devel gettext-devel rpmdev-setuptree cp /work/packaging/rpm/fedora/fcitx5-lotus.spec ~/rpmbuild/SPECS/ mkdir -p ~/rpmbuild/SOURCES diff --git a/packaging/rpm/fedora/fcitx5-lotus.spec b/packaging/rpm/fedora/fcitx5-lotus.spec index cca756a..75106aa 100644 --- a/packaging/rpm/fedora/fcitx5-lotus.spec +++ b/packaging/rpm/fedora/fcitx5-lotus.spec @@ -106,5 +106,5 @@ echo "------------------------------------------------" %systemd_postun_with_restart fcitx5-lotus-server@.service %changelog -* Sun Feb 19 2026 Nguyen Hoang Ky - 1.0.0-1 +* 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 index 663dde6..c17cd9f 100644 --- a/packaging/rpm/opensuse/fcitx5-lotus.spec +++ b/packaging/rpm/opensuse/fcitx5-lotus.spec @@ -111,5 +111,5 @@ echo "------------------------------------------------" %systemd_postun_with_restart fcitx5-lotus-server@.service %changelog -* Sun Feb 19 2026 Nguyen Hoang Ky - 1.0.0-1 +* Thu Feb 19 2026 Nguyen Hoang Ky - 1.0.0-1 - First stable release \ No newline at end of file From b39ac226d321fc976fd0228956dcfb8e2dabf6ba Mon Sep 17 00:00:00 2001 From: Nguyen Hoang Ky Date: Fri, 20 Feb 2026 19:21:02 +0700 Subject: [PATCH 5/8] hardcode parallel job for deb build --- .github/workflows/packaging.yml | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/.github/workflows/packaging.yml b/.github/workflows/packaging.yml index 342f200..567e1db 100644 --- a/.github/workflows/packaging.yml +++ b/.github/workflows/packaging.yml @@ -17,20 +17,28 @@ jobs: 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 @@ -45,7 +53,7 @@ jobs: - name: Build DEB uses: jtdor/build-deb-action@v1 env: - DEB_BUILD_OPTIONS: parallel=2 + DEB_BUILD_OPTIONS: parallel=${{ matrix.parallel }} with: docker-image: ${{ matrix.distro }} buildpackage-opts: --build=binary --no-sign From a9a3503e91660af0f3df7bcda37d39b94606cd0b Mon Sep 17 00:00:00 2001 From: Nguyen Hoang Ky Date: Fri, 20 Feb 2026 19:37:53 +0700 Subject: [PATCH 6/8] ready pr to dev branch --- .../{packaging.yml => packaging-dev.yml} | 4 +- .github/workflows/packaging-release.yml | 216 ++++++++++++++++++ .github/workflows/ubuntu-dev-build.yml | 64 ------ .github/workflows/ubuntu-release-build.yml | 70 ------ 4 files changed, 218 insertions(+), 136 deletions(-) rename .github/workflows/{packaging.yml => packaging-dev.yml} (99%) create mode 100644 .github/workflows/packaging-release.yml delete mode 100644 .github/workflows/ubuntu-dev-build.yml delete mode 100644 .github/workflows/ubuntu-release-build.yml diff --git a/.github/workflows/packaging.yml b/.github/workflows/packaging-dev.yml similarity index 99% rename from .github/workflows/packaging.yml rename to .github/workflows/packaging-dev.yml index 567e1db..d302f0e 100644 --- a/.github/workflows/packaging.yml +++ b/.github/workflows/packaging-dev.yml @@ -3,10 +3,10 @@ name: Test Packaging Build on: push: branches: - - feat/packaging + - dev pull_request: branches: - - feat/packaging + - dev jobs: build-deb: 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 }} From 430eb6fb20068d50200cbb2a1cfe3eaffa8717b5 Mon Sep 17 00:00:00 2001 From: Nguyen Hong Hiep Date: Fri, 20 Feb 2026 06:24:52 +0700 Subject: [PATCH 7/8] bump to 1.0.0 --- flake.lock | 6 +++--- nix/packages/fcitx5-lotus/default.nix | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/flake.lock b/flake.lock index 556c4c3..d909019 100644 --- a/flake.lock +++ b/flake.lock @@ -55,11 +55,11 @@ }, "nixpkgs": { "locked": { - "lastModified": 1771008912, - "narHash": "sha256-gf2AmWVTs8lEq7z/3ZAsgnZDhWIckkb+ZnAo5RzSxJg=", + "lastModified": 1771369470, + "narHash": "sha256-0NBlEBKkN3lufyvFegY4TYv5mCNHbi5OmBDrzihbBMQ=", "owner": "nixos", "repo": "nixpkgs", - "rev": "a82ccc39b39b621151d6732718e3e250109076fa", + "rev": "0182a361324364ae3f436a63005877674cf45efb", "type": "github" }, "original": { diff --git a/nix/packages/fcitx5-lotus/default.nix b/nix/packages/fcitx5-lotus/default.nix index 53fe595..141832b 100644 --- a/nix/packages/fcitx5-lotus/default.nix +++ b/nix/packages/fcitx5-lotus/default.nix @@ -16,14 +16,14 @@ }: stdenv.mkDerivation rec { pname = "fcitx5-lotus"; - version = "0.12.1"; + version = "1.0.0"; src = fetchFromGitHub { owner = "LotusInputMethod"; repo = "fcitx5-lotus"; rev = "v${version}"; fetchSubmodules = true; - sha256 = "sha256-G122muB7KSJHqmlBZVBOdUdVJY6vz0/5nlS4YD+iMfU"; + sha256 = "sha256-n8kG/mYYxCSZCRCtBq1QR9g2zueZ57l5r9tp/dUg7v0="; }; nativeBuildInputs = [ @@ -60,7 +60,7 @@ stdenv.mkDerivation rec { # change checking exe_path logic to make it work on NixOS since executable files on NixOS are not located in /usr/bin postPatch = '' - substituteInPlace src/lotus.cpp \ + substituteInPlace src/lotus-monitor.cpp \ --replace-fail 'strcmp(exe_path, "/usr/bin/fcitx5-lotus-server") == 0' \ '(strncmp(exe_path, "/nix/store/", 22) == 0 && strlen(exe_path) >= 22 && strcmp(exe_path + strlen(exe_path) - 22, "/bin/fcitx5-lotus-server") == 0)' substituteInPlace server/lotus-server.cpp \ From 06f5d0d31c9327cfd06e6d50d610b2d422d9ab9e Mon Sep 17 00:00:00 2001 From: Nguyen Hoang Ky Date: Fri, 20 Feb 2026 22:22:29 +0700 Subject: [PATCH 8/8] docs: add dark mode support for star history --- README.en.md | 12 ++++-- README.md | 101 ++++++++++++++++++++++++++++----------------------- 2 files changed, 64 insertions(+), 49 deletions(-) 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 + ---