- Fixed Uninstaller to better location and improved it. Closes #154

This commit is contained in:
Ben Reaves
2020-05-07 12:56:56 -05:00
parent e1b3911546
commit 099b3cea88
3 changed files with 27 additions and 4 deletions

View File

@@ -70,6 +70,7 @@ def setShortcuts():
cmdline("gsettings set org.gnome.desktop.wm.keybindings switch-applications-backward \"['<Primary>F14','<Primary><Shift>F14','<Alt><Shift>Tab']\"") cmdline("gsettings set org.gnome.desktop.wm.keybindings switch-applications-backward \"['<Primary>F14','<Primary><Shift>F14','<Alt><Shift>Tab']\"")
cmdline("gsettings set org.gnome.desktop.wm.keybindings minimize \"['<Super>h','<Alt>F9']\"") cmdline("gsettings set org.gnome.desktop.wm.keybindings minimize \"['<Super>h','<Alt>F9']\"")
cmdline("gsettings set org.gnome.desktop.wm.keybindings panel-main-menu \"['<Primary><Shift>Space','<Primary>Space']\"") cmdline("gsettings set org.gnome.desktop.wm.keybindings panel-main-menu \"['<Primary><Shift>Space','<Primary>Space']\"")
cmdline("gsettings set org.gnome.mutter overlay-key ''")
if distro == "ubuntu" and dename == "gnome": if distro == "ubuntu" and dename == "gnome":
cmdline("gsettings set org.gnome.desktop.wm.keybindings switch-to-workspace-up \"['<Super>Up','<Super>Left']\"") cmdline("gsettings set org.gnome.desktop.wm.keybindings switch-to-workspace-up \"['<Super>Up','<Super>Left']\"")
cmdline("gsettings set org.gnome.desktop.wm.keybindings switch-to-workspace-down \"['<Super>Down','<Super>Right']\"") cmdline("gsettings set org.gnome.desktop.wm.keybindings switch-to-workspace-down \"['<Super>Down','<Super>Right']\"")
@@ -251,6 +252,10 @@ def Uninstall():
cmdline("gsettings reset-recursively org.gnome.desktop.wm.keybindings") cmdline("gsettings reset-recursively org.gnome.desktop.wm.keybindings")
print("gsettings reset-recursively org.gnome.mutter.keybindings") print("gsettings reset-recursively org.gnome.mutter.keybindings")
cmdline("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": elif dename == "kde":
print("Resetting DE hotkeys...\n") print("Resetting DE hotkeys...\n")
cmdline('mv ~/.config/kwinrc ~/.config/kwinrc.kinto') 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") 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("") print("")
if(kintotype == 1): if(kintotype == 1):
subprocess.check_call(shlex.split("./xkeysnail_service.sh")) subprocess.check_call(shlex.split("./xkeysnail_service.sh"))
@@ -365,6 +375,14 @@ if(kintotype == 1):
setShortcuts() setShortcuts()
exit() 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']): for index, item in enumerate(data['defaulttypes']):
ossym = "" ossym = ""
if item == "windows": if item == "windows":

View File

@@ -14,5 +14,6 @@ rm ~/.config/systemd/user/keyswap.timer
rm -rf ~/.config/autostart/kinto.desktop rm -rf ~/.config/autostart/kinto.desktop
rm -rf ~/.config/kinto rm -rf ~/.config/kinto
rm -rf ~/.xkb rm -rf ~/.xkb
systemctl daemon-reload sudo systemctl daemon-reload
sed -i '/xkb/d' ~/.Xsession 2>/dev/null sed -i '/xkb/d' ~/.Xsession 2>/dev/null
exit 0

View File

@@ -27,6 +27,10 @@ function uninstall {
gsettings reset-recursively org.gnome.desktop.wm.keybindings gsettings reset-recursively org.gnome.desktop.wm.keybindings
echo "gsettings reset-recursively org.gnome.mutter.keybindings" echo "gsettings reset-recursively org.gnome.mutter.keybindings"
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 elif [ "$dename" == "kde" ];then
echo "Resetting DE hotkeys..." echo "Resetting DE hotkeys..."
mv ~/.config/kwinrc ~/.config/kwinrc.kinto mv ~/.config/kwinrc ~/.config/kwinrc.kinto
@@ -73,7 +77,7 @@ if [ $# -eq 0 ]; then
echo " 1) Windows & Mac (HID driver)" echo " 1) Windows & Mac (HID driver)"
echo " 2) Mac Only & VMs on Macbooks" echo " 2) Mac Only & VMs on Macbooks"
echo " 3) Chromebook" echo " 3) Chromebook"
echo " 4) Uninstall" # echo " 4) Uninstall"
read n read n