From e67f8964a196e04b218568fbc72dc9a2332157be Mon Sep 17 00:00:00 2001 From: Ben Reaves Date: Thu, 22 Oct 2020 19:33:03 -0500 Subject: [PATCH] - Fixed budgie uninstaller and confirmed SL hotkeys --- setup.py | 14 -------------- uninstall.sh | 19 ------------------- xkeysnail-config/kinto.py | 31 +++++++++++++++---------------- xkeysnail_service.sh | 6 +++--- 4 files changed, 18 insertions(+), 52 deletions(-) delete mode 100755 uninstall.sh diff --git a/setup.py b/setup.py index c3c5117..fdf6720 100755 --- a/setup.py +++ b/setup.py @@ -131,18 +131,4 @@ if args.uninstall: subprocess.check_call(shlex.split("./xkeysnail_service.sh")) -# kintotype = int(input(color_arr[2] + -# "1) Kinto \n" + color_arr[0] + -# "2) Uninstall Kinto \n" -# + bcolors.ENDC)) -# print("") -# if(kintotype == 1): -# subprocess.check_call(shlex.split("./xkeysnail_service.sh")) -# # if os.path.isdir(homedir + "/.config/kinto") == True: -# # subprocess.check_call(shlex.split("./xkeysnail_service.sh budgieUpdate")) -# # exit() - -# if(kintotype == 2): -# subprocess.check_call(shlex.split("./xkeysnail_service.sh uninstall")) -# exit() diff --git a/uninstall.sh b/uninstall.sh deleted file mode 100755 index 8019cf6..0000000 --- a/uninstall.sh +++ /dev/null @@ -1,19 +0,0 @@ -#!/bin/bash -# Undo Apple keyboard cmd & alt swap -if test -f "/sys/module/hid_apple/parameters/swap_opt_cmd" && [ `cat /sys/module/hid_apple/parameters/swap_opt_cmd` == "1" ]; then - echo '0' | sudo tee /sys/module/hid_apple/parameters/swap_opt_cmd - echo 'options hid_apple swap_opt_cmd=0' | sudo tee /etc/modprobe.d/hid_apple.conf - sudo update-initramfs -u -k all -fi -systemctl --user stop keyswap 2>/dev/null -systemctl --user disable keyswap -systemctl --user stop keyswap.timer 2>/dev/null -systemctl --user disable keyswap.timer -rm ~/.config/systemd/user/keyswap.service -rm ~/.config/systemd/user/keyswap.timer -rm -rf ~/.config/autostart/kinto.desktop -rm -rf ~/.config/kinto -rm -rf ~/.xkb -sudo systemctl daemon-reload -sed -i '/xkb/d' ~/.Xsession 2>/dev/null -exit 0 \ No newline at end of file diff --git a/xkeysnail-config/kinto.py b/xkeysnail-config/kinto.py index 38c1e05..f87fba6 100644 --- a/xkeysnail-config/kinto.py +++ b/xkeysnail-config/kinto.py @@ -202,34 +202,33 @@ define_keymap(re.compile(browserStr, re.IGNORECASE),{ }) define_keymap(None,{ - # K("RC-Space"): K("Alt-F1"), # gnome/kde - Launch Application Menu + K("RC-Space"): K("Alt-F1"), # Default SL - Launch Application Menu (gnome/kde) + K("RC-F3"):K("Super-d"), # Default SL - Show Desktop (gnome/kde,eos) + K("RC-LC-f"):K("M-F10"), # Default SL - Maximize app (gnome/kde) + K("Super-Right"):K("C-M-Right"), # Default SL - Change workspace (ubuntu/fedora/budgie) + K("Super-Left"):K("C-M-Left"), # Default SL - Change workspace (ubuntu/fedora/budgie) + K("RC-Q"): K("M-F4"), # Default SL - not-popos + K("RC-H"):K("Super-h"), # Default SL - Minimize app (gnome/budgie) + K("M-Tab"): pass_through_key, # Default not-xfce4 - Cmd Tab - App Switching Default + K("RC-Tab"): K("M-Tab"), # Default not-xfce4 - Cmd Tab - App Switching Default + K("RC-Shift-Tab"): K("M-Shift-Tab"), # Default not-xfce4 - Cmd Tab - App Switching Default + K("RC-Grave"): K("M-Grave"), # Default not-xfce4 - Cmd ` - Same App Switching + K("RC-Shift-Grave"): K("M-Grave"), # Default not-xfce4 - Cmd ` - Same App Switching # K("RC-Space"): K("LC-Esc"), # xfce4 - Launch Application Menu - # K("RC-F3"):K("Super-d"), # gnome/kde - Show Desktop # K("RC-F3"):K("C-M-d"), # xfce4 - Show Desktop - # K("RC-F3"):K("Super-d"), # eos - Show Desktop - # K("RC-LC-f"):K("M-F10"), # gnome/kde - Maximize app # K("RC-LC-f"):K("LC-Super-Up"), # popos - Maximize app # K("RC-LC-f"):K("Super-Up"), # eos - Maximize app # K("RC-LC-f"):K("Super-PAGE_UP"), # manjaro - Maximize app # K("LC-Left"):K("C-M-End"), # xfce4 - Change workspace - # K("LC-Left"):K("C-M-Left"), # ub/fd - Change workspace # K("LC-Left"):K("Super-Left"), # popos/eos - Change workspace # K("LC-Right"):K("C-M-Home"), # xfce4 - Change workspace - # K("LC-Right"):K("C-M-Right"), # ub/fd - Change workspace # K("LC-Right"):K("Super-Right"), # popos/eos - Change workspace # Basic App hotkey functions - K("RC-Q"): K("M-F4"), # Default not-popos # K("RC-Q"):K("Super-w"), # popos - Close Apps - K("RC-H"): K("M-F9"), # Default - Minimize app + # K("RC-H"): K("M-F9"), # Default - Minimize app # K("RC-H"):K("M-F9"), # xfce4 - Minimize app - # K("RC-H"):K("Super-h"), # gnome - Minimize app # K("RC-LC-f"):K("Super-PAGE_DOWN"), # manjaro - Minimize app # Cmd Tab - App Switching Default - K("M-Tab"): pass_through_key, # Default not-xfce4 - K("RC-Tab"): K("M-Tab"), # Default not-xfce4 - K("RC-Shift-Tab"): K("M-Shift-Tab"), # Default not-xfce4 - K("RC-Grave"): K("M-F6"), # Default not-xfce4 - K("RC-Shift-Grave"): K("M-Shift-F6"), # Default not-xfce4 # K("RC-Tab"): K("RC-backslash"), # xfce4 # K("RC-Shift-Tab"): K("RC-Shift-backslash"), # xfce4 # K("RC-Grave"): K("RC-Shift-backslash"), # xfce4 @@ -258,8 +257,8 @@ define_keymap(None,{ # K("M-Backspace"): K("Delete"), # Chromebook/IBM - Delete K("Super-Backspace"): K("C-Backspace"), # Default not-chromebook - Delete Left Word of Cursor K("Super-Delete"): K("C-Delete"), # Default not-chromebook - Delete Right Word of Cursor - K("Alt-Backspace"): K("C-Backspace"), # Default not-chromebook - Delete Left Word of Cursor - K("Alt-Delete"): K("C-Delete"), # Default not-chromebook - Delete Right Word of Cursor + K("Alt-Backspace"): K("C-Backspace"), # Default not-chromebook - Delete Left Word of Cursor + K("Alt-Delete"): K("C-Delete"), # Default not-chromebook - Delete Right Word of Cursor # K(""): pass_through_key, # cancel # K(""): K(""), # }) diff --git a/xkeysnail_service.sh b/xkeysnail_service.sh index 30a1d6f..8509722 100755 --- a/xkeysnail_service.sh +++ b/xkeysnail_service.sh @@ -21,7 +21,7 @@ function uninstall { if [ "$yn" == "f" ];then echo "Reset to factory shortcuts" - if [ "$dename" == "gnome" ];then + if [[ $dename == "gnome" || $dename == "budgie" ]];then echo "Resetting DE hotkeys..." echo "gsettings reset-recursively org.gnome.desktop.wm.keybindings" gsettings reset-recursively org.gnome.desktop.wm.keybindings @@ -41,7 +41,7 @@ function uninstall { fi elif [ "$yn" == "r" ]; then echo "Restore original user shortcuts" - if [ "$dename" == "gnome" ]; then + if [[ $dename == "gnome" || $dename == "budgie" ]]; then echo "Restoring DE hotkeys..." wmkeys=$(ls | grep -m1 "keybinding") mutterkeys=$(ls | grep -m1 "mutter_") @@ -273,7 +273,7 @@ sed -i "s#{homedir}#`echo "$HOME"`#g" ~/.config/kinto/xkeysnail.desktop sed -i "s/{displayid}/`echo "$DISPLAY"`/g" ./xkeysnail-config/xkeysnail.service.new # sed -i "s/{displayid}/`echo "$DISPLAY"`/g" ~/.config/kinto/prexk.sh -if [[ $dename == "gnome" || dename == "budgie" ]]; then +if [[ $dename == "gnome" || $dename == "budgie" ]]; then perl -pi -e "s/(# )(.*)(# gnome)/\$2\$3/g" ./xkeysnail-config/kinto.py.new >/dev/null 2>&1 fi if [[ $dename == "kde" ]]; then