Merge pull request #114 from gnome-terminator/issue78

fix detection of whether or not ibus is running
This commit is contained in:
Matt Rose 2020-06-10 21:41:56 -04:00 committed by GitHub
commit a762bb9ff0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -57,7 +57,7 @@ if __name__ == '__main__':
# Environment also needs IBUS_DISABLE_SNOOPER=1, or double chars appear # Environment also needs IBUS_DISABLE_SNOOPER=1, or double chars appear
# in the receivers. # in the receivers.
username = pwd.getpwuid(os.getuid()).pw_name username = pwd.getpwuid(os.getuid()).pw_name
ibus_running = [p for p in psutil.process_iter() if p.name == 'ibus-daemon' and p.username == username] ibus_running = [p for p in psutil.process_iter() if p.name() == 'ibus-daemon' and p.username() == username]
ibus_running = len(ibus_running) > 0 ibus_running = len(ibus_running) > 0
if ibus_running: if ibus_running:
os.environ['IBUS_DISABLE_SNOOPER']='1' os.environ['IBUS_DISABLE_SNOOPER']='1'