mirror of
https://github.com/rbreaves/kinto.git
synced 2025-08-02 00:56: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()
|
sys.exit()
|
||||||
|
|
||||||
def windows_setup():
|
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):
|
for index, item in enumerate(keymaps):
|
||||||
print(" %i. %s" % (index+1, item.capitalize()))
|
print(" %i. %s" % (index+1, item.capitalize()))
|
||||||
default = 0
|
default = 0
|
||||||
@@ -53,15 +53,20 @@ def windows_setup():
|
|||||||
os.system("regedit " + path + "\\windows\\standard_ctrlalt_swap.reg")
|
os.system("regedit " + path + "\\windows\\standard_ctrlalt_swap.reg")
|
||||||
elif default == 4:
|
elif default == 4:
|
||||||
os.system("regedit " + path + "\\windows\\standard_ctrlalt_capsesc_swap.reg")
|
os.system("regedit " + path + "\\windows\\standard_ctrlalt_capsesc_swap.reg")
|
||||||
print("Will now install chocolatey and autohotkey with elevated privileges...")
|
elif default == 5:
|
||||||
print("This install will fail if you are not running with elevated privileges")
|
os.system("regedit " + path + "\\windows\\remove_keyswap.reg")
|
||||||
os.system('powershell -executionpolicy bypass ".\\windows\\autohotkey.ps1"')
|
if default > 0 and default < 5:
|
||||||
print("\nWill now install Ubuntu Terminal Theme as default...")
|
print("Will now install chocolatey and autohotkey with elevated privileges...")
|
||||||
os.system("regedit " + path + "\\windows\\theme_ubuntu.reg")
|
print("This install will fail if you are not running with elevated privileges")
|
||||||
print("Copying autohotkey combinations for Terminals & Editors...")
|
os.system('powershell -executionpolicy bypass ".\\windows\\autohotkey.ps1"')
|
||||||
os.system("copy /Y " + path + "\\windows\\kinto.ahk \"C:\\ProgramData\\Microsoft\\Windows\\Start Menu\\Programs\\StartUp\\kinto.ahk\"")
|
print("\nWill now install Ubuntu Terminal Theme as default...")
|
||||||
print("\nPlease log off and back on for changes to take full effect.")
|
os.system("regedit " + path + "\\windows\\theme_ubuntu.reg")
|
||||||
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.")
|
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()
|
# check_x11 = cmdline("env | grep -i x11").strip()
|
||||||
|
@@ -1,3 +1,4 @@
|
|||||||
Windows Registry Editor Version 5.00
|
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