Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
66 changes: 52 additions & 14 deletions README.en.md
Original file line number Diff line number Diff line change
Expand Up @@ -322,10 +322,11 @@ systemctl status fcitx5-lotus-server@$(whoami).service

The input method will not work without these variables.

- **Bash / Zsh:**
<details open>
<summary><b>Bash</b></summary>

```bash
# This command will add the configuration to ~/.bash_profile, do the same for .zprofile
# Add the configuration to ~/.bash_profile
cat <<EOF >> ~/.bash_profile
export GTK_IM_MODULE=fcitx
export QT_IM_MODULE=fcitx
Expand All @@ -335,28 +336,50 @@ export GLFW_IM_MODULE=ibus
EOF
```

- **Fish shell:**
</details>

<details open>
<summary><b>Zsh</b></summary>

```bash
# Add the configuration to ~/.zprofile
cat <<EOF >> ~/.zprofile
export GTK_IM_MODULE=fcitx
export QT_IM_MODULE=fcitx
export XMODIFIERS=@im=fcitx
export SDL_IM_MODULE=fcitx
export GLFW_IM_MODULE=ibus
EOF
```

</details>

<details>
<summary><b>Fish shell</b></summary>

```fish
# Add configuration to ~/.config/fish/config.fish
cat >> ~/.config/fish/config.fish <<'EOF'

# Input Method Configuration for Fcitx5
set -Ux GTK_IM_MODULE fcitx
set -Ux QT_IM_MODULE fcitx
set -Ux XMODIFIERS "@im=fcitx"
set -gx SDL_IM_MODULE fcitx
set -gx GLFW_IM_MODULE ibus
EOF
echo 'if status is-login
set -Ux GTK_IM_MODULE fcitx
set -Ux QT_IM_MODULE fcitx
set -Ux XMODIFIERS "@im=fcitx"
set -gx SDL_IM_MODULE fcitx
set -gx GLFW_IM_MODULE ibus
end' >> ~/.config/fish/config.fish
```

</details>

Log out and log in to apply changes.

<details>
<summary><b>If you still cannot type after logging out</b></summary>
<br>

If the configuration in `~/.bash_profile` or `~/.zprofile` doesn't work, you can try setting it in `/etc/environment` to apply to the entire system:
If the configuration in `~/.bash_profile`, `~/.zprofile` or `.config/fish/config.fish` doesn't work, you can try setting it in `/etc/environment` to apply to the entire system:

<details open>
<summary><b>Bash/Zsh</b></summary>

```bash
cat <<EOF | sudo tee -a /etc/environment
Expand All @@ -368,6 +391,21 @@ GLFW_IM_MODULE=ibus
EOF
```

</details>

<details open>
<summary><b>Fish shell</b></summary>

```fish
echo "GTK_IM_MODULE=fcitx
QT_IM_MODULE=fcitx
XMODIFIERS=@im=fcitx
SDL_IM_MODULE=fcitx
GLFW_IM_MODULE=ibus" | sudo tee -a /etc/environment
```

</details>

> **Note:** A system restart is required after setup.

</details>
Expand Down Expand Up @@ -429,7 +467,7 @@ After logging out and logging in again:
### 1. Customize input method

- **Access:** Right-click the Lotus icon on the system tray to open customization.
- **Customization options:** _Typing Mode_, _Input Method_, _Charset_, _Spell Check_, _Macro_, _Capitalize Macro_, _Auto non-VN restore_, _Modern Style_, _Free Marking_, _Fix Uinput with ack_, _Mode menu_.
- **Customization options:** _Typing Mode_, _Input Method_, _Charset_, _Spell Check_, _Macro_, _Capitalize Macro_, _Auto non-VN restore_, _Modern Style_, _Free Marking_, _Fix Uinput with ack_, _Lotus status icons_, _Mode menu_.

### 2. Typing mode menu

Expand Down
86 changes: 65 additions & 21 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -296,15 +296,19 @@ 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:**
<details open>
<summary><b>Bash / Zsh</b></summary>

```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 || \
(sudo systemd-sysusers && sudo systemctl enable --now fcitx5-lotus-server@$(whoami).service)
```

- **Fish shell:**
</details>

<details open>
<summary><b>Fish shell</b></summary>

```fish
# Bật và khởi động service (tự động fix lỗi thiếu user systemd nếu có)
Expand All @@ -313,6 +317,8 @@ sudo systemctl enable --now fcitx5-lotus-server@(whoami).service; or begin
end
```

</details>

