From 39c40bc31518c9518ca07d7a62f42d24fe2bd613 Mon Sep 17 00:00:00 2001 From: Ben Reaves Date: Mon, 30 Mar 2020 22:43:21 -0500 Subject: [PATCH] - 3 Fixes, ibus install logic, kde-init not applying, display will always be set in systemd. --- keyswap_service.sh | 8 ++++---- setup.py | 6 ++---- 2 files changed, 6 insertions(+), 8 deletions(-) diff --git a/keyswap_service.sh b/keyswap_service.sh index 0832156..e1ba23d 100755 --- a/keyswap_service.sh +++ b/keyswap_service.sh @@ -16,10 +16,10 @@ cp ./system-config/cleanup.sh ~/.config/kinto/cleanup.sh cp ./system-config/.firefox-nw ~/.config/kinto/.firefox-nw sed -i "s/{username}/`whoami`/g" ~/.config/systemd/user/keyswap.service sed -i "s/{displayid}/`echo "$DISPLAY"`/g" ~/.config/systemd/user/keyswap.service -if [ "${#DISPLAY}" -gt 2 ] - then - sed -i "s/#Environment/Environment/g" ~/.config/systemd/user/keyswap.service -fi +# if [ "${#DISPLAY}" -gt 2 ] +# then +sed -i "s/#Environment/Environment/g" ~/.config/systemd/user/keyswap.service +# fi systemctl --user daemon-reload sed -i "s/ExecStart=/ExecStart=${swapcmd}/g" ~/.config/systemd/user/keyswap.service systemctl --user enable keyswap.timer diff --git a/setup.py b/setup.py index dc4d2c7..ec4ddec 100755 --- a/setup.py +++ b/setup.py @@ -86,11 +86,9 @@ if len(check_ibus) == 0: if runpkg != 0: requirements(pkgm) -if os.path.exists(homedir + '/.config/ibus/bus') and cmdline("ls ~/.config/ibus/bus -1rt") == "": +if not os.path.exists(homedir + '/.config/ibus/bus') and cmdline("ls ~/.config/ibus/bus -1rt") == "": install_ibus() - - try: f = open("defaults.json") except IOError: @@ -215,7 +213,7 @@ if(onetime): print(bcolors.CYELLOW + "Please enter your init tweak(s) (eg 1 or 1 2 3 - leave blank to skip): " + bcolors.ENDC) defaultinit = [int(i) for i in input().split()] if len(defaultinit) != 0: - user_config['init'] = defaultinit + user_config['init'] = [intents[defaultinit[0]-1]['id']] print("\nDynamic shortcut tweaks\n")