mirror of
https://github.com/rbreaves/kinto.git
synced 2025-07-31 16:26:39 +02:00
Merge pull request #97 from rbreaves/hotfix
- Added uninstall option for Windows
This commit is contained in:
25
setup.py
25
setup.py
@@ -37,7 +37,7 @@ def install_ibus():
|
||||
sys.exit()
|
||||
|
||||
def windows_setup():
|
||||
keymaps = ["Apple keyboard standard", "Apple keyboard w/ Caps lock as Esc", "Windows keyboard standard", "Windows keyboard w/ Caps lock as Esc"]
|
||||
keymaps = ["Apple keyboard standard", "Apple keyboard w/ Caps lock as Esc", "Windows keyboard standard", "Windows keyboard w/ Caps lock as Esc","Uninstall"]
|
||||
for index, item in enumerate(keymaps):
|
||||
print(" %i. %s" % (index+1, item.capitalize()))
|
||||
default = 0
|
||||
@@ -53,15 +53,20 @@ def windows_setup():
|
||||
os.system("regedit " + path + "\\windows\\standard_ctrlalt_swap.reg")
|
||||
elif default == 4:
|
||||
os.system("regedit " + path + "\\windows\\standard_ctrlalt_capsesc_swap.reg")
|
||||
print("Will now install chocolatey and autohotkey with elevated privileges...")
|
||||
print("This install will fail if you are not running with elevated privileges")
|
||||
os.system('powershell -executionpolicy bypass ".\\windows\\autohotkey.ps1"')
|
||||
print("\nWill now install Ubuntu Terminal Theme as default...")
|
||||
os.system("regedit " + path + "\\windows\\theme_ubuntu.reg")
|
||||
print("Copying autohotkey combinations for Terminals & Editors...")
|
||||
os.system("copy /Y " + path + "\\windows\\kinto.ahk \"C:\\ProgramData\\Microsoft\\Windows\\Start Menu\\Programs\\StartUp\\kinto.ahk\"")
|
||||
print("\nPlease log off and back on for changes to take full effect.")
|
||||
print("If using WSL then please remember to right click on title bar -> Properties -> Edit Options -> Use Ctrl+Shift+C/V as Copy/Paste and enable it.")
|
||||
elif default == 5:
|
||||
os.system("regedit " + path + "\\windows\\remove_keyswap.reg")
|
||||
if default > 0 and default < 5:
|
||||
print("Will now install chocolatey and autohotkey with elevated privileges...")
|
||||
print("This install will fail if you are not running with elevated privileges")
|
||||
os.system('powershell -executionpolicy bypass ".\\windows\\autohotkey.ps1"')
|
||||
print("\nWill now install Ubuntu Terminal Theme as default...")
|
||||
os.system("regedit " + path + "\\windows\\theme_ubuntu.reg")
|
||||
print("Copying autohotkey combinations for Terminals & Editors...")
|
||||
os.system("copy /Y " + path + "\\windows\\kinto.ahk \"C:\\ProgramData\\Microsoft\\Windows\\Start Menu\\Programs\\StartUp\\kinto.ahk\"")
|
||||
print("\nPlease log off and back on for changes to take full effect.")
|
||||
print("If using WSL then please remember to right click on title bar -> Properties -> Edit Options -> Use Ctrl+Shift+C/V as Copy/Paste and enable it.")
|
||||
else:
|
||||
os.system("del \"C:\\ProgramData\\Microsoft\\Windows\\Start Menu\\Programs\\StartUp\\kinto.ahk\"")
|
||||
|
||||
|
||||
# check_x11 = cmdline("env | grep -i x11").strip()
|
||||
|
@@ -1,3 +1,4 @@
|
||||
Windows Registry Editor Version 5.00
|
||||
|
||||
[-HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Keyboard Layout\Scancode Map]
|
||||
[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Keyboard Layout]
|
||||
"Scancode Map"=-
|
Reference in New Issue
Block a user