mirror of
https://github.com/keymanapp/keyman.git
synced 2026-08-10 10:55:33 +00:00
13 lines
256 B
Python
13 lines
256 B
Python
import subprocess
|
|
import dbus
|
|
|
|
|
|
def is_fcitx_running():
|
|
for service in dbus.SessionBus().list_names():
|
|
if service == 'org.fcitx.Fcitx5':
|
|
return True
|
|
return False
|
|
|
|
|
|
def restart_fcitx():
|
|
subprocess.run(['fcitx5', '-r', '-d'])
|