system/i18n: switch to Flatpak-based setup

This commit is contained in:
Gabriel Arazas 2022-05-27 14:26:56 +08:00
parent 916296c6d8
commit 77ca030bae
3 changed files with 36 additions and 18 deletions

View File

@ -0,0 +1,9 @@
[Desktop Entry]
Type=Application
Name=Enable i18n with fcitx5
TryExec=flatpak
Exec=flatpak run org.fcitx.Fcitx5
StartupNotify=false
X-GNOME-Autostart-Phase=Initialization
X-KDE-autostart-phase=1

View File

@ -0,0 +1,3 @@
---
dependencies:
- system/flatpak

View File

@ -1,22 +1,28 @@
# Interestingly, it is apparently available as a Flatpak. Surprisingly, it
# works as if you installed the native package on most repos.
---
- name: Install fcitx5 nightly Flatpak repo
flatpak_remote:
state: present
name: fcitx5-unstable
flatpakrepo_url: https://flatpak.fcitx-im.org/unstable-repo/fcitx5-unstable.flatpakrepo
- name: Install i18n tools
dnf:
flatpak:
state: present
name:
- fcitx5
- fcitx5-configtool
- fcitx5-gtk4
- fcitx5-lua
- fcitx5-mozc
- fcitx5-rime
- librime
- librime-tools
- mozc
- name: Install fonts for i18n
dnf:
state: present
name:
- google-noto-cjk-fonts
- google-noto-cjk-fonts-common
name: "{{ item }}"
remote: fcitx5-unstable
loop:
- org.fcitx.Fcitx5
- org.fcitx.Fcitx5.Addon.Zhuyin
- org.fcitx.Fcitx5.Addon.Unikey
- org.fcitx.Fcitx5.Addon.Rime
- org.fcitx.Fcitx5.Addon.Mozc
- org.fcitx.Fcitx5.Addon.ChineseAddons
- org.fcitx.Fcitx5.Addon.Lua
- name: Enable fcitx5 to autostart
copy:
src: "{{ role_path }}/files/org.fcitx.Fcitx5.desktop"
dest: "/etc/xdg/autostart/org.fcitx.Fcitx5.desktop"
setype: etc_t