```bash
# Kiểm tra status (nếu thấy active (running) màu xanh là OK)
systemctl status fcitx5-lotus-server@$(whoami).service
Expand All @@ -322,10 +328,11 @@ 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:**
<details open>
<summary><b>Bash</b></summary>

```bash
# Thêm cấu hình vào ~/.bash_profile (với .zprofile làm tương tự)
# Thêm cấu hình vào ~/.bash_profile
cat <<EOF >> ~/.bash_profile
export GTK_IM_MODULE=fcitx
export QT_IM_MODULE=fcitx
Expand All @@ -335,28 +342,49 @@ export GLFW_IM_MODULE=ibus
EOF
```

- **Fish shell:**
</details>

<details open>
<summary><b>Zsh</b></summary>

```bash
# Thêm cấu hình vào ~/.zprofile
cat <<EOF >> ~/.zprofile
export GTK_IM_MODULE=fcitx
export QT_IM_MODULE=fcitx
export XMODIFIERS=@im=fcitx
export SDL_IM_MODULE=fcitx
export GLFW_IM_MODULE=ibus
EOF
```

</details>
<details open>
<summary><b>Fish shell</b></summary>

```fish
# Thêm cấu hình vào ~/.config/fish/config.fish
cat >> ~/.config/fish/config.fish <<'EOF'

# Input Method Configuration for Fcitx5
set -Ux GTK_IM_MODULE fcitx
set -Ux QT_IM_MODULE fcitx
set -Ux XMODIFIERS "@im=fcitx"
set -gx SDL_IM_MODULE fcitx
set -gx GLFW_IM_MODULE ibus
EOF
echo 'if status is-login
set -Ux GTK_IM_MODULE fcitx
set -Ux QT_IM_MODULE fcitx
set -Ux XMODIFIERS "@im=fcitx"
set -gx SDL_IM_MODULE fcitx
set -gx GLFW_IM_MODULE ibus
end' >> ~/.config/fish/config.fish
```

</details>

Log out và log in để áp dụng thay đổi.

<details>
<summary><b>Nếu bạn vẫn chưa gõ được sau khi log out</b></summary>
<br>

Nếu cấu hình tại `~/.bash_profile` hoặc `~/.zprofile` không hoạt động, bạn có thể thử thiết lập tại `/etc/environment` để áp dụng cho toàn bộ hệ thống:
Nếu cấu hình tại `~/.bash_profile`, `~/.zprofile` hay `.config/fish/config.fish` không hoạt động, bạn có thể thử thiết lập tại `/etc/environment` để áp dụng cho toàn bộ hệ thống:

<details open>
<summary><b>Bash/Zsh</b></summary>

```bash
cat <<EOF | sudo tee -a /etc/environment
Expand All @@ -368,6 +396,21 @@ GLFW_IM_MODULE=ibus
EOF
```

</details>

<details open>
<summary><b>Fish shell</b></summary>

```fish
echo "GTK_IM_MODULE=fcitx
QT_IM_MODULE=fcitx
XMODIFIERS=@im=fcitx
SDL_IM_MODULE=fcitx
GLFW_IM_MODULE=ibus" | sudo tee -a /etc/environment
```

</details>

> **Lưu ý:** Cần khởi động lại máy sau khi thiết lập.

</details>
Expand Down Expand Up @@ -417,10 +460,10 @@ Sau khi đã log out và log in lại:
- **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
```
```ini
permission = fcitx5-lotus-server, keyboard, allow
```

</details>

---
Expand All @@ -445,11 +488,12 @@ Sau khi đã log out và log in lại:
| **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.<br/>Nên bật khi sử dụng các ứng dụng Chromium (Chrome, Brave, Edge, ...). | Tắt |
| **Mode Menu** | Bật/tắt mở menu chuyển chế độ gõ bằng phím **`** (tắt để nhập biểu tượng trực tiếp). | Bật |
| **Lotus Icons** | Bật/tắt sử dụng icon Lotus thay vì icon mặc định V E. | Tắt |
| **Typing Mode Menu** | Bật/tắt mở menu chuyển chế độ gõ bằng phím **`** (tắt để nhập ký tự trực tiếp). | Bật |

### 2. Menu chuyển chế độ gõ

Khi con trỏ đang ở trong ô nhập liệu (có thể gõ văn bản), nhấn phím **`** để mở menu chọn chế độ gõ; bạn có thể dùng chuột hoặc phím tắt để chọn.
Khi con trỏ đang ở trong ô nhập liệu (có thể gõ văn bản), nhấn phím **`** để mở menu chọn chế độ gõ; bạn có thể dùng chuột hoặc phím tắt để chọn chế độ mong muốn.

| Chế độ | Phím tắt | Mô tả |
| :-------------------- | :------: | :----------------------------------------------------------------------------------------------------------------------------------- |
Expand Down
2 changes: 1 addition & 1 deletion data/icons/scalable/apps/fcitx-lotus-default.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion data/icons/scalable/apps/fcitx-lotus-emoji-default.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
12 changes: 6 additions & 6 deletions data/icons/scalable/apps/fcitx-lotus-emoji.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion data/icons/scalable/apps/fcitx-lotus-off-default.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
24 changes: 11 additions & 13 deletions data/icons/scalable/apps/fcitx-lotus-off.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Loading