spiegel-keyman/linux/keyman-config/keyman_config/fcitx_util.py
Weng Xuetian 4517c03f1d
Do not restart Fcitx
1. Fcitx does not need restart to load newly installed keyman keyboard
2. Restart fcitx may cause issue on kwin/weston Wayland where input
   method have to be spawned by compositor process.
2023-12-07 13:41:21 -08:00

14 lines
260 B
Python

import subprocess
import dbus
def is_fcitx_running():
try:
for service in dbus.SessionBus().list_names():
if service == 'org.fcitx.Fcitx5':
return True
return False
except Exception:
return False