mirror of
https://github.com/rbreaves/kinto.git
synced 2025-08-01 16:56:38 +02:00
- Added Windows 10 Support
This commit is contained in:
37
setup.py
37
setup.py
@@ -36,12 +36,45 @@ def install_ibus():
|
||||
input("IBus has been set as the default Input Method.\nPress any key to exit and re-run after logoff & logon...")
|
||||
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"]
|
||||
for index, item in enumerate(keymaps):
|
||||
print(" %i. %s" % (index+1, item.capitalize()))
|
||||
default = 0
|
||||
while not int(default) in range(1,len(keymaps)+1):
|
||||
default = int(input("\nPlease enter your desired keymap (1 - " + str(len(keymaps)) + ") : "))
|
||||
print("")
|
||||
path= cmdline('echo %cd%')[:-1]
|
||||
if default == 1:
|
||||
os.system("regedit " + path + "\\windows\\macbook_winctrl_swap.reg")
|
||||
elif default == 2:
|
||||
os.system("regedit " + path + "\\windows\\macbook_winctrl_capsesc_swap.reg")
|
||||
elif default == 3:
|
||||
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.")
|
||||
|
||||
|
||||
# check_x11 = cmdline("env | grep -i x11").strip()
|
||||
check_x11 = cmdline("env | grep -i x11 || loginctl show-session \"$XDG_SESSION_ID\" -p Type | awk -F= '{print $2}'").strip()
|
||||
|
||||
if len(check_x11) == 0:
|
||||
print("You are not using x11, please logout and back in using x11/Xorg")
|
||||
sys.exit()
|
||||
if os.name != 'nt':
|
||||
print("You are not using x11, please logout and back in using x11/Xorg")
|
||||
sys.exit()
|
||||
else:
|
||||
print("You are detected as running Windows.")
|
||||
windows_setup()
|
||||
sys.exit()
|
||||
|
||||
check_xbind = cmdline("which xbindkeys 2>/dev/null").strip()
|
||||
check_xdotool = cmdline("which xdotool 2>/dev/null").strip()
|
||||
|
12
windows/autohotkey.ps1
Normal file
12
windows/autohotkey.ps1
Normal file
@@ -0,0 +1,12 @@
|
||||
$testchoco = powershell choco -v
|
||||
if(-not($testchoco)){
|
||||
Write-Output "Seems Chocolatey is not installed, installing now"
|
||||
Set-ExecutionPolicy Bypass -Scope Process -Force; iex ((New-Object System.Net.WebClient).DownloadString('https://chocolatey.org/install.ps1'))
|
||||
}
|
||||
else{
|
||||
Write-Output "Chocolatey Version $testchoco is already installed"
|
||||
}
|
||||
|
||||
if(-not(test-path "C:\Program Files\AutoHotkey\AutoHotkey.exe")){
|
||||
choco install autohotkey.install
|
||||
}
|
@@ -1,15 +1,30 @@
|
||||
#IfWinActive ahk_exe sublime_text.exe
|
||||
; Remap Ctrl+Shift to behave like macOS Sublimetext
|
||||
; Will extend cursor to multiple lines
|
||||
#+Up::send {shift up}^!{Up}
|
||||
#+Down::send {shift up}^!{Down}
|
||||
|
||||
; Remap Ctrl+Cmd+G to select all matches
|
||||
#^g::send !{F3}
|
||||
#If
|
||||
|
||||
#IfWinActive ahk_exe ubuntu.exe
|
||||
^c::Send {LCtrl down}{LShift down}c{LCtrl Up}{LShift Up}
|
||||
#c::Send {LCtrl down}c{LCtrl Up}
|
||||
#x::Send {LCtrl down}x{LCtrl Up}
|
||||
#o::Send {LCtrl down}o{LCtrl Up}
|
||||
#r::Send {LCtrl down}r{LCtrl Up}
|
||||
#w::Send {LCtrl down}w{LCtrl Up}
|
||||
#\::Send {LCtrl down}\{LCtrl Up}
|
||||
#k::Send {LCtrl down}k{LCtrl Up}
|
||||
#u::Send {LCtrl down}u{LCtrl Up}
|
||||
#j::Send {LCtrl down}j{LCtrl Up}
|
||||
#t::Send {LCtrl down}t{LCtrl Up}
|
||||
#_::Send {LCtrl down}_{LCtrl Up}
|
||||
^v::Send {LCtrl down}{LShift down}v{LCtrl Up}{LShift Up}
|
||||
^c::Send {LCtrl down}{LShift down}c{LCtrl Up}{LShift Up}
|
||||
#c::Send {LCtrl down}c{LCtrl Up}
|
||||
#x::Send {LCtrl down}x{LCtrl Up}
|
||||
#o::Send {LCtrl down}o{LCtrl Up}
|
||||
#r::Send {LCtrl down}r{LCtrl Up}
|
||||
#w::Send {LCtrl down}w{LCtrl Up}
|
||||
#\::Send {LCtrl down}\{LCtrl Up}
|
||||
#k::Send {LCtrl down}k{LCtrl Up}
|
||||
#u::Send {LCtrl down}u{LCtrl Up}
|
||||
#j::Send {LCtrl down}j{LCtrl Up}
|
||||
#t::Send {LCtrl down}t{LCtrl Up}
|
||||
#_::Send {LCtrl down}_{LCtrl Up}
|
||||
^v::Send {LCtrl down}{LShift down}v{LCtrl Up}{LShift Up}
|
||||
#If
|
||||
|
||||
#IfWinActive ahk_exe powershell.exe
|
||||
^c::Send {LCtrl down}{LShift down}c{LCtrl Up}{LShift Up}
|
||||
#c::Send {LCtrl down}c{LCtrl Up}
|
||||
#If
|
BIN
windows/theme_campbell.reg
Normal file
BIN
windows/theme_campbell.reg
Normal file
Binary file not shown.
BIN
windows/theme_legacy.reg
Normal file
BIN
windows/theme_legacy.reg
Normal file
Binary file not shown.
BIN
windows/theme_onehalfdark.reg
Normal file
BIN
windows/theme_onehalfdark.reg
Normal file
Binary file not shown.
BIN
windows/theme_onehalflight.reg
Normal file
BIN
windows/theme_onehalflight.reg
Normal file
Binary file not shown.
BIN
windows/theme_ubuntu.reg
Normal file
BIN
windows/theme_ubuntu.reg
Normal file
Binary file not shown.
Reference in New Issue
Block a user