mirror of
https://github.com/keymanapp/keyman.git
synced 2026-08-15 05:09:25 +00:00
17 lines
325 B
Python
17 lines
325 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
|
|
|
|
|
|
def restart_fcitx():
|
|
subprocess.run(['fcitx5', '-r', '-d'])
|