Files
.dotfiles/tray-icons/.local/share/ngosen-breeze-icons/restart-fcitx5.sh
T

8 lines
432 B
Bash
Executable File

#!/bin/bash
# Restart fcitx5 through KWin (KDE Wayland) so it keeps the Wayland input method frontend.
L=$(kreadconfig6 --file kwinrc --group Wayland --key InputMethod)
[[ -n $L ]] || L=/usr/share/applications/fcitx5-wayland-launcher.desktop
pkill -x fcitx5; sleep 1
kwriteconfig6 --notify --file kwinrc --group Wayland --key InputMethod --delete; sleep 1
kwriteconfig6 --notify --file kwinrc --group Wayland --key InputMethod "$L"