- Updated setup.py installer to set the IBus Input Method for the installer if it is not currently set as the default.

This commit is contained in:
Ryan Reaves
2020-02-18 21:20:01 -06:00
parent 6b0f3fc0dd
commit e6dbd5ea13
2 changed files with 24 additions and 8 deletions

View File

@@ -39,13 +39,7 @@ If you need kintox11 recompiled for your distro please let me know and I will ad
You can also attempt to compile kintox11.c on your system as well, but you will need to compile and install json-c first as its libraries will be required to compile and run the program.
*IBUS is needed to support wordwise during browser app usage as the keymap will need to change slightly depending if the cursor/caret is on screen waiting for input. You may install ibus with the following.
```
ibus-setup
im-config -n ibus
```
!! Please logoff and back on for IBus change to take effect!
*IBUS is needed to support wordwise during browser app usage as the keymap will need to change slightly depending if the cursor/caret is on screen waiting for input. Setup.py will set it but you can manually set it as well or check your current Input Method.
To confirm navigate to your "Language Support" and set "Keyboard input method system:" to IBus for full word-wise support with web browsers.

View File

@@ -1,5 +1,5 @@
#!/usr/bin/env python3
import json, time, os
import json, time, os, sys
from shutil import copyfile
from subprocess import PIPE, Popen
from prekinto import *
@@ -23,6 +23,16 @@ def requirements():
os.system("sudo apt-get install -y " + run_pkg)
print("\n")
def install_ibus():
print(bcolors.CYELLOW + "You need to set IBus as the default Input Method for full word-wise support and re-run this installer.\n" + bcolors.ENDC)
print("im-config -n ibus\n")
run_install = yn_choice(bcolors.CYELLOW + "Would you like to run it now? (Will require logoff and logon.)\n" + bcolors.ENDC)
if(run_install):
os.system("im-config -n ibus")
print("\n")
input("IBus has been set as the default Input Method.\nPress any key to exit and re-run after logoff & logon...")
sys.exit()
check_xbind = symbols_gui_line = cmdline("which xbindkeys").strip()
check_xdotool = symbols_gui_line = cmdline("which xdotool").strip()
@@ -41,6 +51,18 @@ if len(check_xdotool) == 0:
if runpkg != 0:
requirements()
if os.path.exists(homedir + '/.config/ibus/bus') and cmdline("ls ~/.config/ibus/bus -1rt") == "":
install_ibus()
try:
f = open("defaults.json")
except IOError:
print("defaults.json file is missing. Will exit.\n")
exit()
f.close()
try:
f = open("defaults.json")
except IOError: