summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-x.config/fcitx5/systemd/fcitx5-systemd3
-rw-r--r--.config/fcitx5/systemd/fcitx5@.service9
-rwxr-xr-x.config/yadm/bootstrap9
3 files changed, 21 insertions, 0 deletions
diff --git a/.config/fcitx5/systemd/fcitx5-systemd b/.config/fcitx5/systemd/fcitx5-systemd
new file mode 100755
index 0000000..b529eff
--- /dev/null
+++ b/.config/fcitx5/systemd/fcitx5-systemd
@@ -0,0 +1,3 @@
+#!/usr/bin/env bash
+
+WAYLAND_DISPLAY=wayland-1 XDG_RUNTIME_DIR=/run/user/$(id -u) GTK_IM_MODULE=fcitx QT_IM_MODULE=fcitx XMODIFIERS=@im=fcitx /usr/bin/fcitx5
diff --git a/.config/fcitx5/systemd/fcitx5@.service b/.config/fcitx5/systemd/fcitx5@.service
new file mode 100644
index 0000000..1ab45d9
--- /dev/null
+++ b/.config/fcitx5/systemd/fcitx5@.service
@@ -0,0 +1,9 @@
+[Unit]
+Description=fcitx5
+
+[Service]
+User=%i
+ExecStart=fcitx5-systemd
+
+[Install]
+WantedBy=graphical.target
diff --git a/.config/yadm/bootstrap b/.config/yadm/bootstrap
index b9b1cb3..91f2152 100755
--- a/.config/yadm/bootstrap
+++ b/.config/yadm/bootstrap
@@ -37,3 +37,12 @@ if command -v gammastep > /dev/null 2>&1; then
sudo systemctl enable "gammastep@$USER" --now
fi
+# #
+# fcitx5
+# #
+
+if command -v fcitx5 > /dev/null 2>&1; then
+ sudo ln -s "$HOME/.config/fcitx5/systemd/fcitx5@.service" /etc/systemd/system/
+ sudo ln -s "$HOME/.config/fcitx5/systemd/fcitx5-systemd" /usr/local/bin/
+ sudo systemctl enable "fcitx5@$USER" --now
+fi