Skip to content
Merged

Dev #512

Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
38 commits
Select commit Hold shift + click to select a range
a6d86fe
Update bamboo-core
nhktmdzhg Sep 10, 2026
46039ee
update debian/copyright
Coolllyn Sep 11, 2026
2fb0b82
Merge pull request #483 from Coolllyn/debian/copyright
nhktmdzhg Sep 11, 2026
270f798
nix: update nix package file
justanoobcoder Sep 11, 2026
5767afa
ci: add update nix hash workflow
justanoobcoder Sep 11, 2026
f84b574
Merge pull request #485 from justanoobcoder/dev
nhktmdzhg Sep 11, 2026
6dc09ec
feat(engine): notify when app mode changes via the mode menu
nhktmdzhg Sep 11, 2026
939f01a
fix(engine): keep focused app's per-app mode rule across config reloa…
nhktmdzhg Sep 11, 2026
4865742
fix(engine): survive Chromium X11 focus bounce in uinput modes and ad…
nhktmdzhg Sep 11, 2026
3d4595d
update debian/copyright
Coolllyn Sep 11, 2026
5fcd895
fix(bamboo): use an empty dictionary map instead of failing to create…
nhktmdzhg Sep 12, 2026
d9a8301
fix(monitor): clamp the mouse-socket log length so the build is warni…
nguyenphivn Sep 12, 2026
15816c8
remove libx11-dev
Coolllyn Sep 13, 2026
37a07eb
Merge pull request #484 from Coolllyn/fcitx5-lotus
nhktmdzhg Sep 13, 2026
99fbcd9
Merge pull request #496 from Coolllyn/remove-libx11
nhktmdzhg Sep 13, 2026
e98f693
fix(icon): pick the tray icon colour from the KDE Plasma panel (#374)
nguyenphivn Sep 14, 2026
255af14
Merge pull request #493 from nguyenphivn/fix/mouse-socket-log-bound
nhktmdzhg Sep 14, 2026
4109b89
remove fcitx5utils
Coolllyn Sep 14, 2026
5696805
Merge pull request #499 from Coolllyn/fcitx5utils_not
nhktmdzhg Sep 14, 2026
748c681
Adding VUR (Void linux)
Coolllyn Sep 14, 2026
79e718a
Merge pull request #500 from Coolllyn/issue_template
nhktmdzhg Sep 14, 2026
12892d9
add gentoo into issue template
nhktmdzhg Sep 14, 2026
6aa5b98
chore(deps): bump github/codeql-action from 4.37.9 to 4.38.0
dependabot[bot] Sep 15, 2026
a9a9deb
chore(deps): bump peter-evans/create-pull-request from 6 to 8
dependabot[bot] Sep 15, 2026
b497a8c
fix: remove redundant code
xoaiPro235 Sep 15, 2026
f964273
Merge pull request #505 from xoaiPro235/fix/remove-redundant-code
nhktmdzhg Sep 15, 2026
4e3a40f
Merge pull request #504 from LotusInputMethod/dependabot/github_actio…
nhktmdzhg Sep 15, 2026
cc8f412
Merge pull request #503 from LotusInputMethod/dependabot/github_actio…
nhktmdzhg Sep 15, 2026
1a2974e
fix(engine): prioritize scalable icon search paths over raster direct…
nhktmdzhg Sep 15, 2026
2b51baf
refactor(utils): introduce getEnv helper and clean up environment var…
nhktmdzhg Sep 15, 2026
f6298d6
add file to cmake again
nhktmdzhg Sep 15, 2026
79d5706
Merge pull request #497 from nguyenphivn/fix/plasma-panel-icon-374
nhktmdzhg Sep 15, 2026
2ca89a5
fix: defer commit out of key event on dbus frontend for GTK4 apps on …
collyn Sep 17, 2026
fb7f1d7
adding ctest for package
Coolllyn Sep 17, 2026
2d17c37
Merge pull request #511 from Coolllyn/TEMPORY
nhktmdzhg Sep 17, 2026
b33d27a
Merge pull request #510 from collyn/fix/dbus-deferred-commit
nhktmdzhg Sep 17, 2026
c43c02b
fix(server): drain libinput events unconditionally after libinput_dis…
nhktmdzhg Sep 17, 2026
9170462
ready bump to 3.5.10
nhktmdzhg Sep 19, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .github/ISSUE_TEMPLATE/bug_report.yml
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,8 @@ body:
- AUR (fcitx5-lotus-git)
- Cloudflare Pages (Debian/Ubuntu/Fedora/OpenSUSE)
- NixOS
- VUR (Void Linux)
- GURU (Gentoo)
- Tự build từ source
- Khác
validations:
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ jobs:
steps:
- name: Install dependencies
run: |
pacman -Syu --noconfirm base-devel clang cmake ninja extra-cmake-modules fmt libuv boost git go libinput systemd-libs extra-cmake-modules libx11 python librsvg
pacman -Syu --noconfirm base-devel clang cmake ninja extra-cmake-modules fmt libuv boost git go libinput systemd-libs extra-cmake-modules python librsvg
git config --global --add safe.directory "$GITHUB_WORKSPACE"
git config --global --add safe.directory "$GITHUB_WORKSPACE/fcitx5-lotus"
git config --global --add safe.directory "$GITHUB_WORKSPACE/fcitx5"
Expand Down Expand Up @@ -72,7 +72,7 @@ jobs:
submodules: true
- name: Init CodeQL
if: matrix.compiler == 'gcc'
uses: github/codeql-action/init@v4.37.9
uses: github/codeql-action/init@v4.38.0
with:
languages: cpp,go
source-root: fcitx5-lotus
Expand All @@ -89,7 +89,7 @@ jobs:
ctest --test-dir fcitx5-lotus/build --output-on-failure --no-tests=error
- name: CodeQL Analysis
if: matrix.compiler == 'gcc'
uses: github/codeql-action/analyze@v4.37.9
uses: github/codeql-action/analyze@v4.38.0
with:
checkout_path: fcitx5-lotus

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/packaging-dev.yml
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,7 @@ jobs:
set -euo pipefail
pacman -Syu --noconfirm \
cmake extra-cmake-modules gcc go \
fcitx5 libinput libx11 systemd python \
fcitx5 libinput systemd python \
make pkgconf zstd librsvg

cd /work
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/packaging-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -361,7 +361,7 @@ jobs:
set -euo pipefail
pacman -Syu --noconfirm \
cmake extra-cmake-modules gcc go \
fcitx5 libinput libx11 systemd python \
fcitx5 libinput systemd python \
make pkgconf zstd librsvg

cd /work
Expand Down
89 changes: 89 additions & 0 deletions .github/workflows/update-nix-hash.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,89 @@
name: Update Nix Hash on Release

on:
release:
types: [published]
workflow_dispatch:
inputs:
version:
description: 'Update version:'
required: false

permissions:
contents: write
pull-requests: write

concurrency:
group: update-nix-hash
cancel-in-progress: false

jobs:
update-hash:
name: Update package hash
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v7
with:
ref: main
fetch-depth: 0
persist-credentials: false

- name: Install Nix
uses: cachix/install-nix-action@v31
with:
nix_path: nixpkgs=channel:nixos-unstable
extra_nix_config: |
experimental-features = nix-command flakes
accept-flake-config = true

- name: Determine version
id: version
run: |
if [ -n "${{ github.event.inputs.version }}" ]; then
VERSION="${{ github.event.inputs.version }}"
else
VERSION="${{ github.event.release.tag_name }}"
VERSION="${VERSION#v}"
fi
echo "version=$VERSION" >> "$GITHUB_OUTPUT"

- name: Run nix-update via shim
run: |
cat > update-shim.nix << 'EOF'
{ pkgs ? import <nixpkgs> { } }:
{
fcitx5-lotus = pkgs.callPackage ./nix/packages/fcitx5-lotus { };
}
EOF

nix run nixpkgs#nix-update -- \
--file ./update-shim.nix \
fcitx5-lotus \
--version="${{ steps.version.outputs.version }}"

rm update-shim.nix

- name: Build to verify
run: nix build -L --no-link .#packages.x86_64-linux.fcitx5-lotus

- name: Check for changes
id: git-check
run: |
if git diff --quiet; then
echo "changed=false" >> "$GITHUB_OUTPUT"
else
echo "changed=true" >> "$GITHUB_OUTPUT"
fi

- name: Create Pull Request
if: steps.git-check.outputs.changed == 'true'
uses: peter-evans/create-pull-request@v8
with:
base: main
commit-message: "nix: update fcitx5-lotus to ${{ steps.version.outputs.version }}"
title: "nix: update to v${{ steps.version.outputs.version }}"
body: |
Tự động cập nhật version và hash cho Nix sau khi release `v${{ steps.version.outputs.version }}`.
Đã build thành công trước khi tạo PR này.
branch: auto-update-nix-${{ steps.version.outputs.version }}
delete-branch: true
5 changes: 2 additions & 3 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
cmake_minimum_required(VERSION 3.10)

project(fcitx5-lotus VERSION 3.5.9)
project(fcitx5-lotus VERSION 3.5.10)
set(CMAKE_EXPORT_COMPILE_COMMANDS ON)
option(BUILD_TESTING "Build Lotus tests" OFF)

Expand All @@ -14,6 +14,7 @@ set(fcitx_lotus_core_sources
${CMAKE_CURRENT_SOURCE_DIR}/src/lotus-utils.cpp
${CMAKE_CURRENT_SOURCE_DIR}/src/lotus-monitor.cpp
${CMAKE_CURRENT_SOURCE_DIR}/src/lotus-icon-resolver.cpp
${CMAKE_CURRENT_SOURCE_DIR}/src/lotus-plasma-theme.cpp
${CMAKE_CURRENT_SOURCE_DIR}/src/emoji.cpp
)

Expand All @@ -28,12 +29,10 @@ find_package(Fcitx5Core ${REQUIRED_FCITX_VERSION} REQUIRED)
find_package(Fcitx5ModuleEmoji REQUIRED)
find_package(Pthread REQUIRED)
find_package(Gettext REQUIRED)
find_package(X11 REQUIRED)

include("${FCITX_INSTALL_CMAKECONFIG_DIR}/Fcitx5Utils/Fcitx5CompilerSettings.cmake")
add_definitions(-DFCITX_GETTEXT_DOMAIN=\"fcitx5-lotus\")

find_package(Fcitx5Utils REQUIRED)
if (Fcitx5Utils_VERSION VERSION_GREATER_EQUAL "5.1.13")
add_definitions(-DLOTUS_USE_MODERN_FCITX_API)
message(STATUS "Fcitx5 version ${Fcitx5Utils_VERSION} detected: Using modern API")
Expand Down
8 changes: 4 additions & 4 deletions README.en.md
Original file line number Diff line number Diff line change
Expand Up @@ -67,10 +67,10 @@ If you want to compile the input method from source to contribute or customize:

### Dependencies

- **Debian/Ubuntu:** `sudo apt-get install cmake extra-cmake-modules libfcitx5core-dev libfcitx5config-dev libfcitx5utils-dev libinput-dev libudev-dev g++ golang hicolor-icon-theme pkg-config libx11-dev fcitx5-modules-dev python3-qtpy python3-dbus acl librsvg2-bin`
- **Fedora/RHEL:** `sudo dnf install cmake extra-cmake-modules fcitx5-devel libinput-devel libudev-devel gcc-c++ golang hicolor-icon-theme systemd-devel libX11-devel python3-pyside6 python3-QtPy python3-dbus acl librsvg2-tools`
- **openSUSE:** `sudo zypper install cmake kf6-extra-cmake-modules fcitx5-devel libinput-devel systemd-devel gcc-c++ go hicolor-icon-theme systemd-devel libX11-devel python3-pyside6 python3-QtPy python3-dbus-python acl rsvg-convert`
- **Arch:** `sudo pacman -S --needed cmake extra-cmake-modules gcc go git libx11 python make pkgconf acl fcitx5 libinput hicolor-icon-theme python-qtpy python-dbus librsvg`
- **Debian/Ubuntu:** `sudo apt-get install cmake extra-cmake-modules libfcitx5core-dev libfcitx5config-dev libfcitx5utils-dev libinput-dev libudev-dev g++ golang hicolor-icon-theme pkg-config fcitx5-modules-dev python3-qtpy python3-dbus acl librsvg2-bin`
- **Fedora/RHEL:** `sudo dnf install cmake extra-cmake-modules fcitx5-devel libinput-devel libudev-devel gcc-c++ golang hicolor-icon-theme systemd-devel python3-pyside6 python3-QtPy python3-dbus acl librsvg2-tools`
- **openSUSE:** `sudo zypper install cmake kf6-extra-cmake-modules fcitx5-devel libinput-devel systemd-devel gcc-c++ go hicolor-icon-theme systemd-devel python3-pyside6 python3-QtPy python3-dbus-python acl rsvg-convert`
- **Arch:** `sudo pacman -S --needed cmake extra-cmake-modules gcc go git python make pkgconf acl fcitx5 libinput hicolor-icon-theme python-qtpy python-dbus librsvg`

### Install

Expand Down
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -67,10 +67,10 @@ Nếu bạn muốn tự biên dịch bộ gõ từ mã nguồn để đóng góp

### Yêu cầu hệ thống

- **Debian/Ubuntu:** `sudo apt-get install cmake extra-cmake-modules libfcitx5core-dev libfcitx5config-dev libfcitx5utils-dev libinput-dev libudev-dev g++ golang hicolor-icon-theme pkg-config libx11-dev fcitx5-modules-dev python3-qtpy python3-dbus acl librsvg2-bin`
- **Fedora/RHEL:** `sudo dnf install cmake extra-cmake-modules fcitx5-devel libinput-devel libudev-devel gcc-c++ golang hicolor-icon-theme systemd-devel libX11-devel python3-pyside6 python3-QtPy python3-dbus acl librsvg2-tools`
- **openSUSE:** `sudo zypper install cmake kf6-extra-cmake-modules fcitx5-devel libinput-devel systemd-devel gcc-c++ go hicolor-icon-theme systemd-devel libX11-devel python3-pyside6 python3-QtPy python3-dbus-python acl rsvg-convert`
- **Arch:** `sudo pacman -S --needed cmake extra-cmake-modules gcc go git libx11 python make pkgconf acl fcitx5 libinput hicolor-icon-theme python-qtpy python-dbus librsvg`
- **Debian/Ubuntu:** `sudo apt-get install cmake extra-cmake-modules libfcitx5core-dev libfcitx5config-dev libfcitx5utils-dev libinput-dev libudev-dev g++ golang hicolor-icon-theme pkg-config fcitx5-modules-dev python3-qtpy python3-dbus acl librsvg2-bin`
- **Fedora/RHEL:** `sudo dnf install cmake extra-cmake-modules fcitx5-devel libinput-devel libudev-devel gcc-c++ golang hicolor-icon-theme systemd-devel python3-pyside6 python3-QtPy python3-dbus acl librsvg2-tools`
- **openSUSE:** `sudo zypper install cmake kf6-extra-cmake-modules fcitx5-devel libinput-devel systemd-devel gcc-c++ go hicolor-icon-theme systemd-devel python3-pyside6 python3-QtPy python3-dbus-python acl rsvg-convert`
- **Arch:** `sudo pacman -S --needed cmake extra-cmake-modules gcc go git python make pkgconf acl fcitx5 libinput hicolor-icon-theme python-qtpy python-dbus librsvg`

### Cài đặt

Expand Down
16 changes: 8 additions & 8 deletions bamboo/bamboo-c.go
Original file line number Diff line number Diff line change
Expand Up @@ -148,9 +148,9 @@ func EngineSetOption(engine uintptr, option *C.FcitxBambooEngineOption) {

//export NewEngine
func NewEngine(name *C.cchar, dictHandle uintptr, tableHandle uintptr) uintptr {
dict, ok := dictionaryFromHandle(dictHandle)
if !ok {
return 0
dictionary := map[string]bool{}
if dict, ok := dictionaryFromHandle(dictHandle); ok {
dictionary = *dict
}

table, ok := macroTableFromHandle(tableHandle)
Expand All @@ -163,7 +163,7 @@ func NewEngine(name *C.cchar, dictHandle uintptr, tableHandle uintptr) uintptr {
var engine = &FcitxBambooEngine{
preeditor: bamboo.NewEngine(bamboo.ParseInputMethod(bamboo.InputMethodDefinitions, imName), bamboo.EstdFlags),
macroTable: table,
dictionary: *dict,
dictionary: dictionary,
autoNonVnRestore: true,
ddFreeStyle: true,
macroEnabled: false,
Expand All @@ -182,9 +182,9 @@ func NewEngine(name *C.cchar, dictHandle uintptr, tableHandle uintptr) uintptr {

//export NewCustomEngine
func NewCustomEngine(definition **C.char, dictHandle uintptr, tableHandle uintptr) uintptr {
dict, ok := dictionaryFromHandle(dictHandle)
if !ok {
return 0
dictionary := map[string]bool{}
if dict, ok := dictionaryFromHandle(dictHandle); ok {
dictionary = *dict
}

table, ok := macroTableFromHandle(tableHandle)
Expand All @@ -206,7 +206,7 @@ func NewCustomEngine(definition **C.char, dictHandle uintptr, tableHandle uintpt
var engine = &FcitxBambooEngine{
preeditor: bamboo.NewEngine(bamboo.ParseInputMethod(definitions, "Custom"), bamboo.EstdFlags),
macroTable: table,
dictionary: *dict,
dictionary: dictionary,
autoNonVnRestore: true,
ddFreeStyle: true,
macroEnabled: false,
Expand Down
2 changes: 1 addition & 1 deletion bamboo/bamboo-core
Submodule bamboo-core updated 2 files
+0 −1 bamboo_utils.go
+2 −3 utils.go
16 changes: 7 additions & 9 deletions bamboo/fcitxbambooengine.go
Original file line number Diff line number Diff line change
Expand Up @@ -68,15 +68,13 @@ const (
func determineMacroCase(str string) uint8 {
var hasLower, hasUpper bool
for _, c := range str {
if unicode.IsLetter(c) {
if unicode.IsLower(c) {
hasLower = true
} else if unicode.IsUpper(c) {
hasUpper = true
}
if hasLower && hasUpper {
return VnCaseNoChange
}
if unicode.IsLower(c) {
hasLower = true
} else if unicode.IsUpper(c) {
hasUpper = true
}
if hasLower && hasUpper {
return VnCaseNoChange
}
}
if hasLower {
Expand Down
12 changes: 6 additions & 6 deletions flake.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

43 changes: 30 additions & 13 deletions nix/packages/fcitx5-lotus/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
kdePackages,
libinput,
librsvg,
libx11,
nix-update-script,
pkg-config,
python3,
qt6,
Expand Down Expand Up @@ -40,6 +40,20 @@ stdenv.mkDerivation (finalAttrs: {
fetchSubmodules = true;
};

vendorDir = finalAttrs.passthru."go-modules";

passthru = {
"go-modules" =
(buildGoModule {
pname = "fcitx5-lotus-go-modules";
inherit (finalAttrs) version src;
modRoot = "bamboo";
vendorHash = "sha256-CNDYjxDfqh9nGs5vlpb/7qXZeNtkvegC5nPvBOZcDrc=";
}).goModules;

updateScript = nix-update-script { };
};

nativeBuildInputs = [
cmake
gettext
Expand All @@ -56,20 +70,17 @@ stdenv.mkDerivation (finalAttrs: {
fcitx5
kdePackages.extra-cmake-modules
libinput
libx11
pythonEnv
qt6.qtbase
qt6.qtsvg
udev
];

vendorDir =
(buildGoModule {
pname = "fcitx5-lotus-go-modules";
inherit (finalAttrs) version src;
modRoot = "bamboo";
vendorHash = "sha256-CNDYjxDfqh9nGs5vlpb/7qXZeNtkvegC5nPvBOZcDrc=";
}).goModules;
strictDeps = true;

__structuredAttrs = true;

dontWrapQtApps = true;

preConfigure = ''
export GOCACHE=$TMPDIR/go-cache
Expand Down Expand Up @@ -113,10 +124,16 @@ stdenv.mkDerivation (finalAttrs: {
--prefix XDG_DATA_DIRS : "${hicolor-icon-theme}/share"
'';

meta = with lib; {
description = "Fcitx5 Lotus input method for Vietnamese typing";
meta = {
description = "Vietnamese input method engine for Fcitx5";
homepage = "https://github.com/LotusInputMethod/fcitx5-lotus";
license = licenses.gpl3;
platforms = platforms.linux;
license = with lib.licenses; [
gpl3Plus
lgpl21Plus
];
maintainers = with lib.maintainers; [
justanoobcoder
];
platforms = lib.platforms.linux;
};
})
Loading
Loading