mirror of
https://github.com/rbreaves/kinto.git
synced 2025-08-02 17:16:39 +02:00
Compare commits
83 Commits
Author | SHA1 | Date | |
---|---|---|---|
![]() |
efe01c94d4 | ||
![]() |
0a5c526941 | ||
![]() |
0c7ca8586b | ||
![]() |
b1c361080a | ||
![]() |
b1d5aa68f3 | ||
![]() |
4dd1c26563 | ||
![]() |
c38cccdb44 | ||
![]() |
558e86dd78 | ||
![]() |
463730fe1b | ||
![]() |
be0f2e67bb | ||
![]() |
2270ea5d0d | ||
![]() |
7e69d6c03f | ||
![]() |
6f83fafc66 | ||
![]() |
eab147bd88 | ||
![]() |
c4dcd3febc | ||
![]() |
7c289b7d0c | ||
![]() |
48ef1c596a | ||
![]() |
8c677e8ef0 | ||
![]() |
bd8ea9c4e1 | ||
![]() |
9df95e8b8d | ||
![]() |
e654929d1e | ||
![]() |
f1b37a8cbd | ||
![]() |
f922caff78 | ||
![]() |
68173fb5b6 | ||
![]() |
53f320e0b9 | ||
![]() |
dfec4f7eb1 | ||
![]() |
1fb5bf2a4b | ||
![]() |
656e2fafc9 | ||
![]() |
3af5eb286d | ||
![]() |
3945d5c29e | ||
![]() |
afefc5b0f1 | ||
![]() |
b66f2c591a | ||
![]() |
e12c51f98f | ||
![]() |
8690436629 | ||
![]() |
0eadd9b3a4 | ||
![]() |
1d6d367c39 | ||
![]() |
1e46a4dc74 | ||
![]() |
7aeb3dc44c | ||
![]() |
6968e08f2f | ||
![]() |
40ea2b6175 | ||
![]() |
367d55b04b | ||
![]() |
2864ae409a | ||
![]() |
e477848b59 | ||
![]() |
26dacc7984 | ||
![]() |
a3d8ac782a | ||
![]() |
acd0b8031e | ||
![]() |
9543eba753 | ||
![]() |
738aee9465 | ||
![]() |
dc826b8454 | ||
![]() |
8bd6ed242f | ||
![]() |
d96e238550 | ||
![]() |
e1948dcb08 | ||
![]() |
7e0680ff75 | ||
![]() |
a46bb911c9 | ||
![]() |
f4cad2a1e3 | ||
![]() |
ba10ff6ced | ||
![]() |
089fe469a5 | ||
![]() |
f39323071a | ||
![]() |
85d6653261 | ||
![]() |
c7c063ada5 | ||
![]() |
6a866dec54 | ||
![]() |
d52d8cc34f | ||
![]() |
70774c3431 | ||
![]() |
da22daf1f3 | ||
![]() |
918f4bbf94 | ||
![]() |
065dad7ce3 | ||
![]() |
032c317c7e | ||
![]() |
80735aefaa | ||
![]() |
39bd27ec25 | ||
![]() |
f57b02849a | ||
![]() |
da98afe154 | ||
![]() |
bbb1429c8e | ||
![]() |
9a1e66620b | ||
![]() |
d527347bdc | ||
![]() |
efc772d687 | ||
![]() |
7fcd94fda5 | ||
![]() |
5a46aad268 | ||
![]() |
c66dcbca9a | ||
![]() |
72bedf856d | ||
![]() |
3d9d2524a2 | ||
![]() |
8848f8cbea | ||
![]() |
f5318c9807 | ||
![]() |
de42816a01 |
129
README.md
129
README.md
@@ -13,11 +13,15 @@ Seamless copy and paste with all apps and terminals. The zero effort solution.
|
|||||||
|
|
||||||
[What does this do exactly?](#What-does-this-do-exactly)
|
[What does this do exactly?](#What-does-this-do-exactly)
|
||||||
|
|
||||||
|
[What's different from other remappers?](#Whats-different)
|
||||||
|
|
||||||
[What does Kinto require?](#What-does-Kinto-require)
|
[What does Kinto require?](#What-does-Kinto-require)
|
||||||
|
|
||||||
[How to install](#How-to-install)
|
[How to install (Linux)](#How-to-install-Linux)
|
||||||
|
|
||||||
[Shortcut Creation (Xkeysnail)](#Shortcut-Creation-Xkeysnail)
|
[How to install (Windows)](#How-to-install-Windows)
|
||||||
|
|
||||||
|
[Shortcut Creation](#Shortcut-Creation)
|
||||||
|
|
||||||
[Other Notes Related to Install](#Other-Notes-Related-to-Install)
|
[Other Notes Related to Install](#Other-Notes-Related-to-Install)
|
||||||
|
|
||||||
@@ -55,13 +59,19 @@ Kinto works for standard Windows, Apple and Chromebook keyboards. The following
|
|||||||
|---|---|---|---|---|
|
|---|---|---|---|---|
|
||||||
|**Virtual**| LCtrl | Alt | RCtrl |Spacebar|
|
|**Virtual**| LCtrl | Alt | RCtrl |Spacebar|
|
||||||
|
|
||||||
Does Kinto have to have specific keymaps for individual apps?
|
## What's different?
|
||||||
|
|
||||||
I'd say 90+% of the time no, but every OS has their default conventions that sometimes run afoul to macs. For this reason you can easily edit kinto.py or kinto.ahk to support the few shortcut keys Kinto may miss. If you do add additional support please consider forking this project and sharing your new keymaps with the rest of us!
|
Compared to most other remappers ***this is a complete system-wide remap of your base level modifier keys***, this saves time. You're not going to die a death of a thousand papercuts from trying to support every shortcut key under the sun.
|
||||||
|
|
||||||
|
It also retains some of the most commonly used system level shortcut keys, such as Cmd-C/V, Cmd-Tab, and Ctrl-Tab among others. You will keep seamless copy & paste between all apps, ability to switch Windows while still using the physical Cmd/Alt key position; switch tabs in your favorite terminals, code editors, or web browsers. Depending on your OS and/or Desktop Environment you may also be able to switch Virtual Desktop environments the same way as well and other basic system level shortcuts.
|
||||||
|
|
||||||
|
If your OS and macOS have similar functionality on the system level, but only differ by a slight difference of a shortcut command then Kinto likely supports it already. If Kinto doesn't have what you need then you can open up a support ticket and it will be added. You can also fork the project to add the fix and I will merge it via a PR you make.
|
||||||
|
|
||||||
|
Additionally, if you are using a cross-platform app and if it happens to have a few shortcut keys that differ then that can very easily be added to either the kinto.py or kinto.ahk configuration files which on Windows is located here `~/.kinto/kinto.ahk` and on Linux it can be found here `~/.config/kinto/kinto.py`. More info can be found here [Shortcut Creation (Xkeysnail)](#Shortcut-Creation-Xkeysnail) for Linux.
|
||||||
|
|
||||||
## What does Kinto require?
|
## What does Kinto require?
|
||||||
|
|
||||||
- Python (initial install only)
|
- Python
|
||||||
- systemd
|
- systemd
|
||||||
- x11
|
- x11
|
||||||
- IBus*
|
- IBus*
|
||||||
@@ -69,37 +79,39 @@ I'd say 90+% of the time no, but every OS has their default conventions that som
|
|||||||
- Fedora/RHEL (may not work w/ xkeysnail, but original xkb version does)
|
- Fedora/RHEL (may not work w/ xkeysnail, but original xkb version does)
|
||||||
- xkeysnail (Recommended, but optional)
|
- xkeysnail (Recommended, but optional)
|
||||||
|
|
||||||
|
Note: Budgie DE's, so Ubuntu Budgie, appears to have a bug where keybinds may not save across reboots. Please reset the Cmd+Tab keymap before rebooting to ensure it remembers that setting. I will remove this once the issue is resolved.
|
||||||
|
|
||||||
*IBus is needed to support wordwise during browser app usage as the keymap will need to change slightly depending if the cursor/caret is on screen waiting for input. Setup.py will set it but you can manually set it as well or check your current Input Method.
|
*IBus is needed to support wordwise during browser app usage as the keymap will need to change slightly depending if the cursor/caret is on screen waiting for input. Setup.py will set it but you can manually set it as well or check your current Input Method.
|
||||||
|
|
||||||
On most distros you can confirm navigate to your "Language Support" and set "Keyboard input method system:" to IBus for full word-wise support with web browsers.
|
On most distros you can confirm Input Methods by navigating to "Language Support" and set "Keyboard input method system:" to IBus for full word-wise support with web browsers.
|
||||||
|
|
||||||
Wayland support is planned, but not ready yet.
|
Wayland support is planned, but not ready yet.
|
||||||
|
|
||||||
### Kinto for Windows 10 Requirements
|
### Kinto for Windows 10 Requirements
|
||||||
|
|
||||||
- WSL Ubuntu edition
|
- [Git for Windows](https://git-scm.com/download/win)
|
||||||
- Powershell - run as Administrator
|
- Powershell - run as Administrator
|
||||||
- Python3
|
- [Python3](https://www.python.org/downloads/windows/)
|
||||||
|
|
||||||
Other programs that will be installed when you run ./setup.py
|
Other programs that will be installed when you run ./setup.py
|
||||||
- Chocolatey
|
- Chocolatey
|
||||||
- Autohotkey
|
- Autohotkey
|
||||||
|
- Strawberry Perl
|
||||||
|
|
||||||
Note: Sublime Text users should disable screen rotation hotkeys as they will interfere with multi-cursor and possibly other combos. See https://windowsloop.com/disable-screen-rotation-keyboard-shortcut/ for details.
|
Note: Sublime Text users should disable screen rotation hotkeys as they will interfere with multi-cursor and possibly other combos. See https://windowsloop.com/disable-screen-rotation-keyboard-shortcut/ for details.
|
||||||
|
|
||||||
Does not have complete parity with the Linux edition, but it is getting very close now. Only lacks some Sublime Text 3 remaps at this point.
|
|
||||||
|
|
||||||
Users can now hotswap between Apple and Windows based keyboards without having to logoff and back on, and Windows is currently the only implementation with a system tray (but this feature is coming to Budgie, XFCE, Mate, Gnome, and lastly KDE).
|
Users can now hotswap between Apple and Windows based keyboards without having to logoff and back on, and Windows is currently the only implementation with a system tray (but this feature is coming to Budgie, XFCE, Mate, Gnome, and lastly KDE).
|
||||||
|
|
||||||
<img src="https://user-images.githubusercontent.com/10969616/84471498-100c7d00-ac4b-11ea-972d-60c1907831ec.png" width="50%">
|
<img src="https://user-images.githubusercontent.com/10969616/84471498-100c7d00-ac4b-11ea-972d-60c1907831ec.png" width="50%">
|
||||||
<img src="https://user-images.githubusercontent.com/10969616/84471501-10a51380-ac4b-11ea-9e0e-c19a7ebfad6d.png" width="50%">
|
<img src="https://user-images.githubusercontent.com/10969616/84471501-10a51380-ac4b-11ea-9e0e-c19a7ebfad6d.png" width="50%">
|
||||||
|
|
||||||
|
|
||||||
## How to install
|
## How to install (Linux)
|
||||||
|
|
||||||
1. clone this repo
|
1. clone this repo
|
||||||
```
|
```
|
||||||
git clone https://github.com/rbreaves/kinto.git
|
git clone https://github.com/rbreaves/kinto.git
|
||||||
|
cd kinto
|
||||||
```
|
```
|
||||||
2. Install python3 (If needed)
|
2. Install python3 (If needed)
|
||||||
|
|
||||||
@@ -120,7 +132,43 @@ To Uninstall Kinto
|
|||||||
./setup.py
|
./setup.py
|
||||||
```
|
```
|
||||||
|
|
||||||
## Shortcut Creation (Xkeysnail)
|
## How to Install (Windows)
|
||||||
|
|
||||||
|
Video Tutorial: [How to Install Kinto.sh on Windows 10](https://youtu.be/sRk8A8krz40)
|
||||||
|
|
||||||
|
1. Open Powershell (Right click and Run as Administrator)
|
||||||
|
|
||||||
|
2. clone this repo
|
||||||
|
```
|
||||||
|
git clone https://github.com/rbreaves/kinto.git
|
||||||
|
cd kinto
|
||||||
|
```
|
||||||
|
3. Install - Select keyboard type
|
||||||
|
```
|
||||||
|
py setup.py
|
||||||
|
```
|
||||||
|
|
||||||
|
4. How to make Kinto stay visible in system tray (optional)
|
||||||
|
|
||||||
|
<img src="https://user-images.githubusercontent.com/10969616/85195077-2f338c00-b295-11ea-8aa3-e6aa06a9a279.png" width="50%" height="50%">
|
||||||
|
<img src="https://user-images.githubusercontent.com/10969616/85195079-30fd4f80-b295-11ea-8bcd-257990b77dcb.png" width="50%" height="50%">
|
||||||
|
<img src="https://user-images.githubusercontent.com/10969616/85195082-322e7c80-b295-11ea-8c81-320dab424c3c.png" width="50%" height="50%">
|
||||||
|
|
||||||
|
To Uninstall Kinto - Select Uninstall
|
||||||
|
|
||||||
|
```
|
||||||
|
py setup.py
|
||||||
|
```
|
||||||
|
## Shortcut Creation
|
||||||
|
|
||||||
|
Note: A new project, [Universal Keys](https://github.com/rbreaves/Universal-Keys), has been created that will be updated to contain all current remaps - plus many more. Once that is done, Kinto will be updated to programmatically pull the latest keymaps from simple csv comma delimited files & will build out key remaps from there. This will also allow for more types of remaps within an application category, Sublime Text 3 to VS Code or VS Code to Sublime Text 3, Photoshop to Gimp, Gimp to Photoshop, etc & it will ensure that xkeysnail (linux) & autohotkey (windows) are pulling from the same data set.
|
||||||
|
|
||||||
|
[Linux Shortcut Creation (Xkeysnail)](#Linux-Xkeysnail)
|
||||||
|
|
||||||
|
[Windows Shortcut Creation (Autohotkey)](#Windows-Autohotkey)
|
||||||
|
|
||||||
|
|
||||||
|
## Linux (Xkeysnail)
|
||||||
|
|
||||||
**GUI Keys**
|
**GUI Keys**
|
||||||
| Value| Description|Mac/Kinto Equivalent|
|
| Value| Description|Mac/Kinto Equivalent|
|
||||||
@@ -158,6 +206,46 @@ sudo systemctl restart xkeysnail
|
|||||||
|
|
||||||
More information can be seen on the readme page of [xkeysnail](https://github.com/mooz/xkeysnail).
|
More information can be seen on the readme page of [xkeysnail](https://github.com/mooz/xkeysnail).
|
||||||
|
|
||||||
|
## Windows (Autohotkey)
|
||||||
|
|
||||||
|
This applies to the Windows version of Kinto and how to add additional support for Applications. The configuration file location is `~/.kinto/kinto.ahk` and after updating it you will want to right click on the tray icon and click on setting your keyboard type again and it will re-apply the latest changes.
|
||||||
|
|
||||||
|
Windows 10 has a couple of ways that you need to be aware of when trying to add a specific application, the typical method of how to add any exe program, but then there is also the newer UWP app format that some applications use which will require a similar but different method, both will be discussed.
|
||||||
|
|
||||||
|
### Defining Keymaps Per App by EXE Name
|
||||||
|
You can use the following legend **but** realize that these remaps reference the Virtual keys in the diagrams mentioned near the beginning of this document, so **do not** confuse it with the physical key unless they happen to be the same key.
|
||||||
|
|
||||||
|
|Autohotkey Symbol|Virtual key|Description|
|
||||||
|
|---|---|---|
|
||||||
|
|^,Ctrl|Control|Primary modifier, 1st rock from the spacebar|
|
||||||
|
|!,Alt|Alt|Secondary modifier, 2nd rock from the spacebar|
|
||||||
|
|#,Win|Win/Super|Tertiary modifier, 3rd rock from the spacebar|
|
||||||
|
|
||||||
|
```
|
||||||
|
...
|
||||||
|
#IfWinActive ahk_exe sublime_text.exe
|
||||||
|
#^Up::send !{O} ; Switch file
|
||||||
|
#^f::send {F11} ; toggle_full_screen
|
||||||
|
^!v::send {Ctrl Down}k{Ctrl Up}{Ctrl Down}v{Ctrl Up} ; paste_from_history
|
||||||
|
...
|
||||||
|
#If
|
||||||
|
...
|
||||||
|
```
|
||||||
|
|
||||||
|
With this being Autohotkey you can easily pull knowledge from the Autohotkey forums for just about any issue you may have as well.
|
||||||
|
|
||||||
|
### Defining Keymaps Per UWP App
|
||||||
|
|
||||||
|
```
|
||||||
|
#If WinActive("- OneNote ahk_class ApplicationFrameWindow", "OneNote")
|
||||||
|
...
|
||||||
|
; Add your keymaps here
|
||||||
|
...
|
||||||
|
#If
|
||||||
|
```
|
||||||
|
|
||||||
|
I don't have too many examples on this one, most developers seem to be shying away from UWP. Kinto currently supports "Fluent Terminal" which is a UWP app, but it is also being grouped with other Terminal apps for hotkey remapping. You may take a look at that, but you may also want to try creating a new Autohotkey file and use the Window Spy feature built into Autohotkey to help you discover the full name and class names of any application.
|
||||||
|
|
||||||
## Shortcut Creation (XKB)
|
## Shortcut Creation (XKB)
|
||||||
The older xkb shortcut method info can be read about in ticket [#125](https://github.com/rbreaves/kinto/issues/125).
|
The older xkb shortcut method info can be read about in ticket [#125](https://github.com/rbreaves/kinto/issues/125).
|
||||||
|
|
||||||
@@ -249,6 +337,21 @@ systemctl --user stop keyswap && setxkbmap -option;setxkbmap -option altwin:swap
|
|||||||
|
|
||||||
## Troubleshooting
|
## Troubleshooting
|
||||||
|
|
||||||
|
### Installed successfully, but modifier keys are not properly remapped?
|
||||||
|
|
||||||
|
Are you using a VM on macOS? If so you may need to disable automatic remapping of the Cmd key when using Vmware Fusion of Parallels.
|
||||||
|
|
||||||
|
Disable Parallels Re-mapping:
|
||||||
|
1) Open Parallels and go to Preferences.
|
||||||
|
2) Click Keyboard and disable the Virtual machine shortcuts.
|
||||||
|
3) Close Preferences.
|
||||||
|
|
||||||
|
To disable keyboard mapping:
|
||||||
|
1) From Fusion's menu bar, click VMware Fusion > Preferences...
|
||||||
|
2) Click Keyboard & Mouse.
|
||||||
|
3) Click the Key Mappings tab.
|
||||||
|
4) Deselect Enable Key Mapping.
|
||||||
|
|
||||||
### Does not start when you log in or after you reboot?
|
### Does not start when you log in or after you reboot?
|
||||||
|
|
||||||
Kinto (xkb/x11) = keyswap
|
Kinto (xkb/x11) = keyswap
|
||||||
@@ -324,7 +427,7 @@ cd ~/.config/kinto
|
|||||||
./kintox11
|
./kintox11
|
||||||
```
|
```
|
||||||
|
|
||||||
## Debug
|
## Debug (Linux - xkb method only)
|
||||||
|
|
||||||
If all else fails you can now run Kinto in debug mode as of 1.0.6-2. The output will become more verbose and I'd recommend running this directly after stopping the service.
|
If all else fails you can now run Kinto in debug mode as of 1.0.6-2. The output will become more verbose and I'd recommend running this directly after stopping the service.
|
||||||
|
|
||||||
|
102
setup.py
102
setup.py
@@ -1,10 +1,11 @@
|
|||||||
#!/usr/bin/env python3
|
#!/usr/bin/env python3
|
||||||
import json, time, os, sys, subprocess, shlex
|
import json, time, os, sys, subprocess, shlex, platform
|
||||||
from shutil import copyfile
|
from shutil import copyfile
|
||||||
from subprocess import PIPE, Popen
|
from subprocess import PIPE, Popen
|
||||||
from prekinto import *
|
from prekinto import *
|
||||||
|
|
||||||
homedir = os.path.expanduser("~")
|
homedir = os.path.expanduser("~")
|
||||||
|
kintotype = 0
|
||||||
|
|
||||||
def windows_setup():
|
def windows_setup():
|
||||||
keymaps = ["Apple keyboard standard", "Windows keyboard standard","Uninstall"]
|
keymaps = ["Apple keyboard standard", "Windows keyboard standard","Uninstall"]
|
||||||
@@ -15,48 +16,52 @@ def windows_setup():
|
|||||||
default = int(input("\nPlease enter your desired keymap (1 - " + str(len(keymaps)) + ") : "))
|
default = int(input("\nPlease enter your desired keymap (1 - " + str(len(keymaps)) + ") : "))
|
||||||
print("")
|
print("")
|
||||||
# Short DOS path notation
|
# Short DOS path notation
|
||||||
path= cmdline('echo %cd%')[:-1]
|
path= cmdline('echo ''%cd%''')[:-1]
|
||||||
print("Copying autohotkey combinations for Terminals & Editors...")
|
|
||||||
os.system("copy /Y " + path + "\\windows\\kinto.ahk " + path + "\\windows\\kinto-new.ahk")
|
|
||||||
if default == 1:
|
|
||||||
os.system('perl -pi -e "s/(; )(.*)(; MacModifiers)/$2$3/g" ./windows/kinto-new.ahk')
|
|
||||||
# os.system("regedit " + path + "\\windows\\macbook_winctrl_swap.reg")
|
|
||||||
elif default == 2:
|
|
||||||
os.system('perl -pi -e "s/(; )(.*)(; WinModifiers)/$2$3/g" ./windows/kinto-new.ahk')
|
|
||||||
# os.system("regedit " + path + "\\windows\\standard_ctrlalt_swap.reg")
|
|
||||||
elif default == 3:
|
|
||||||
os.system("regedit " + path + "\\windows\\remove_keyswap.reg")
|
|
||||||
os.system("del /f .\\windows\\kinto-new.ahk")
|
|
||||||
os.system("del \"C:\\ProgramData\\Microsoft\\Windows\\Start Menu\\Programs\\StartUp\\kinto.ahk\"")
|
|
||||||
os.system("taskkill /IM autohotkey.exe")
|
|
||||||
os.system('rd /s /q %userprofile%\\.kinto')
|
|
||||||
os.system('del "%userprofile%\\AppData\\Roaming\\Microsoft\\Windows\\STARTM~1\\Programs\\Startup\\kinto-start.vbs"')
|
|
||||||
stvscode = yn_choice(bcolors.CYELLOW2 + "Would you like to use Sublime Text 3 keymaps in VS Code?\n" + bcolors.ENDC)
|
|
||||||
if default > 0 and default < 3:
|
if default > 0 and default < 3:
|
||||||
print("Will now install chocolatey and autohotkey with elevated privileges...")
|
print("Will now install chocolatey and autohotkey with elevated privileges...")
|
||||||
print("This install will fail if you are not running with elevated privileges")
|
print("This install will fail if you are not running with elevated privileges")
|
||||||
os.system('powershell -executionpolicy bypass ".\\windows\\autohotkey.ps1"')
|
os.system('powershell -executionpolicy bypass ".\\windows\\autohotkey.ps1"')
|
||||||
os.system('refreshenv')
|
print("Copying autohotkey combinations for Terminals & Editors...")
|
||||||
print("\nWill now install Ubuntu Terminal Theme as default...")
|
os.system('copy /Y "' + path + '\\windows\\kinto.ahk" "' + path + '\\windows\\kinto-new.ahk"')
|
||||||
os.system("regedit " + path + "\\windows\\theme_ubuntu.reg")
|
if default == 1:
|
||||||
|
os.system('C:\\Strawberry\\perl\\bin\\perl.exe -pi -e "s/(; )(.*)(; MacModifiers)/$2$3/g" .\\windows\\kinto-new.ahk')
|
||||||
|
elif default == 2:
|
||||||
|
os.system('C:\\Strawberry\\perl\\bin\\perl.exe -pi -e "s/(; )(.*)(; WinModifiers)/$2$3/g" .\\windows\\kinto-new.ahk')
|
||||||
|
elif default == 3:
|
||||||
|
print("Removing any old registry keys from prior versions...")
|
||||||
|
p = subprocess.Popen(['powershell.exe', "Remove-ItemProperty -Path HKLM:'SYSTEM\CurrentControlSet\Control\Keyboard Layout' -Name 'Scancode Map' -ErrorAction SilentlyContinue"], stdout=sys.stdout)
|
||||||
|
print("Removing Kinto from Startup folder...")
|
||||||
|
os.system("(del \"C:\\ProgramData\\Microsoft\\Windows\\Start Menu\\Programs\\StartUp\\kinto.ahk\") 2> nul")
|
||||||
|
os.system('(del "%userprofile%\\AppData\\Roaming\\Microsoft\\Windows\\STARTM~1\\Programs\\Startup\\kinto-start.vbs") 2> nul')
|
||||||
|
print("Ending any running Kinto tasks...")
|
||||||
|
os.system("(taskkill /IM autohotkey.exe) 2> nul")
|
||||||
|
print("Removing Kinto from users profile directory...")
|
||||||
|
os.system('(rd /s /q "%userprofile%\\.kinto") 2> nul')
|
||||||
|
print("")
|
||||||
|
print("Uninstall of Kinto is Complete.")
|
||||||
|
if default > 0 and default < 3:
|
||||||
|
stvscode = yn_choice(bcolors.CYELLOW2 + "Would you like to use Sublime Text 3 keymaps in VS Code?\n" + bcolors.ENDC)
|
||||||
|
print("\nWill now install Ubuntu Termimnal Theme as default...")
|
||||||
|
os.system('regedit "' + path + '\\windows\\theme_ubuntu.reg"')
|
||||||
|
os.system('robocopy "'+ path + '\\assets" "%userprofile%\\.kinto\\assets" /E')
|
||||||
if(stvscode):
|
if(stvscode):
|
||||||
os.system('perl -pi -e "s/(; )(.*)(; ST2CODE)/$2$3/g" ./windows/kinto-new.ahk')
|
os.system('C:\\Strawberry\\perl\\bin\\perl.exe -pi -e "s/(; )(.*)(; ST2CODE)/$2$3/g" .\\windows\\kinto-new.ahk')
|
||||||
os.system('copy /Y ' + path + '\\windows\\kinto-start.vbs "%userprofile%\\.kinto\\kinto-start.vbs"')
|
os.system('copy /Y "' + path + '\\windows\\kinto-start.vbs" "%userprofile%\\.kinto\\kinto-start.vbs"')
|
||||||
os.system('copy /Y ' + path + '\\windows\\usb.vbs "%userprofile%\\.kinto\\usb.vbs"')
|
os.system('copy /Y "' + path + '\\windows\\usb.vbs" "%userprofile%\\.kinto\\usb.vbs"')
|
||||||
os.system('copy /Y ' + path + '\\windows\\usb.vbs "%userprofile%\\.kinto\\detectUSB.vbs"')
|
os.system('copy /Y "' + path + '\\windows\\detectUSB.ahk" "%userprofile%\\.kinto\\detectUSB.ahk"')
|
||||||
os.system('mklink "%userprofile%\\Start Menu\\Programs\\Startup\\kinto-start.vbs" "%userprofile%\\.kinto\\kinto-start.vbs"')
|
os.system('mklink "%userprofile%\\Start Menu\\Programs\\Startup\\kinto-start.vbs" "%userprofile%\\.kinto\\kinto-start.vbs"')
|
||||||
os.system('cp '+ path + '\\windows\\NoShell.vbs "%userprofile%\\.kinto\\NoShell.vbs"')
|
os.system('copy /Y "'+ path + '\\windows\\NoShell.vbs" "%userprofile%\\.kinto\\NoShell.vbs"')
|
||||||
os.system('cp '+ path + '\\windows\\toggle_kb.bat "%userprofile%\\.kinto\\toggle_kb.bat"')
|
os.system('copy /Y "'+ path + '\\windows\\toggle_kb.bat" "%userprofile%\\.kinto\\toggle_kb.bat"')
|
||||||
os.system('cp '+ path + '\\windows\\kinto-new.ahk "%userprofile%\\.kinto\\kinto.ahk"')
|
os.system('copy /Y "'+ path + '\\windows\\kinto-new.ahk" "%userprofile%\\.kinto\\kinto.ahk"')
|
||||||
os.system('robocopy '+ path + '\\assets "%userprofile%\\.kinto\\assets" /E')
|
|
||||||
os.system("del /f .\\windows\\kinto-new.ahk")
|
os.system("del /f .\\windows\\kinto-new.ahk")
|
||||||
os.system("del \"C:\\ProgramData\\Microsoft\\Windows\\Start Menu\\Programs\\StartUp\\kinto.ahk\"")
|
os.system("del \"C:\\ProgramData\\Microsoft\\Windows\\Start Menu\\Programs\\StartUp\\kinto.ahk\" 2> nul")
|
||||||
os.system("%userprofile%\\AppData\\Roaming\\Microsoft\\Windows\\STARTM~1\\Programs\\Startup\\kinto-start.vbs")
|
userpath = cmdline('cmd /c for %A in ("%userprofile%") do @echo %~sA')[:-1]
|
||||||
|
print('Starting... "' + userpath + '\\AppData\\Roaming\\Microsoft\\Windows\\STARTM~1\\Programs\\Startup\\kinto-start.vbs"')
|
||||||
|
os.system('"' + userpath + '\\AppData\\Roaming\\Microsoft\\Windows\\STARTM~1\\Programs\\Startup\\kinto-start.vbs"')
|
||||||
# # print("\nPlease log off and back on for changes to take full effect.")
|
# # 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.")
|
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:
|
else:
|
||||||
os.system("del \"C:\\ProgramData\\Microsoft\\Windows\\Start Menu\\Programs\\StartUp\\kinto.ahk\"")
|
os.system("(del \"C:\\ProgramData\\Microsoft\\Windows\\Start Menu\\Programs\\StartUp\\kinto.ahk\") 2> nul")
|
||||||
|
|
||||||
def cmdline(command):
|
def cmdline(command):
|
||||||
process = Popen(
|
process = Popen(
|
||||||
@@ -67,7 +72,11 @@ def cmdline(command):
|
|||||||
)
|
)
|
||||||
return process.communicate()[0]
|
return process.communicate()[0]
|
||||||
|
|
||||||
# check_x11 = cmdline("env | grep -i x11").strip()
|
if platform.system() == 'Windows':
|
||||||
|
print("\nYou are detected as running Windows.")
|
||||||
|
windows_setup()
|
||||||
|
sys.exit()
|
||||||
|
|
||||||
check_x11 = cmdline("(env | grep -i x11 || loginctl show-session \"$XDG_SESSION_ID\" -p Type) | awk -F= '{print $2}'").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:
|
if len(check_x11) == 0:
|
||||||
@@ -176,10 +185,11 @@ def setShortcuts():
|
|||||||
cmdline("gsettings set org.gnome.desktop.wm.keybindings panel-main-menu \"['<Control><Shift>Space','<Super>Space']\"")
|
cmdline("gsettings set org.gnome.desktop.wm.keybindings panel-main-menu \"['<Control><Shift>Space','<Super>Space']\"")
|
||||||
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 \"['<Super>Space','<Primary>Space']\"")
|
cmdline("gsettings set org.gnome.desktop.wm.keybindings panel-main-menu \"['<Super>Space','<Primary>Space']\"")
|
||||||
cmdline('perl -pi -e "s/(\/\/ )(.*)(\/\/ Elementary cmdtab)/\$2\$3/g" ~/.xkb/symbols/mac_term')
|
if(kintotype == 2):
|
||||||
cmdline('perl -pi -e "s/(\w.*)(\/\/ Default cmdtab)/\/\/ \$1\$2/g" ~/.xkb/symbols/mac_term')
|
cmdline('perl -pi -e "s/(\/\/ )(.*)(\/\/ Elementary cmdtab)/\$2\$3/g" ~/.xkb/symbols/mac_term')
|
||||||
cmdline('perl -pi -e "s/(\/\/ )(.*)(\/\/ Elementary cmdtab)/\$2\$3/g" ~/.xkb/symbols/mac_gui')
|
cmdline('perl -pi -e "s/(\w.*)(\/\/ Default cmdtab)/\/\/ \$1\$2/g" ~/.xkb/symbols/mac_term')
|
||||||
cmdline('perl -pi -e "s/(\w.*)(\/\/ Default cmdtab)/\/\/ \$1\$2/g" ~/.xkb/symbols/mac_gui')
|
cmdline('perl -pi -e "s/(\/\/ )(.*)(\/\/ Elementary cmdtab)/\$2\$3/g" ~/.xkb/symbols/mac_gui')
|
||||||
|
cmdline('perl -pi -e "s/(\w.*)(\/\/ Default cmdtab)/\/\/ \$1\$2/g" ~/.xkb/symbols/mac_gui')
|
||||||
# elif distro == "budgie" and dename == "gnome":
|
# elif distro == "budgie" and dename == "gnome":
|
||||||
# print("Apply budgie shortcuts here")
|
# print("Apply budgie shortcuts here")
|
||||||
elif (dename == "xfce"):
|
elif (dename == "xfce"):
|
||||||
@@ -249,13 +259,15 @@ def setShortcuts():
|
|||||||
print('distro: ' + distro + ' de: ' + dename)
|
print('distro: ' + distro + ' de: ' + dename)
|
||||||
print(bcolors.CRED2 + "A supported OS and DE was not found, you may not have full system level shortcuts installed." + bcolors.ENDC)
|
print(bcolors.CRED2 + "A supported OS and DE was not found, you may not have full system level shortcuts installed." + bcolors.ENDC)
|
||||||
print(bcolors.CRED2 + "You may want to find your DE or Window Manager settings and manually set Alt-Tab & other OS related shortcuts." + bcolors.ENDC)
|
print(bcolors.CRED2 + "You may want to find your DE or Window Manager settings and manually set Alt-Tab & other OS related shortcuts." + bcolors.ENDC)
|
||||||
if dename == "gnome":
|
if dename == "gnome" or dename == "mate" or dename == "budgie":
|
||||||
# Apply dconf update to make updates survive reboots
|
# Apply dconf update to make updates survive reboots
|
||||||
cmdline('dconf dump /org/gnome/desktop/wm/keybindings/ > tempkb.conf')
|
cmdline('dconf dump /org/gnome/desktop/wm/keybindings/ > tempkb.conf')
|
||||||
cmdline('dconf dump /org/gnome/mutter/keybindings/ > tempmt.conf')
|
cmdline('dconf dump /org/gnome/mutter/keybindings/ > tempmt.conf')
|
||||||
cmdline('dconf load /org/gnome/desktop/wm/keybindings/ < tempkb.conf')
|
cmdline('dconf load /org/gnome/desktop/wm/keybindings/ < tempkb.conf')
|
||||||
cmdline('dconf load /org/gnome/mutter/keybindings/ < tempmt.conf')
|
cmdline('dconf load /org/gnome/mutter/keybindings/ < tempmt.conf')
|
||||||
cmdline('sleep 1 && rm -f ./tempkb.conf;rm -f ./tempmt.conf')
|
cmdline('sleep 1 && rm -f ./tempkb.conf;rm -f ./tempmt.conf')
|
||||||
|
if dename == "budgie":
|
||||||
|
print('** Make sure to open Keyboard settings & reset "switch applications" to cmd+tab **')
|
||||||
# cmdline('dconf update')
|
# cmdline('dconf update')
|
||||||
|
|
||||||
def Uninstall():
|
def Uninstall():
|
||||||
@@ -320,14 +332,14 @@ def Uninstall():
|
|||||||
|
|
||||||
def kintoImpOne():
|
def kintoImpOne():
|
||||||
|
|
||||||
check_xbind = cmdline("which xbindkeys 2>/dev/null").strip()
|
check_xbind = cmdline("\\which xbindkeys 2>/dev/null").strip()
|
||||||
check_xdotool = cmdline("which xdotool 2>/dev/null").strip()
|
check_xdotool = cmdline("\\which xdotool 2>/dev/null").strip()
|
||||||
check_ibus = cmdline("which ibus-setup 2>/dev/null").strip()
|
check_ibus = cmdline("\\which ibus-setup 2>/dev/null").strip()
|
||||||
|
|
||||||
pkgm = cmdline("which apt-get 2>/dev/null").strip()
|
pkgm = cmdline("\\which apt-get 2>/dev/null").strip()
|
||||||
|
|
||||||
if len(pkgm) == 0:
|
if len(pkgm) == 0:
|
||||||
pkgm = cmdline("which dnf 2>/dev/null").strip()
|
pkgm = cmdline("\\which dnf 2>/dev/null").strip()
|
||||||
if len(pkgm) > 0:
|
if len(pkgm) > 0:
|
||||||
pkgm += " check-update;sudo dnf install -y "
|
pkgm += " check-update;sudo dnf install -y "
|
||||||
else:
|
else:
|
||||||
@@ -335,7 +347,7 @@ def kintoImpOne():
|
|||||||
pkgm += " update; sudo apt-get install -y "
|
pkgm += " update; sudo apt-get install -y "
|
||||||
|
|
||||||
if len(pkgm) == 0:
|
if len(pkgm) == 0:
|
||||||
pkgm = cmdline("which pacman 2>/dev/null").strip()
|
pkgm = cmdline("\\which pacman 2>/dev/null").strip()
|
||||||
if len(pkgm) > 0:
|
if len(pkgm) > 0:
|
||||||
pkgm += " -Syy; sudo pacman -S "
|
pkgm += " -Syy; sudo pacman -S "
|
||||||
|
|
||||||
|
@@ -1,8 +1,8 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
# Undo Apple keyboard cmd & alt swap
|
# 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
|
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 -a /sys/module/hid_apple/parameters/swap_opt_cmd
|
echo '0' | sudo tee /sys/module/hid_apple/parameters/swap_opt_cmd
|
||||||
echo 'options hid_apple swap_opt_cmd=0' | sudo tee -a /etc/modprobe.d/hid_apple.conf
|
echo 'options hid_apple swap_opt_cmd=0' | sudo tee /etc/modprobe.d/hid_apple.conf
|
||||||
sudo update-initramfs -u -k all
|
sudo update-initramfs -u -k all
|
||||||
fi
|
fi
|
||||||
systemctl --user stop keyswap 2>/dev/null
|
systemctl --user stop keyswap 2>/dev/null
|
||||||
|
@@ -1,15 +1,22 @@
|
|||||||
$testchoco = powershell choco -v
|
if(-not(Get-Command "choco" -errorAction SilentlyContinue)){
|
||||||
if(-not($testchoco)){
|
|
||||||
Write-Output "Seems Chocolatey is not installed, installing now"
|
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'))
|
Set-ExecutionPolicy Bypass -Scope Process -Force; iex ((New-Object System.Net.WebClient).DownloadString('https://chocolatey.org/install.ps1'))
|
||||||
|
refreshenv
|
||||||
}
|
}
|
||||||
else{
|
else{
|
||||||
Write-Output "Chocolatey Version $testchoco is already installed"
|
Write-Output "Chocolatey is already installed"
|
||||||
}
|
}
|
||||||
|
|
||||||
if(-not(test-path "C:\Program Files\AutoHotkey\AutoHotkey.exe")){
|
if(-not(test-path "C:\Program Files\AutoHotkey\AutoHotkey.exe")){
|
||||||
choco install autohotkey.install
|
choco install autohotkey.install
|
||||||
}
|
}
|
||||||
|
else{
|
||||||
|
Write-Output "Autohotkey is already installed"
|
||||||
|
}
|
||||||
if(-not(test-path "C:\Strawberry\")){
|
if(-not(test-path "C:\Strawberry\")){
|
||||||
choco install strawberryperl
|
choco install strawberryperl
|
||||||
|
refreshenv
|
||||||
|
}
|
||||||
|
else{
|
||||||
|
Write-Output "Perl is already installed"
|
||||||
}
|
}
|
||||||
|
@@ -11,13 +11,12 @@ WinHide % "ahk_id " DllCall("GetConsoleWindow", "ptr")
|
|||||||
notify_change(wParam, lParam, msg, hwnd)
|
notify_change(wParam, lParam, msg, hwnd)
|
||||||
{
|
{
|
||||||
global lastkb
|
global lastkb
|
||||||
; kbtype = % ComObjCreate("WScript.Shell").Exec("cscript /nologo usb.vbs").StdOut.ReadAll()
|
|
||||||
DetectHiddenWindows On
|
DetectHiddenWindows On
|
||||||
Run %ComSpec%,, Hide, pid
|
Run %ComSpec%,, Hide, pid
|
||||||
WinWait ahk_pid %pid%
|
WinWait ahk_pid %pid%
|
||||||
DllCall("AttachConsole", "UInt", pid)
|
DllCall("AttachConsole", "UInt", pid)
|
||||||
WshShell := ComObjCreate("Wscript.Shell")
|
WshShell := ComObjCreate("Wscript.Shell")
|
||||||
exec := WshShell.Exec("cscript /nologo usb.vbs")
|
exec := WshShell.Exec("cscript /nologo ""%userprofile%\.kinto\usb.vbs""")
|
||||||
kbtype := exec.StdOut.ReadAll()
|
kbtype := exec.StdOut.ReadAll()
|
||||||
DllCall("FreeConsole")
|
DllCall("FreeConsole")
|
||||||
Process Close, %pid%
|
Process Close, %pid%
|
||||||
@@ -27,11 +26,11 @@ notify_change(wParam, lParam, msg, hwnd)
|
|||||||
if InStr(kbtype, "Apple")
|
if InStr(kbtype, "Apple")
|
||||||
{
|
{
|
||||||
; MsgBox, Apple
|
; MsgBox, Apple
|
||||||
Run, %A_ScriptDir%\NoShell.vbs %A_ScriptDir%\toggle_kb.bat mac, %A_ScriptDir%
|
Run, "%A_ScriptDir%\NoShell.vbs" "%A_ScriptDir%\toggle_kb.bat" mac, "%A_ScriptDir%"
|
||||||
}
|
}
|
||||||
else{
|
else{
|
||||||
; MsgBox, Windows
|
; MsgBox, Windows
|
||||||
Run, %A_ScriptDir%\NoShell.vbs %A_ScriptDir%\toggle_kb.bat win, %A_ScriptDir%
|
Run, "%A_ScriptDir%\NoShell.vbs" "%A_ScriptDir%\toggle_kb.bat" win, "%A_ScriptDir%"
|
||||||
}
|
}
|
||||||
; MsgBox % kbtype
|
; MsgBox % kbtype
|
||||||
}
|
}
|
||||||
|
@@ -2,6 +2,6 @@ Set oShell = CreateObject("Shell.Application")
|
|||||||
Set wShell = WScript.CreateObject("WScript.Shell")
|
Set wShell = WScript.CreateObject("WScript.Shell")
|
||||||
Set fso = CreateObject("Scripting.FileSystemObject")
|
Set fso = CreateObject("Scripting.FileSystemObject")
|
||||||
|
|
||||||
path = wShell.ExpandEnvironmentStrings("%userprofile%")
|
path = wShell.ExpandEnvironmentStrings("""%userprofile%")
|
||||||
strFolder = fso.BuildPath(path, "\.kinto\kinto.ahk")
|
strFolder = fso.BuildPath( path, "\.kinto\kinto.ahk""")
|
||||||
oShell.ShellExecute "C:\Program Files\AutoHotkey\AutoHotkey.exe", strFolder, , "runas", 0
|
oShell.ShellExecute "C:\Program Files\AutoHotkey\AutoHotkey.exe", strFolder, , "runas", 0
|
@@ -5,6 +5,25 @@
|
|||||||
DetectHiddenWindows, On
|
DetectHiddenWindows, On
|
||||||
Run, %A_ScriptDir%\detectUSB.ahk
|
Run, %A_ScriptDir%\detectUSB.ahk
|
||||||
|
|
||||||
|
; Enable Left clicks on Kinto Icon
|
||||||
|
; https://www.autohotkey.com/boards/viewtopic.php?t=9501
|
||||||
|
OnMessage(0x404, "AHK_NOTIFYICON")
|
||||||
|
|
||||||
|
AHK_NOTIFYICON(wParam, lParam)
|
||||||
|
{
|
||||||
|
if (lParam = 0x202) { ; user left-clicked tray icon
|
||||||
|
;ADD ANY SUBROUTINE OR FUNCTION HERE
|
||||||
|
Menu, Tray, Show
|
||||||
|
return
|
||||||
|
}
|
||||||
|
else if (lParam = 0x203) { ; user double left-clicked tray icon
|
||||||
|
;ADD ANY SUBROUTINE OR FUNCTION HERE
|
||||||
|
Menu, Tray, Show
|
||||||
|
return
|
||||||
|
}
|
||||||
|
}
|
||||||
|
; End Enable Left clicks
|
||||||
|
|
||||||
; I_Icon = %A_ScriptDir%\assets\kinto-white.ico ; MacModifiers
|
; I_Icon = %A_ScriptDir%\assets\kinto-white.ico ; MacModifiers
|
||||||
; IfExist, %I_Icon% ; MacModifiers
|
; IfExist, %I_Icon% ; MacModifiers
|
||||||
; Menu, Tray, Icon, %I_Icon%,, 1 ; MacModifiers
|
; Menu, Tray, Icon, %I_Icon%,, 1 ; MacModifiers
|
||||||
@@ -27,11 +46,11 @@ Menu, Tray, Add, Close, Exit
|
|||||||
Menu, Tray, Click, 1
|
Menu, Tray, Click, 1
|
||||||
|
|
||||||
winkb(){
|
winkb(){
|
||||||
Run, %A_ScriptDir%\NoShell.vbs %A_ScriptDir%\toggle_kb.bat win, %A_ScriptDir%
|
Run, "%A_ScriptDir%\NoShell.vbs" "%A_ScriptDir%\toggle_kb.bat" win, "%A_ScriptDir%"
|
||||||
}
|
}
|
||||||
|
|
||||||
mackb(){
|
mackb(){
|
||||||
Run, %A_ScriptDir%\NoShell.vbs %A_ScriptDir%\toggle_kb.bat mac, %A_ScriptDir%
|
Run, "%A_ScriptDir%\NoShell.vbs" "%A_ScriptDir%\toggle_kb.bat" mac, "%A_ScriptDir%"
|
||||||
}
|
}
|
||||||
|
|
||||||
min(){
|
min(){
|
||||||
@@ -67,44 +86,6 @@ Exit() {
|
|||||||
ExitApp
|
ExitApp
|
||||||
}
|
}
|
||||||
|
|
||||||
OnMessage(0x219, "notify_change")
|
|
||||||
return
|
|
||||||
|
|
||||||
lastkb = ""
|
|
||||||
|
|
||||||
DllCall("AllocConsole")
|
|
||||||
WinHide % "ahk_id " DllCall("GetConsoleWindow", "ptr")
|
|
||||||
|
|
||||||
notify_change(wParam, lParam, msg, hwnd)
|
|
||||||
{
|
|
||||||
global lastkb
|
|
||||||
; kbtype = % ComObjCreate("WScript.Shell").Exec("cscript /nologo usb.vbs").StdOut.ReadAll()
|
|
||||||
DetectHiddenWindows On
|
|
||||||
Run %ComSpec%,, Hide, pid
|
|
||||||
WinWait ahk_pid %pid%
|
|
||||||
DllCall("AttachConsole", "UInt", pid)
|
|
||||||
WshShell := ComObjCreate("Wscript.Shell")
|
|
||||||
exec := WshShell.Exec("cscript /nologo usb.vbs")
|
|
||||||
kbtype := exec.StdOut.ReadAll()
|
|
||||||
DllCall("FreeConsole")
|
|
||||||
Process Close, %pid%
|
|
||||||
if lastkb != %kbtype%
|
|
||||||
{
|
|
||||||
|
|
||||||
if InStr(kbtype, "Apple")
|
|
||||||
{
|
|
||||||
; MsgBox, Apple
|
|
||||||
Run, %A_ScriptDir%\NoShell.vbs %A_ScriptDir%\toggle_kb.bat mac, %A_ScriptDir%
|
|
||||||
}
|
|
||||||
else{
|
|
||||||
; MsgBox, Windows
|
|
||||||
Run, %A_ScriptDir%\NoShell.vbs %A_ScriptDir%\toggle_kb.bat win, %A_ScriptDir%
|
|
||||||
}
|
|
||||||
; MsgBox % kbtype
|
|
||||||
}
|
|
||||||
lastkb = %kbtype%
|
|
||||||
}
|
|
||||||
|
|
||||||
SetTitleMatchMode, 2
|
SetTitleMatchMode, 2
|
||||||
|
|
||||||
GroupAdd, terminals, ahk_exe ubuntu.exe
|
GroupAdd, terminals, ahk_exe ubuntu.exe
|
||||||
@@ -113,6 +94,7 @@ GroupAdd, terminals, ahk_exe ConEmu64.exe
|
|||||||
GroupAdd, terminals, ahk_exe powershell.exe
|
GroupAdd, terminals, ahk_exe powershell.exe
|
||||||
GroupAdd, terminals, ahk_exe WindowsTerminal.exe
|
GroupAdd, terminals, ahk_exe WindowsTerminal.exe
|
||||||
GroupAdd, terminals, ahk_exe Hyper.exe
|
GroupAdd, terminals, ahk_exe Hyper.exe
|
||||||
|
GroupAdd, terminals, ahk_exe mintty.exe
|
||||||
GroupAdd, terminals, ahk_exe Cmd.exe
|
GroupAdd, terminals, ahk_exe Cmd.exe
|
||||||
GroupAdd, terminals, ahk_exe Terminus.exe
|
GroupAdd, terminals, ahk_exe Terminus.exe
|
||||||
GroupAdd, terminals, Fluent Terminal ahk_class ApplicationFrameWindow
|
GroupAdd, terminals, Fluent Terminal ahk_class ApplicationFrameWindow
|
||||||
@@ -133,11 +115,20 @@ GroupAdd, editors, ahk_exe sublime_text.exe
|
|||||||
GroupAdd, editors, ahk_exe VSCodium.exe
|
GroupAdd, editors, ahk_exe VSCodium.exe
|
||||||
GroupAdd, editors, ahk_exe Code.exe
|
GroupAdd, editors, ahk_exe Code.exe
|
||||||
|
|
||||||
|
GroupAdd, browsers, ahk_exe chrome.exe
|
||||||
|
GroupAdd, browsers, ahk_exe opera.exe
|
||||||
|
GroupAdd, browsers, ahk_exe firefox.exe
|
||||||
|
; Disabled Edge for now - no ability to close all instances
|
||||||
|
; GroupAdd, browsers, Microsoft Edge ahk_class ApplicationFrameWindow
|
||||||
|
|
||||||
GroupAdd, vscode, ahk_exe VSCodium.exe
|
GroupAdd, vscode, ahk_exe VSCodium.exe
|
||||||
GroupAdd, vscode, ahk_exe Code.exe
|
GroupAdd, vscode, ahk_exe Code.exe
|
||||||
|
|
||||||
GroupAdd, vstudio, ahk_exe devenv.exe
|
GroupAdd, vstudio, ahk_exe devenv.exe
|
||||||
|
|
||||||
|
GroupAdd, intellij, ahk_exe idea.exe
|
||||||
|
GroupAdd, intellij, ahk_exe idea64.exe
|
||||||
|
|
||||||
; New AltTab and CtrlTab fix
|
; New AltTab and CtrlTab fix
|
||||||
*tab::
|
*tab::
|
||||||
{
|
{
|
||||||
@@ -211,6 +202,44 @@ $LCtrl up::Send {Ctrl down}{LWin up}{Ctrl up}
|
|||||||
; Close Apps
|
; Close Apps
|
||||||
^q::Send !{F4}
|
^q::Send !{F4}
|
||||||
|
|
||||||
|
; Minimize specific Window
|
||||||
|
^m::WinMinimize, A
|
||||||
|
|
||||||
|
; Minimize all but Active Window
|
||||||
|
!^m::
|
||||||
|
WinGet, winid ,, A
|
||||||
|
WinMinimizeAll
|
||||||
|
WinActivate ahk_id %winid%
|
||||||
|
return
|
||||||
|
|
||||||
|
; hide all instances of active Program
|
||||||
|
^h::
|
||||||
|
WinGetClass, class, A
|
||||||
|
WinGet, AllWindows, List
|
||||||
|
loop %AllWindows% {
|
||||||
|
WinGetClass, WinClass, % "ahk_id " AllWindows%A_Index%
|
||||||
|
if(InStr(WinClass,class)){
|
||||||
|
WinMinimize, % "ahk_id " AllWindows%A_Index%
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return
|
||||||
|
|
||||||
|
; hide all but active program
|
||||||
|
!^h::
|
||||||
|
WinGetClass, class, A
|
||||||
|
WinMinimizeAll
|
||||||
|
WinGet, AllWindows, List
|
||||||
|
loop %AllWindows% {
|
||||||
|
WinGetClass, WinClass, % "ahk_id " AllWindows%A_Index%
|
||||||
|
if(InStr(WinClass,class)){
|
||||||
|
WinRestore, % "ahk_id " AllWindows%A_Index%
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return
|
||||||
|
|
||||||
|
; Show Desktop
|
||||||
|
^F3::Send #d
|
||||||
|
|
||||||
; Emoji Panel
|
; Emoji Panel
|
||||||
#^Space::Send {LWin down};{LWin up}
|
#^Space::Send {LWin down};{LWin up}
|
||||||
|
|
||||||
@@ -229,7 +258,7 @@ $^+Right::Send +{End}
|
|||||||
^+Up::Send ^+{Home}
|
^+Up::Send ^+{Home}
|
||||||
^Down::Send ^{End}
|
^Down::Send ^{End}
|
||||||
^+Down::Send ^+{End}
|
^+Down::Send ^+{End}
|
||||||
^Backspace::Send +{Home}{Delete}
|
$^Backspace::Send +{Home}{Delete}
|
||||||
!Backspace::Send ^{Backspace}
|
!Backspace::Send ^{Backspace}
|
||||||
!Left::Send ^{Left}
|
!Left::Send ^{Left}
|
||||||
!+Left::Send ^+{Left}
|
!+Left::Send ^+{Left}
|
||||||
@@ -237,10 +266,104 @@ $^+Right::Send +{End}
|
|||||||
!+Right::Send ^+{Right}
|
!+Right::Send ^+{Right}
|
||||||
|
|
||||||
; Cmd+Space Alternative
|
; Cmd+Space Alternative
|
||||||
^Space::Send ^{Esc}
|
$^Space::Send ^{Esc}
|
||||||
|
|
||||||
|
#IfWinActive ahk_group intellij
|
||||||
|
; General
|
||||||
|
^0::Send !{0} ;Open corresponding tool window
|
||||||
|
^1::Send !{1} ;Open corresponding tool window
|
||||||
|
^2::Send !{2} ;Open corresponding tool window
|
||||||
|
^3::Send !{3} ;Open corresponding tool window
|
||||||
|
^4::Send !{4} ;Open corresponding tool window
|
||||||
|
^5::Send !{5} ;Open corresponding tool window
|
||||||
|
^6::Send !{6} ;Open corresponding tool window
|
||||||
|
^7::Send !{7} ;Open corresponding tool window
|
||||||
|
^8::Send !{8} ;Open corresponding tool window
|
||||||
|
^9::Send !{9} ;Open corresponding tool window
|
||||||
|
#`::Send ^` ;Quick switch current scheme
|
||||||
|
^,::Send ^!s ;Open Settings dialog
|
||||||
|
^;::Send ^!+s ;Open Project Structure dialog
|
||||||
|
; Debugging
|
||||||
|
^!r::Send {F9} ;Resume program
|
||||||
|
; Search/Replace
|
||||||
|
^g::Send {F3} ;Find next
|
||||||
|
^+F3::Send +{F3} ;Find previous
|
||||||
|
#g::Send !j ;Select next occurrence
|
||||||
|
^#g::Send ^!+j ;Select all occurrences
|
||||||
|
#+g::Send !+j ;Unselect occurrence
|
||||||
|
; Editing
|
||||||
|
#Space::Send ^{Space} ;Basic code completion
|
||||||
|
#+Space::Send ^+{Space} ;Smart code completion
|
||||||
|
#j::Send ^q ;Quick documentation lookup
|
||||||
|
^n::Send !{Insert} ;Generate code...
|
||||||
|
#o::Send ^o ;Override methods
|
||||||
|
#i::Send ^i ;Implement methods
|
||||||
|
!Up::Send ^w ;Extend selection
|
||||||
|
!Down::Send ^+w ;Shrink selection
|
||||||
|
#+q::Send !q ;Context info
|
||||||
|
#!o::Send ^!o ;Optimize imports
|
||||||
|
#!i::Send ^!i ;Auto-indent line(s)
|
||||||
|
$^Backspace::Send ^y ;Delete line at caret
|
||||||
|
#+j::Send ^+j ;Smart line join
|
||||||
|
!Delete::Send ^{Delete} ;Delete to word end
|
||||||
|
!Backspace::Send ^{Backspace} ;Delete to word start
|
||||||
|
^+::Send ^{NumpadAdd} ;Expand code block
|
||||||
|
^-::Send ^{NumpadSub} ;Collapse code block
|
||||||
|
^++::Send ^+{NumpadAdd} ;Expand all
|
||||||
|
^+-::Send ^+{NumpadSub} ;Collapse all
|
||||||
|
^w::Send ^{F4} ;Close active editor tab
|
||||||
|
; Refactoring
|
||||||
|
^Delete::Send !{Delete} ;Safe Delete
|
||||||
|
^T::Send ^!+T ;Refactor this
|
||||||
|
; Navigation
|
||||||
|
^o::Send ^n ;Go to class
|
||||||
|
^+o::Send ^+n ;Go to file
|
||||||
|
^!o::Send ^!+n ;Go to symbol
|
||||||
|
#Right::Send !{Right} ;Go to next editor tab
|
||||||
|
#Left::Send !{Left} ;Go to previous editor tab
|
||||||
|
#l::Send ^g ;Go to line
|
||||||
|
#e::Send ^e ;Recent files popup
|
||||||
|
!Space::Send ^+i ;Open quick definition lookup
|
||||||
|
^Y::Send ^+i ;Open quick definition lookup
|
||||||
|
#+b::Send ^+b ;Go to type declaration
|
||||||
|
#Up::Send !{Up} ;Go to previous
|
||||||
|
#Down::Send !{Down} ;Go to next method
|
||||||
|
#h::Send ^h ;Type hierarchy
|
||||||
|
#!h::Send ^!h ;Call hierarchy
|
||||||
|
^Down::Send ^{Enter} ;Edit source/View source
|
||||||
|
!Home::Send !{Home} ;Show navigation bar
|
||||||
|
F2::Send {F11} ;Toggle bookmark
|
||||||
|
#F3::Send ^{F11} ;Toggle bookmark with mnemonic
|
||||||
|
#0::Send ^{0} ;Go to numbered bookmark
|
||||||
|
#1::Send ^{1} ;Go to numbered bookmark
|
||||||
|
#2::Send ^{2} ;Go to numbered bookmark
|
||||||
|
#3::Send ^{3} ;Go to numbered bookmark
|
||||||
|
#4::Send ^{4} ;Go to numbered bookmark
|
||||||
|
#5::Send ^{5} ;Go to numbered bookmark
|
||||||
|
#6::Send ^{6} ;Go to numbered bookmark
|
||||||
|
#7::Send ^{7} ;Go to numbered bookmark
|
||||||
|
#8::Send ^{8} ;Go to numbered bookmark
|
||||||
|
#9::Send ^{9} ;Go to numbered bookmark
|
||||||
|
^F3::Send +{F11} ;Show bookmarks
|
||||||
|
; Compile and Run
|
||||||
|
#!r::Send !+{F10} ;Select configuration and run
|
||||||
|
#!d::Send !+{F9} ;Select configuration and debug
|
||||||
|
#r::Send +{F10} ;Run
|
||||||
|
#d::Send +{F9} ;Debug
|
||||||
|
#+r::Send ^+{F10} ;Run context configuration from editor
|
||||||
|
#+d::Send ^+{F9} ;Debug context configuration from editor
|
||||||
|
; VCS/Local History
|
||||||
|
#v::Send !` ;VCS quick popup
|
||||||
|
#If
|
||||||
|
|
||||||
|
; Close all browsers
|
||||||
|
#IfWinActive ahk_group browsers
|
||||||
|
^q::send {Alt Down}f{Alt Up}x ; exit all windows
|
||||||
|
#If
|
||||||
|
|
||||||
; Sublime Text Remaps for VS Code
|
; Sublime Text Remaps for VS Code
|
||||||
#IfWinActive ahk_group vscode
|
#IfWinActive ahk_group vscode
|
||||||
|
#Space::Send ^{Space} ; Basic code completion
|
||||||
; Remap Ctrl+Shift to behave like macOS Sublimetext
|
; Remap Ctrl+Shift to behave like macOS Sublimetext
|
||||||
; Will extend cursor to multiple lines
|
; Will extend cursor to multiple lines
|
||||||
; #+Up::send ^!{Up} ; ST2CODE
|
; #+Up::send ^!{Up} ; ST2CODE
|
||||||
@@ -248,19 +371,80 @@ $^+Right::Send +{End}
|
|||||||
; Remap Ctrl+Cmd+G to select all matches
|
; Remap Ctrl+Cmd+G to select all matches
|
||||||
; #^g::send ^+{L} ; ST2CODE
|
; #^g::send ^+{L} ; ST2CODE
|
||||||
!+g::send ^+{G} ; View source control
|
!+g::send ^+{G} ; View source control
|
||||||
|
; Sigints - interrupt
|
||||||
|
$#c::Send {Ctrl down}c{Ctrl up}
|
||||||
#If
|
#If
|
||||||
|
|
||||||
#IfWinActive ahk_exe sublime_text.exe
|
#IfWinActive ahk_exe sublime_text.exe
|
||||||
; Remap Ctrl+Shift to behave like macOS Sublimetext
|
#Space::Send ^{Space} ; Basic code completion
|
||||||
; Will extend cursor to multiple lines
|
#^Up::send !{O} ; Switch file
|
||||||
#+Up::send {shift up}^!{Up}
|
#^f::send {F11} ; toggle_full_screen
|
||||||
#+Down::send {shift up}^!{Down}
|
^!v::send {Ctrl Down}k{Ctrl Up}{Ctrl Down}v{Ctrl Up} ; paste_from_history
|
||||||
|
^Up::Return ; cancel scroll_lines up
|
||||||
; Remap Ctrl+Cmd+G to select all matches
|
^!Up::send ^{Up} ; scroll_lines up
|
||||||
#^g::send !{F3}
|
^Down::Return ; cancel scroll_lines down
|
||||||
|
^!Down::send ^{Down} ; scroll_lines down
|
||||||
|
#+Up::send {shift up}^!{Up} ; multi-cursor up
|
||||||
|
#+Down::send {shift up}^!{Down} ; multi-cursor down
|
||||||
|
^PgDn::Return ; cancel next_view
|
||||||
|
^PgUp::Return ; cancel prev_view
|
||||||
|
^+{::send ^{PgDn} ; next_view
|
||||||
|
^+}::send ^{PgUp} ; prev_view
|
||||||
|
^!Right::send ^{PgDn} ; next_view
|
||||||
|
^!Left::send ^{PgUp} ; prev_view
|
||||||
|
Insert::Return ; cancel toggle_overwrite
|
||||||
|
^!O::send {Insert} ; toggle_overwrite
|
||||||
|
!c::Return ; cancel toggle_case_sensitive
|
||||||
|
^!c::send !{c} ; toggle_case_sensitive
|
||||||
|
; ^h::Return ; cancel replace
|
||||||
|
^!f::send ^{h} ; replace
|
||||||
|
^+h::Return ; cancel replace_next
|
||||||
|
^!e::send ^+{h} ; replace_next
|
||||||
|
F3::Return ; cancel find_next
|
||||||
|
^g::send {F3} ; find_next
|
||||||
|
*F3::Return ; cancel find_prev, find_under, find_all_under
|
||||||
|
^+g::send +{F3} ; find_prev
|
||||||
|
#!g::send ^{F3} ; find_under
|
||||||
|
#!+g::send ^+{F3} ; find_under_prev
|
||||||
|
#^g::send !{F3} ; find_all_under
|
||||||
|
^+Up::Return ; cancel swap_line_up
|
||||||
|
#!Up::send ^+{Up} ; swap_line_up
|
||||||
|
^+Down::Return ; cancel swap_line_down
|
||||||
|
#!Down::send ^+{Down} ; swap_line_down
|
||||||
|
^Pause::Return ; cancel cancel_build
|
||||||
|
#c::send ^{Pause} ; cancel_build
|
||||||
|
F9::Return ; cancel sort_lines case_s false
|
||||||
|
F5::send {F9} ; sort_lines case_s false
|
||||||
|
#F9::Return ; cancel sort_lines case_s true
|
||||||
|
#F5::send #{F9} ; sort_lines case_s true
|
||||||
|
!+1::Return ; cancel set_layout
|
||||||
|
^!1::send !+1 ; set_layout
|
||||||
|
!+2::Return ; cancel set_layout
|
||||||
|
^!2::send !+2 ; set_layout
|
||||||
|
!+3::Return ; cancel set_layout
|
||||||
|
^!3::send !+3 ; set_layout
|
||||||
|
!+4::Return ; cancel set_layout
|
||||||
|
^!4::send !+4 ; set_layout
|
||||||
|
!+5::Return ; cancel set_layout
|
||||||
|
^!5::send !+5 ; set_layout
|
||||||
|
!+8::Return ; cancel set_layout
|
||||||
|
^!8::send !+8 ; set_layout
|
||||||
|
!+9::Return ; cancel set_layout
|
||||||
|
^!9::send !+9 ; set_layout
|
||||||
#If
|
#If
|
||||||
|
|
||||||
#IfWinActive ahk_group terminals
|
#IfWinActive ahk_group terminals
|
||||||
|
|
||||||
|
; End of Line
|
||||||
|
#e::
|
||||||
|
Send {End}
|
||||||
|
return
|
||||||
|
|
||||||
|
; Beginning of Line
|
||||||
|
#a::
|
||||||
|
Send {Home}
|
||||||
|
return
|
||||||
|
|
||||||
; Copy
|
; Copy
|
||||||
^c::
|
^c::
|
||||||
SetKeyDelay -1
|
SetKeyDelay -1
|
||||||
@@ -277,7 +461,10 @@ $^+Right::Send +{End}
|
|||||||
|
|
||||||
; Paste
|
; Paste
|
||||||
^v::
|
^v::
|
||||||
If WinActive("ahk_group posix"){
|
If WinActive("ahk_exe mintty.exe"){
|
||||||
|
Send {Shift down}{Insert}{Shift up}
|
||||||
|
}
|
||||||
|
else if WinActive("ahk_group posix"){
|
||||||
Send {Blind}{Shift down}v{Shift up}
|
Send {Blind}{Shift down}v{Shift up}
|
||||||
}
|
}
|
||||||
else{
|
else{
|
||||||
@@ -306,28 +493,6 @@ $^+Right::Send +{End}
|
|||||||
}
|
}
|
||||||
return
|
return
|
||||||
|
|
||||||
; End of Line
|
|
||||||
^e::
|
|
||||||
SetKeyDelay -1
|
|
||||||
Send {Blind}{e DownTemp}
|
|
||||||
return
|
|
||||||
|
|
||||||
^e up::
|
|
||||||
SetKeyDelay -1
|
|
||||||
Send {Blind}{e Up}
|
|
||||||
return
|
|
||||||
|
|
||||||
; Beginning of Line
|
|
||||||
^a::
|
|
||||||
SetKeyDelay -1
|
|
||||||
Send {Blind}{a DownTemp}
|
|
||||||
return
|
|
||||||
|
|
||||||
^a up::
|
|
||||||
SetKeyDelay -1
|
|
||||||
Send {Blind}{a Up}
|
|
||||||
return
|
|
||||||
|
|
||||||
^l::Send clear{Enter}
|
^l::Send clear{Enter}
|
||||||
; #l::return
|
; #l::return
|
||||||
; Clear Terminal and Scroll Buffer
|
; Clear Terminal and Scroll Buffer
|
||||||
|
@@ -7,14 +7,14 @@ echo Not found.
|
|||||||
goto commonexit
|
goto commonexit
|
||||||
|
|
||||||
:win
|
:win
|
||||||
perl -pi -e "s/(; )(.*)(; WinModifiers)/$2$3/g" "%userprofile%\.kinto\kinto.ahk"
|
C:\Strawberry\perl\bin\perl.exe -pi -e "s/(; )(.*)(; WinModifiers)/$2$3/g" "%userprofile%\.kinto\kinto.ahk"
|
||||||
perl -pi -e "s/^(?!;)(.*)(; MacModifiers)/; $1$2/gm" "%userprofile%\.kinto\kinto.ahk"
|
C:\Strawberry\perl\bin\perl.exe -pi -e "s/^(?!;)(.*)(; MacModifiers)/; $1$2/gm" "%userprofile%\.kinto\kinto.ahk"
|
||||||
"C:\Program Files\AutoHotkey\AutoHotkey.exe" "%userprofile%\.kinto\kinto.ahk"
|
"C:\Program Files\AutoHotkey\AutoHotkey.exe" "%userprofile%\.kinto\kinto.ahk"
|
||||||
goto commonexit
|
goto commonexit
|
||||||
|
|
||||||
:mac
|
:mac
|
||||||
perl -pi -e "s/(; )(.*)(; MacModifiers)/$2$3/g" "%userprofile%\.kinto\kinto.ahk"
|
C:\Strawberry\perl\bin\perl.exe -pi -e "s/(; )(.*)(; MacModifiers)/$2$3/g" "%userprofile%\.kinto\kinto.ahk"
|
||||||
perl -pi -e "s/^(?!;)(.*)(; WinModifiers)/; $1$2/gm" "%userprofile%\.kinto\kinto.ahk"
|
C:\Strawberry\perl\bin\perl.exe -pi -e "s/^(?!;)(.*)(; WinModifiers)/; $1$2/gm" "%userprofile%\.kinto\kinto.ahk"
|
||||||
"C:\Program Files\AutoHotkey\AutoHotkey.exe" "%userprofile%\.kinto\kinto.ahk"
|
"C:\Program Files\AutoHotkey\AutoHotkey.exe" "%userprofile%\.kinto\kinto.ahk"
|
||||||
goto commonexit
|
goto commonexit
|
||||||
|
|
||||||
|
@@ -1,5 +1,5 @@
|
|||||||
Option Explicit
|
Option Explicit
|
||||||
Dim oWMISrv, collDvcs, iUSBDvc , iDvc, sDvcID, sPID, sVID
|
Dim oWMISrv, collDvcs, iUSBDvc , iDvc, sDvcID, sPID, sVID, deviceID
|
||||||
|
|
||||||
' add item to array
|
' add item to array
|
||||||
Function AddItem(arr, val)
|
Function AddItem(arr, val)
|
||||||
@@ -49,21 +49,23 @@ Dim nonApple: nonApple = 0
|
|||||||
Dim i
|
Dim i
|
||||||
|
|
||||||
If vcount = 1 Then
|
If vcount = 1 Then
|
||||||
|
deviceID = deviceVID(0)
|
||||||
If StrComp(deviceVID(0), "05AC") = 0 Then
|
If StrComp(deviceVID(0), "05AC") = 0 Then
|
||||||
Wscript.Echo "Apple"
|
Wscript.Echo "Apple " & deviceID
|
||||||
Else
|
Else
|
||||||
Wscript.Echo "Windows"
|
Wscript.Echo "Windows " & deviceID
|
||||||
End If
|
End If
|
||||||
Else
|
Else
|
||||||
For i = 0 To counter-1
|
For i = 0 To counter-1
|
||||||
|
deviceID = deviceVID(i)
|
||||||
If StrComp(deviceVID(i), "05AC") = -1 Then
|
If StrComp(deviceVID(i), "05AC") = -1 Then
|
||||||
nonApple = 1
|
nonApple = 1
|
||||||
End If
|
End If
|
||||||
Next
|
Next
|
||||||
If nonApple = 1 Then
|
If nonApple = 1 Then
|
||||||
Wscript.Echo "Windows"
|
Wscript.Echo "Windows " & deviceID
|
||||||
Else
|
Else
|
||||||
Wscript.Echo "Apple"
|
Wscript.Echo "Apple " & deviceID
|
||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
@@ -10,6 +10,11 @@ terminals = ["gnome-terminal","konsole","io.elementary.terminal","terminator","s
|
|||||||
terminals = [term.casefold() for term in terminals]
|
terminals = [term.casefold() for term in terminals]
|
||||||
termStr = "|".join(str(x) for x in terminals)
|
termStr = "|".join(str(x) for x in terminals)
|
||||||
|
|
||||||
|
# Use for browser specific hotkeys
|
||||||
|
browsers = ["Chromium","Chromium-browser","Google-chrome","Epiphany","Firefox","Discord"]
|
||||||
|
browsers = [browser.casefold() for browser in browsers]
|
||||||
|
browserStr = "|".join(str(x) for x in browsers)
|
||||||
|
|
||||||
mscodes = ["code","vscodium"]
|
mscodes = ["code","vscodium"]
|
||||||
codeStr = "|".join(str(x) for x in mscodes)
|
codeStr = "|".join(str(x) for x in mscodes)
|
||||||
|
|
||||||
@@ -18,22 +23,22 @@ define_conditional_modmap(lambda wm_class: wm_class.casefold() not in terminals,
|
|||||||
# # Chromebook
|
# # Chromebook
|
||||||
# Key.LEFT_ALT: Key.RIGHT_CTRL, # Chromebook
|
# Key.LEFT_ALT: Key.RIGHT_CTRL, # Chromebook
|
||||||
# Key.LEFT_CTRL: Key.LEFT_ALT, # Chromebook
|
# Key.LEFT_CTRL: Key.LEFT_ALT, # Chromebook
|
||||||
# Key.RIGHT_ALT: Key.RIGHT_CTRL, # Chromebook
|
# Key.RIGHT_ALT: Key.RIGHT_CTRL, # Chromebook - Multi-language (Remove)
|
||||||
# Key.RIGHT_CTRL: Key.RIGHT_ALT, # Chromebook
|
# Key.RIGHT_CTRL: Key.RIGHT_ALT, # Chromebook - Multi-language (Remove)
|
||||||
|
|
||||||
# # Default Mac/Win
|
# # Default Mac/Win
|
||||||
# Key.LEFT_ALT: Key.RIGHT_CTRL, # WinMac
|
# Key.LEFT_ALT: Key.RIGHT_CTRL, # WinMac
|
||||||
# Key.LEFT_META: Key.LEFT_ALT, # WinMac
|
# Key.LEFT_META: Key.LEFT_ALT, # WinMac
|
||||||
# Key.LEFT_CTRL: Key.LEFT_META, # WinMac
|
# Key.LEFT_CTRL: Key.LEFT_META, # WinMac
|
||||||
# Key.RIGHT_ALT: Key.RIGHT_CTRL, # WinMac
|
# Key.RIGHT_ALT: Key.RIGHT_CTRL, # WinMac - Multi-language (Remove)
|
||||||
# Key.RIGHT_META: Key.RIGHT_ALT, # WinMac
|
# Key.RIGHT_META: Key.RIGHT_ALT, # WinMac - Multi-language (Remove)
|
||||||
# Key.RIGHT_CTRL: Key.RIGHT_META, # WinMac
|
# Key.RIGHT_CTRL: Key.RIGHT_META, # WinMac - Multi-language (Remove)
|
||||||
|
|
||||||
# # Mac Only
|
# # Mac Only
|
||||||
# Key.LEFT_META: Key.RIGHT_CTRL, # Mac
|
# Key.LEFT_META: Key.RIGHT_CTRL, # Mac
|
||||||
# Key.LEFT_CTRL: Key.LEFT_META, # Mac
|
# Key.LEFT_CTRL: Key.LEFT_META, # Mac
|
||||||
# Key.RIGHT_META: Key.RIGHT_CTRL, # Mac
|
# Key.RIGHT_META: Key.RIGHT_CTRL, # Mac - Multi-language (Remove)
|
||||||
# Key.RIGHT_CTRL: Key.RIGHT_META, # Mac
|
# Key.RIGHT_CTRL: Key.RIGHT_META, # Mac - Multi-language (Remove)
|
||||||
})
|
})
|
||||||
|
|
||||||
# [Conditional modmap] Change modifier keys in certain applications
|
# [Conditional modmap] Change modifier keys in certain applications
|
||||||
@@ -51,14 +56,104 @@ define_conditional_modmap(re.compile(termStr, re.IGNORECASE), {
|
|||||||
# Key.LEFT_META: Key.LEFT_ALT, # WinMac
|
# Key.LEFT_META: Key.LEFT_ALT, # WinMac
|
||||||
# Key.LEFT_CTRL: Key.LEFT_CTRL, # WinMac
|
# Key.LEFT_CTRL: Key.LEFT_CTRL, # WinMac
|
||||||
# Key.RIGHT_ALT: Key.RIGHT_CTRL, # WinMac - Multi-language (Remove)
|
# Key.RIGHT_ALT: Key.RIGHT_CTRL, # WinMac - Multi-language (Remove)
|
||||||
# Key.RIGHT_META: Key.RIGHT_ALT, # WinMac
|
# Key.RIGHT_META: Key.RIGHT_ALT, # WinMac - Multi-language (Remove)
|
||||||
# Key.RIGHT_CTRL: Key.LEFT_CTRL, # WinMac
|
# Key.RIGHT_CTRL: Key.LEFT_CTRL, # WinMac - Multi-language (Remove)
|
||||||
|
|
||||||
# # Mac Only
|
# # Mac Only
|
||||||
# Key.LEFT_META: Key.RIGHT_CTRL, # Mac
|
# Key.LEFT_META: Key.RIGHT_CTRL, # Mac
|
||||||
# # Left Ctrl Stays Left Ctrl
|
# # Left Ctrl Stays Left Ctrl
|
||||||
# Key.RIGHT_META: Key.RIGHT_CTRL, # Mac
|
# Key.RIGHT_META: Key.RIGHT_CTRL, # Mac - Multi-language (Remove)
|
||||||
# Key.RIGHT_CTRL: Key.LEFT_CTRL, # Mac
|
# Key.RIGHT_CTRL: Key.LEFT_CTRL, # Mac - Multi-language (Remove)
|
||||||
|
})
|
||||||
|
|
||||||
|
# Keybindings for IntelliJ
|
||||||
|
define_keymap(re.compile("jetbrains-idea", re.IGNORECASE),{
|
||||||
|
# General
|
||||||
|
K("C-Key_0"): K("M-Key_0"), # Open corresponding tool window
|
||||||
|
K("C-Key_1"): K("M-Key_1"), # Open corresponding tool window
|
||||||
|
K("C-Key_2"): K("M-Key_2"), # Open corresponding tool window
|
||||||
|
K("C-Key_3"): K("M-Key_3"), # Open corresponding tool window
|
||||||
|
K("C-Key_4"): K("M-Key_4"), # Open corresponding tool window
|
||||||
|
K("C-Key_5"): K("M-Key_5"), # Open corresponding tool window
|
||||||
|
K("C-Key_6"): K("M-Key_6"), # Open corresponding tool window
|
||||||
|
K("C-Key_7"): K("M-Key_7"), # Open corresponding tool window
|
||||||
|
K("C-Key_8"): K("M-Key_8"), # Open corresponding tool window
|
||||||
|
K("C-Key_9"): K("M-Key_9"), # Open corresponding tool window
|
||||||
|
K("Super-Grave"): K("C-Grave"), # Quick switch current scheme
|
||||||
|
K("C-Comma"): K("C-M-s"), # Open Settings dialog
|
||||||
|
K("C-Semicolon"): K("C-M-Shift-s"), # Open Project Structure dialog
|
||||||
|
# Debugging
|
||||||
|
K("C-M-r"): K("F9"), # Resume program
|
||||||
|
# Search/Replace
|
||||||
|
K("C-g"): K("F3"), # Find next
|
||||||
|
K("C-Shift-F3"): K("Shift-F3"), # Find previous
|
||||||
|
K("Super-g"): K("M-j"), # Select next occurrence
|
||||||
|
K("C-Super-g"): K("C-M-Shift-j"), # Select all occurrences
|
||||||
|
K("Super-Shift-g"): K("M-Shift-j"), # Unselect occurrence
|
||||||
|
# Editing
|
||||||
|
K("Super-Space"): K("C-Space"), # Basic code completion
|
||||||
|
K("Super-Shift-Space"): K("C-Shift-Space"), # Smart code completion
|
||||||
|
K("Super-j"): K("C-q"), # Quick documentation lookup
|
||||||
|
K("C-n"): K("M-Insert"), # Generate code...
|
||||||
|
K("Super-o"): K("C-o"), # Override methods
|
||||||
|
K("Super-i"): K("C-i"), # Implement methods
|
||||||
|
K("M-Up"): K("C-w"), # Extend selection
|
||||||
|
K("M-Down"): K("C-Shift-w"), # Shrink selection
|
||||||
|
K("Super-Shift-q"): K("M-q"), # Context info
|
||||||
|
K("Super-M-o"): K("C-M-o"), # Optimize imports
|
||||||
|
K("Super-M-i"): K("C-M-i"), # Auto-indent line(s)
|
||||||
|
K("C-Backspace"): K("C-y"), # Delete line at caret
|
||||||
|
K("Super-Shift-j"): K("C-Shift-j"), # Smart line join
|
||||||
|
K("M-Delete"): K("C-Delete"), # Delete to word end
|
||||||
|
K("M-Backspace"): K("C-Backspace"), # Delete to word start
|
||||||
|
K("C-Shift-Equal"): K("C-KPPLUS"), # Expand code block
|
||||||
|
K("C-Minus"): K("C-KPMINUS"), # Collapse code block
|
||||||
|
K("C-Shift-Equal"): K("C-Shift-KPPLUS"), # Expand all
|
||||||
|
K("C-Shift-Minus"): K("C-Shift-KPMINUS"), # Collapse all
|
||||||
|
K("C-w"): K("C-F4"), # Close active editor tab
|
||||||
|
# Refactoring
|
||||||
|
K("C-Delete"): K("M-Delete"), # Safe Delete
|
||||||
|
K("C-T"): K("C-M-Shift-t"), # Refactor this
|
||||||
|
# Navigation
|
||||||
|
K("C-o"): K("C-n"), # Go to class
|
||||||
|
K("C-Shift-o"): K("C-Shift-n"), # Go to file
|
||||||
|
K("C-M-o"): K("C-M-Shift-n"), # Go to symbol
|
||||||
|
K("Super-Right"): K("M-Right"), # Go to next editor tab
|
||||||
|
K("Super-Left"): K("M-Left"), # Go to previous editor tab
|
||||||
|
K("Super-l"): K("C-g"), # Go to line
|
||||||
|
K("Super-e"): K("C-e"), # Recent files popup
|
||||||
|
K("M-Space"): K("C-Shift-i"), # Open quick definition lookup
|
||||||
|
K("C-Y"): K("C-Shift-i"), # Open quick definition lookup
|
||||||
|
K("Super-Shift-b"): K("C-Shift-b"), # Go to type declaration
|
||||||
|
K("Super-Up"): K("M-Up"), # Go to previous
|
||||||
|
K("Super-Down"): K("M-Down"), # Go to next method
|
||||||
|
K("Super-h"): K("C-h"), # Type hierarchy
|
||||||
|
K("Super-M-h"): K("C-M-h"), # Call hierarchy
|
||||||
|
K("C-Down"): K("C-Enter"), # Edit source/View source
|
||||||
|
K("M-Home"): K("M-Home"), # Show navigation bar
|
||||||
|
K("F2"): K("F11"), # Toggle bookmark
|
||||||
|
K("Super-F3"): K("C-F11"), # Toggle bookmark with mnemonic
|
||||||
|
K("Super-Key_0"): K("C-Key_0"), # Go to numbered bookmark
|
||||||
|
K("Super-Key_1"): K("C-Key_1"), # Go to numbered bookmark
|
||||||
|
K("Super-Key_2"): K("C-Key_2"), # Go to numbered bookmark
|
||||||
|
K("Super-Key_3"): K("C-Key_3"), # Go to numbered bookmark
|
||||||
|
K("Super-Key_4"): K("C-Key_4"), # Go to numbered bookmark
|
||||||
|
K("Super-Key_5"): K("C-Key_5"), # Go to numbered bookmark
|
||||||
|
K("Super-Key_6"): K("C-Key_6"), # Go to numbered bookmark
|
||||||
|
K("Super-Key_7"): K("C-Key_7"), # Go to numbered bookmark
|
||||||
|
K("Super-Key_8"): K("C-Key_8"), # Go to numbered bookmark
|
||||||
|
K("Super-Key_9"): K("C-Key_9"), # Go to numbered bookmark
|
||||||
|
K("C-F3"): K("Shift-F11"), # Show bookmarks
|
||||||
|
# Compile and Run
|
||||||
|
K("Super-M-r"): K("M-Shift-F10"), # Select configuration and run
|
||||||
|
K("Super-M-d"): K("M-Shift-F9"), # Select configuration and debug
|
||||||
|
K("Super-r"): K("Shift-F10"), # Run
|
||||||
|
K("Super-d"): K("Shift-F9"), # Debug
|
||||||
|
K("Super-Shift-r"): K("C-Shift-F10"), # Run context configuration from editor
|
||||||
|
K("Super-Shift-d"): K("C-Shift-F9"), # Debug context configuration from editor
|
||||||
|
# VCS/Local History
|
||||||
|
K("Super-v"): K("M-Grave"), # VCS quick popup
|
||||||
|
K("Super-c"): K("LC-c"), # Sigints - interrupt
|
||||||
})
|
})
|
||||||
|
|
||||||
# Keybindings for Nautilus
|
# Keybindings for Nautilus
|
||||||
@@ -69,6 +164,11 @@ define_keymap(re.compile("org.gnome.nautilus", re.IGNORECASE),{
|
|||||||
K("RC-Right"): K("M-Right"), # Go Forward
|
K("RC-Right"): K("M-Right"), # Go Forward
|
||||||
})
|
})
|
||||||
|
|
||||||
|
# Keybindings for Browsers
|
||||||
|
define_keymap(re.compile(browserStr, re.IGNORECASE),{
|
||||||
|
K("RC-Q"): K("RC-Q"), # Close all browsers Instances
|
||||||
|
})
|
||||||
|
|
||||||
define_keymap(None,{
|
define_keymap(None,{
|
||||||
# Basic App hotkey functions
|
# Basic App hotkey functions
|
||||||
K("RC-Q"): K("Alt-F4"),
|
K("RC-Q"): K("Alt-F4"),
|
||||||
@@ -113,6 +213,7 @@ define_keymap(None,{
|
|||||||
})
|
})
|
||||||
|
|
||||||
define_keymap(lambda wm_class: wm_class.casefold() not in mscodes,{
|
define_keymap(lambda wm_class: wm_class.casefold() not in mscodes,{
|
||||||
|
K("Super-Space"): K("C-Space"), # Basic code completion
|
||||||
# Wordwise remaining - for Everything but VS Code
|
# Wordwise remaining - for Everything but VS Code
|
||||||
K("M-Left"): K("C-Left"), # Left of Word
|
K("M-Left"): K("C-Left"), # Left of Word
|
||||||
K("M-Shift-Left"): K("C-Shift-Left"), # Select Left of Word
|
K("M-Shift-Left"): K("C-Shift-Left"), # Select Left of Word
|
||||||
@@ -161,6 +262,7 @@ define_keymap(re.compile(codeStr, re.IGNORECASE),{
|
|||||||
K("C-g"): K("f3"), # find_next
|
K("C-g"): K("f3"), # find_next
|
||||||
K("Shift-f3"): pass_through_key, # cancel find_prev
|
K("Shift-f3"): pass_through_key, # cancel find_prev
|
||||||
K("C-Shift-g"): K("Shift-f3"), # find_prev
|
K("C-Shift-g"): K("Shift-f3"), # find_prev
|
||||||
|
K("Super-c"): K("LC-c"), # Sigints - interrupt
|
||||||
# K("Super-C-g"): K("C-f2"), # Default - Sublime - find_all_under
|
# K("Super-C-g"): K("C-f2"), # Default - Sublime - find_all_under
|
||||||
# K("C-M-g"): K("C-f2"), # Chromebook - Sublime - find_all_under
|
# K("C-M-g"): K("C-f2"), # Chromebook - Sublime - find_all_under
|
||||||
# K("Super-Shift-up"): K("M-Shift-up"), # multi-cursor up - Sublime
|
# K("Super-Shift-up"): K("M-Shift-up"), # multi-cursor up - Sublime
|
||||||
@@ -171,13 +273,14 @@ define_keymap(re.compile(codeStr, re.IGNORECASE),{
|
|||||||
|
|
||||||
# Keybindings for Sublime Text
|
# Keybindings for Sublime Text
|
||||||
define_keymap(re.compile("Sublime_text", re.IGNORECASE),{
|
define_keymap(re.compile("Sublime_text", re.IGNORECASE),{
|
||||||
|
K("Super-Space"): K("C-Space"), # Basic code completion
|
||||||
K("C-Super-up"): K("M-o"), # Switch file
|
K("C-Super-up"): K("M-o"), # Switch file
|
||||||
K("Super-RC-f"): K("f11"), # toggle_full_screen
|
K("Super-RC-f"): K("f11"), # toggle_full_screen
|
||||||
K("C-M-v"): [K("C-k"), K("C-v")], # paste_from_history
|
K("C-M-v"): [K("C-k"), K("C-v")], # paste_from_history
|
||||||
K("C-up"): pass_through_key, # cancel scroll_lines up
|
K("C-up"): pass_through_key, # cancel scroll_lines up
|
||||||
K("Super-M-up"): K("C-up"), # scroll_lines up
|
K("C-M-up"): K("C-up"), # scroll_lines up
|
||||||
K("C-down"): pass_through_key, # cancel scroll_lines down
|
K("C-down"): pass_through_key, # cancel scroll_lines down
|
||||||
K("Super-M-down"): K("C-down"), # scroll_lines down
|
K("C-M-down"): K("C-down"), # scroll_lines down
|
||||||
K("Super-Shift-up"): K("M-Shift-up"), # multi-cursor up
|
K("Super-Shift-up"): K("M-Shift-up"), # multi-cursor up
|
||||||
K("Super-Shift-down"): K("M-Shift-down"), # multi-cursor down
|
K("Super-Shift-down"): K("M-Shift-down"), # multi-cursor down
|
||||||
K("C-PAGE_DOWN"): pass_through_key, # cancel next_view
|
K("C-PAGE_DOWN"): pass_through_key, # cancel next_view
|
||||||
@@ -207,9 +310,9 @@ define_keymap(re.compile("Sublime_text", re.IGNORECASE),{
|
|||||||
# K("M-C-g"): K("M-Refresh"), # Chromebook - find_all_under
|
# K("M-C-g"): K("M-Refresh"), # Chromebook - find_all_under
|
||||||
K("Super-C-g"): K("M-f3"), # Default - find_all_under
|
K("Super-C-g"): K("M-f3"), # Default - find_all_under
|
||||||
K("C-Shift-up"): pass_through_key, # cancel swap_line_up
|
K("C-Shift-up"): pass_through_key, # cancel swap_line_up
|
||||||
K("Super-C-up"): K("C-Shift-up"), # swap_line_up
|
K("Super-M-up"): K("C-Shift-up"), # swap_line_up
|
||||||
K("C-Shift-down"): pass_through_key, # cancel swap_line_down
|
K("C-Shift-down"): pass_through_key, # cancel swap_line_down
|
||||||
K("Super-C-down"): K("C-Shift-down"), # swap_line_down
|
K("Super-M-down"): K("C-Shift-down"), # swap_line_down
|
||||||
K("C-Pause"): pass_through_key, # cancel cancel_build
|
K("C-Pause"): pass_through_key, # cancel cancel_build
|
||||||
K("Super-c"): K("C-Pause"), # cancel_build
|
K("Super-c"): K("C-Pause"), # cancel_build
|
||||||
K("f9"): pass_through_key, # cancel sort_lines case_s false
|
K("f9"): pass_through_key, # cancel sort_lines case_s false
|
||||||
|
@@ -75,13 +75,13 @@ function uninstall {
|
|||||||
function removeAppleKB {
|
function removeAppleKB {
|
||||||
# Undo Apple keyboard cmd & alt swap
|
# 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
|
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 -a /sys/module/hid_apple/parameters/swap_opt_cmd
|
echo '0' | sudo tee /sys/module/hid_apple/parameters/swap_opt_cmd
|
||||||
echo 'options hid_apple swap_opt_cmd=0' | sudo tee -a /etc/modprobe.d/hid_apple.conf
|
echo 'options hid_apple swap_opt_cmd=0' | sudo tee /etc/modprobe.d/hid_apple.conf
|
||||||
sudo update-initramfs -u -k all
|
sudo update-initramfs -u -k all
|
||||||
fi
|
fi
|
||||||
if test -f "/sys/module/applespi/parameters/swap_opt_cmd" && [ `cat /sys/module/applespi/parameters/swap_opt_cmd` == "1" ]; then
|
if test -f "/sys/module/applespi/parameters/swap_opt_cmd" && [ `cat /sys/module/applespi/parameters/swap_opt_cmd` == "1" ]; then
|
||||||
echo '0' | sudo tee -a /sys/module/applespi/parameters/swap_opt_cmd
|
echo '0' | sudo tee /sys/module/applespi/parameters/swap_opt_cmd
|
||||||
echo 'options applespi swap_opt_cmd=0' | sudo tee -a /etc/modprobe.d/applespi.conf
|
echo 'options applespi swap_opt_cmd=0' | sudo tee /etc/modprobe.d/applespi.conf
|
||||||
sudo update-initramfs -u -k all
|
sudo update-initramfs -u -k all
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
@@ -115,7 +115,7 @@ function budgieUpdate {
|
|||||||
budgieVersion="$(/usr/bin/budgie-desktop --version | awk '{ print $2; }' | head -n1)"
|
budgieVersion="$(/usr/bin/budgie-desktop --version | awk '{ print $2; }' | head -n1)"
|
||||||
if [ "$budgieVersion" == "10.5.1" ]; then
|
if [ "$budgieVersion" == "10.5.1" ]; then
|
||||||
if ! [ -f ./system-config/budgie-daemon_10.5.1 ]; then
|
if ! [ -f ./system-config/budgie-daemon_10.5.1 ]; then
|
||||||
wget https://github.com/rbreaves/budgie-desktop/raw/f112e0e349c021c1bbfa7e45c16083eae0d92fac/binaries/budgie-daemon_10.5.1 -O ./system-config/budgie-daemon_10.5.1
|
wget https://github.com/rbreaves/budgie-desktop/blob/binaries/binaries/budgie-daemon_10.5.1?raw=true -O ./system-config/budgie-daemon_10.5.1
|
||||||
fi
|
fi
|
||||||
bdmd5=$(md5sum /usr/bin/budgie-daemon | awk '{ print $1 }')
|
bdmd5=$(md5sum /usr/bin/budgie-daemon | awk '{ print $1 }')
|
||||||
newbdmd5=$(md5sum ./system-config/budgie-daemon_10.5.1 | awk '{ print $1 }')
|
newbdmd5=$(md5sum ./system-config/budgie-daemon_10.5.1 | awk '{ print $1 }')
|
||||||
@@ -151,9 +151,9 @@ function budgieUpdate {
|
|||||||
|
|
||||||
if [ $# -eq 0 ]; then
|
if [ $# -eq 0 ]; then
|
||||||
echo "Install Kinto - xkeysnail (udev)"
|
echo "Install Kinto - xkeysnail (udev)"
|
||||||
echo " 1) Windows & Mac (HID driver)"
|
echo " 1) Windows & Mac (HID driver) - Most Standard keyboards (& 1st party usb/bt Apple keyboards)"
|
||||||
echo " 2) Mac Only & VMs on Macbooks"
|
echo " 2) Mac Only & VMs on Macbooks - 3rd & 1st party Apple keyboards"
|
||||||
echo " 3) Chromebook"
|
echo " 3) Chromebook - Chromebook running Linux"
|
||||||
# echo " 5) Uninstall"
|
# echo " 5) Uninstall"
|
||||||
|
|
||||||
read n
|
read n
|
||||||
@@ -168,7 +168,7 @@ vssublime=false
|
|||||||
|
|
||||||
if [[ $1 == "1" || $1 == "2" || $1 == "3" || $1 == "winmac" || $1 == "mac" || $1 == "chromebook" ]]; then
|
if [[ $1 == "1" || $1 == "2" || $1 == "3" || $1 == "winmac" || $1 == "mac" || $1 == "chromebook" ]]; then
|
||||||
while true; do
|
while true; do
|
||||||
read -rep $'\nDo you want multi-language support (the right Alt key will not remap)? (y/N)\n' yn
|
read -rep $'\nDo you want multi-language on Right Alt key? (y/N)\naka Left side remaps, right side doesn\'t\n' yn
|
||||||
case $yn in
|
case $yn in
|
||||||
[Yy]* ) rightalt=true; break;;
|
[Yy]* ) rightalt=true; break;;
|
||||||
* ) break;;
|
* ) break;;
|
||||||
@@ -234,6 +234,7 @@ if [[ $1 == "1" || $1 == "2" || $1 == "3" || $1 == "winmac" || $1 == "mac" || $1
|
|||||||
chmod +x ~/.kde/Autostart/kintohost.sh
|
chmod +x ~/.kde/Autostart/kintohost.sh
|
||||||
|
|
||||||
# KDE startup - xhost fix
|
# KDE startup - xhost fix
|
||||||
|
mkdir -p ~/.config/autostart
|
||||||
yes | cp -rf ./xkeysnail-config/xkeysnail.desktop ~/.config/autostart/xkeysnail.desktop
|
yes | cp -rf ./xkeysnail-config/xkeysnail.desktop ~/.config/autostart/xkeysnail.desktop
|
||||||
|
|
||||||
yes | cp -rf ./xkeysnail-config/xkeystart.sh ~/.config/kinto/xkeystart.sh
|
yes | cp -rf ./xkeysnail-config/xkeystart.sh ~/.config/kinto/xkeystart.sh
|
||||||
@@ -251,14 +252,14 @@ if [[ $1 == "1" || $1 == "2" || $1 == "3" || $1 == "winmac" || $1 == "mac" || $1
|
|||||||
fi
|
fi
|
||||||
sed -i "s/{username}/`whoami`/g" ./xkeysnail-config/xkeysnail.service.new
|
sed -i "s/{username}/`whoami`/g" ./xkeysnail-config/xkeysnail.service.new
|
||||||
sed -i "s#{homedir}#`echo "$HOME"`#g" ./xkeysnail-config/xkeysnail.service.new
|
sed -i "s#{homedir}#`echo "$HOME"`#g" ./xkeysnail-config/xkeysnail.service.new
|
||||||
sed -i "s#{xhost}#`which xhost`#g" ./xkeysnail-config/xkeysnail.service.new
|
sed -i "s#{xhost}#`\\which xhost`#g" ./xkeysnail-config/xkeysnail.service.new
|
||||||
sed -i "s/{username}/`whoami`/g" ./xkeysnail-config/limitedadmins.new
|
sed -i "s/{username}/`whoami`/g" ./xkeysnail-config/limitedadmins.new
|
||||||
sed -i "s#{homedir}#`echo "$HOME"`#g" ./xkeysnail-config/limitedadmins.new
|
sed -i "s#{homedir}#`echo "$HOME"`#g" ./xkeysnail-config/limitedadmins.new
|
||||||
sed -i "s#{systemctl}#`which systemctl`#g" ./xkeysnail-config/limitedadmins.new
|
sed -i "s#{systemctl}#`\\which systemctl`#g" ./xkeysnail-config/limitedadmins.new
|
||||||
sudo chown root:root ./xkeysnail-config/limitedadmins.new
|
sudo chown root:root ./xkeysnail-config/limitedadmins.new
|
||||||
sudo mv ./xkeysnail-config/limitedadmins.new /etc/sudoers.d/limitedadmins
|
sudo mv ./xkeysnail-config/limitedadmins.new /etc/sudoers.d/limitedadmins
|
||||||
sed -i "s#{systemctl}#`which systemctl`#g" ~/.config/autostart/xkeysnail.desktop
|
sed -i "s#{systemctl}#`\\which systemctl`#g" ~/.config/autostart/xkeysnail.desktop
|
||||||
sed -i "s#{xhost}#`which xhost`#g" ~/.config/autostart/xkeysnail.desktop
|
sed -i "s#{xhost}#`\\which xhost`#g" ~/.config/autostart/xkeysnail.desktop
|
||||||
sed -i "s#{homedir}#`echo "$HOME"`#g" ~/.config/kinto/prexk.sh
|
sed -i "s#{homedir}#`echo "$HOME"`#g" ~/.config/kinto/prexk.sh
|
||||||
sed -i "s/{displayid}/`echo "$DISPLAY"`/g" ./xkeysnail-config/xkeysnail.service.new
|
sed -i "s/{displayid}/`echo "$DISPLAY"`/g" ./xkeysnail-config/xkeysnail.service.new
|
||||||
sed -i "s/{displayid}/`echo "$DISPLAY"`/g" ~/.config/kinto/prexk.sh
|
sed -i "s/{displayid}/`echo "$DISPLAY"`/g" ~/.config/kinto/prexk.sh
|
||||||
@@ -270,10 +271,10 @@ fi
|
|||||||
|
|
||||||
if [[ $1 == "1" || $1 == "winmac" ]]; then
|
if [[ $1 == "1" || $1 == "winmac" ]]; then
|
||||||
if ls /sys/module | grep hid_apple >/dev/null 2>&1 ; then
|
if ls /sys/module | grep hid_apple >/dev/null 2>&1 ; then
|
||||||
echo '1' | sudo tee -a /sys/module/hid_apple/parameters/swap_opt_cmd;echo 'options hid_apple swap_opt_cmd=1' | sudo tee -a /etc/modprobe.d/hid_apple.conf;sudo update-initramfs -u -k all
|
echo '1' | sudo tee /sys/module/hid_apple/parameters/swap_opt_cmd;echo 'options hid_apple swap_opt_cmd=1' | sudo tee /etc/modprobe.d/hid_apple.conf;sudo update-initramfs -u -k all
|
||||||
fi
|
fi
|
||||||
if ls /sys/module | grep applespi >/dev/null 2>&1 ; then
|
if ls /sys/module | grep applespi >/dev/null 2>&1 ; then
|
||||||
echo '1' | sudo tee -a /sys/module/applespi/parameters/swap_opt_cmd;echo 'options applespi swap_opt_cmd=1' | sudo tee -a /etc/modprobe.d/applespi.conf;sudo update-initramfs -u -k all
|
echo '1' | sudo tee /sys/module/applespi/parameters/swap_opt_cmd;echo 'options applespi swap_opt_cmd=1' | sudo tee /etc/modprobe.d/applespi.conf;sudo update-initramfs -u -k all
|
||||||
fi
|
fi
|
||||||
if ! ls /sys/module | grep apple ; then
|
if ! ls /sys/module | grep apple ; then
|
||||||
removeAppleKB
|
removeAppleKB
|
||||||
|
Reference in New Issue
Block a user