From 029d83ad5b2f3d84db800065e437428f0125674a Mon Sep 17 00:00:00 2001 From: Ben Reaves Date: Wed, 6 May 2020 11:40:27 -0500 Subject: [PATCH 1/4] - Added alacritty support for xkeysnail --- xkeysnail-config/kinto.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/xkeysnail-config/kinto.py b/xkeysnail-config/kinto.py index 5f2d3cb..2567ddf 100644 --- a/xkeysnail-config/kinto.py +++ b/xkeysnail-config/kinto.py @@ -3,7 +3,7 @@ import re from xkeysnail.transform import * -terminals = ["gnome-terminal","konsole","io.elementary.terminal","terminator","sakura","guake","tilda","xterm","eterm","kitty"] +terminals = ["gnome-terminal","konsole","io.elementary.terminal","terminator","sakura","guake","tilda","xterm","eterm","kitty","alacritty"] terminals = [term.casefold() for term in terminals] termStr = "|".join(str(x) for x in terminals) From 7bf3ccdda3052d57188be716e9605ad7f97b59ff Mon Sep 17 00:00:00 2001 From: Ben Reaves Date: Wed, 6 May 2020 12:08:46 -0500 Subject: [PATCH 2/4] - Added alacritty support for kintox11 --- user_config.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/user_config.json b/user_config.json index ba995ac..b9a9e13 100644 --- a/user_config.json +++ b/user_config.json @@ -16,7 +16,7 @@ "symbols":"", "types":"", "de":[], - "appnames":[ "Gnome-terminal","konsole","io.elementary.terminal","terminator","sakura","guake","tilda","xterm","eterm","kitty" ] + "appnames":[ "Gnome-terminal","konsole","io.elementary.terminal","terminator","sakura","guake","tilda","xterm","eterm","kitty","alacritty" ] }, { "name": "firefox", @@ -73,4 +73,4 @@ "run_term":"", "run_gui":"" }] -} \ No newline at end of file +} From e1b39115460bc6c5a748ea18a5530b734a6bcf0e Mon Sep 17 00:00:00 2001 From: Ben Reaves Date: Wed, 6 May 2020 12:17:26 -0500 Subject: [PATCH 3/4] - Added terminal tab switching for kitty --- xkeysnail-config/kinto.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/xkeysnail-config/kinto.py b/xkeysnail-config/kinto.py index 2567ddf..4788038 100644 --- a/xkeysnail-config/kinto.py +++ b/xkeysnail-config/kinto.py @@ -220,7 +220,7 @@ define_keymap(re.compile("konsole", re.IGNORECASE),{ }, "Konsole tab switching") -define_keymap(re.compile("Io.elementary.terminal", re.IGNORECASE),{ +define_keymap(re.compile("Io.elementary.terminal|kitty", re.IGNORECASE),{ # Ctrl Tab - In App Tab Switching K("LC-Tab") : K("LC-Shift-Right"), K("LC-Shift-Tab") : K("LC-Shift-Left"), From 099b3cea8836cf90772a11466d27c15899ce2fe2 Mon Sep 17 00:00:00 2001 From: Ben Reaves Date: Thu, 7 May 2020 12:56:56 -0500 Subject: [PATCH 4/4] - Fixed Uninstaller to better location and improved it. Closes #154 --- setup.py | 20 +++++++++++++++++++- uninstall.sh | 5 +++-- xkeysnail_service.sh | 6 +++++- 3 files changed, 27 insertions(+), 4 deletions(-) diff --git a/setup.py b/setup.py index 2c94422..e12d352 100755 --- a/setup.py +++ b/setup.py @@ -70,6 +70,7 @@ def setShortcuts(): cmdline("gsettings set org.gnome.desktop.wm.keybindings switch-applications-backward \"['F14','F14','Tab']\"") cmdline("gsettings set org.gnome.desktop.wm.keybindings minimize \"['h','F9']\"") cmdline("gsettings set org.gnome.desktop.wm.keybindings panel-main-menu \"['Space','Space']\"") + cmdline("gsettings set org.gnome.mutter overlay-key ''") if distro == "ubuntu" and dename == "gnome": cmdline("gsettings set org.gnome.desktop.wm.keybindings switch-to-workspace-up \"['Up','Left']\"") cmdline("gsettings set org.gnome.desktop.wm.keybindings switch-to-workspace-down \"['Down','Right']\"") @@ -251,6 +252,10 @@ def Uninstall(): cmdline("gsettings reset-recursively org.gnome.desktop.wm.keybindings") print("gsettings reset-recursively org.gnome.mutter.keybindings") cmdline("gsettings reset-recursively org.gnome.mutter.keybindings") + print("gsettings set org.gnome.mutter overlay-key 'super'") + cmdline("gsettings set org.gnome.mutter overlay-key 'super'") + cmdline('dconf dump /org/gnome/mutter/ > mutter.conf') + cmdline('dconf load /org/gnome/mutter/ < mutter.conf') elif dename == "kde": print("Resetting DE hotkeys...\n") cmdline('mv ~/.config/kwinrc ~/.config/kwinrc.kinto') @@ -357,7 +362,12 @@ color_arr = [bcolors.CBEIGE,bcolors.CRED2,bcolors.CGREEN,bcolors.CYELLOW ] print("\nKinto - Type in Linux like it's a Mac.\n") -kintotype = int(input(color_arr[2] + "1) Kinto - xkeysnail (udev/x11) - Recommended\n" + color_arr[0] + "2) Kinto - Original xkb/x11 implementation\n\n" + bcolors.ENDC)) +kintotype = int(input(color_arr[2] + + "1) Kinto - xkeysnail (udev/x11) - Recommended\n" + color_arr[0] + + "2) Kinto - Original xkb/x11 implementation\n" + color_arr[3] + + "3) Uninstall Kinto - xkeysnail\n" + + "4) Uninstall Kinto - Original xkb\n\n" + + bcolors.ENDC)) print("") if(kintotype == 1): subprocess.check_call(shlex.split("./xkeysnail_service.sh")) @@ -365,6 +375,14 @@ if(kintotype == 1): setShortcuts() exit() +if(kintotype == 3): + subprocess.check_call(shlex.split("./xkeysnail_service.sh uninstall")) + exit() + +if(kintotype == 4): + Uninstall() + exit() + for index, item in enumerate(data['defaulttypes']): ossym = "" if item == "windows": diff --git a/uninstall.sh b/uninstall.sh index 6a62058..3cd3d63 100755 --- a/uninstall.sh +++ b/uninstall.sh @@ -14,5 +14,6 @@ rm ~/.config/systemd/user/keyswap.timer rm -rf ~/.config/autostart/kinto.desktop rm -rf ~/.config/kinto rm -rf ~/.xkb -systemctl daemon-reload -sed -i '/xkb/d' ~/.Xsession 2>/dev/null \ No newline at end of file +sudo systemctl daemon-reload +sed -i '/xkb/d' ~/.Xsession 2>/dev/null +exit 0 \ No newline at end of file diff --git a/xkeysnail_service.sh b/xkeysnail_service.sh index e9ea046..5b67424 100755 --- a/xkeysnail_service.sh +++ b/xkeysnail_service.sh @@ -27,6 +27,10 @@ function uninstall { gsettings reset-recursively org.gnome.desktop.wm.keybindings echo "gsettings reset-recursively org.gnome.mutter.keybindings" gsettings reset-recursively org.gnome.mutter.keybindings + echo "gsettings set org.gnome.mutter overlay-key 'super'" + gsettings set org.gnome.mutter overlay-key 'super' + dconf dump /org/gnome/mutter/ > mutter.conf + dconf load /org/gnome/mutter/ < mutter.conf elif [ "$dename" == "kde" ];then echo "Resetting DE hotkeys..." mv ~/.config/kwinrc ~/.config/kwinrc.kinto @@ -73,7 +77,7 @@ if [ $# -eq 0 ]; then echo " 1) Windows & Mac (HID driver)" echo " 2) Mac Only & VMs on Macbooks" echo " 3) Chromebook" - echo " 4) Uninstall" + # echo " 4) Uninstall" read n