Added hotfix for #78 that deletes GTK_IM_MODULE environment variable

Using this hotfix for a while, and no discrepancy observed. In order to
permanently(hopefully) fix the issue, commiting fix.
This commit is contained in:
ozzdemir 2022-01-27 00:20:56 +03:00
parent 63caddfe97
commit 1e8940039a
1 changed files with 10 additions and 0 deletions

View File

@ -53,6 +53,16 @@ from terminatorlib.util import dbg, err
from terminatorlib.layoutlauncher import LayoutLauncher
from terminatorlib.configjson import ConfigJson
# Deleting env variable fixes double char problem when broadcasting (#78)
# Only delete if it exists, or exception occurs
try:
del os.environ['GTK_IM_MODULE']
except Exception as e:
# Only exception is a key error, which states that env var does not exists
# So, it is okay to pass
pass
if __name__ == '__main__':
# Workaround for IBus intefering with broadcast when using dead keys
# Environment also needs IBUS_DISABLE_SNOOPER=1, or double chars appear