mirror of
https://github.com/rbreaves/kinto.git
synced 2025-08-05 18:38:26 +02:00
Compare commits
68 Commits
Author | SHA1 | Date | |
---|---|---|---|
![]() |
cbb60668e3 | ||
![]() |
0275669be1 | ||
![]() |
3899fcf596 | ||
![]() |
20c93600e1 | ||
![]() |
c0bfec035f | ||
![]() |
eb576a6217 | ||
![]() |
b34dc4e928 | ||
![]() |
2ffe639024 | ||
![]() |
4c5cb36503 | ||
![]() |
6b4c697dd0 | ||
![]() |
7fe9230b5f | ||
![]() |
e3d42651b7 | ||
![]() |
ca54bf89d6 | ||
![]() |
772413a9c3 | ||
![]() |
bbd7b3fc93 | ||
![]() |
98120062eb | ||
![]() |
637a8fecaa | ||
![]() |
ad53b7034d | ||
![]() |
896c6fd6a1 | ||
![]() |
dbaf02f884 | ||
![]() |
79857af79c | ||
![]() |
53206855f4 | ||
![]() |
6298c6c9cc | ||
![]() |
318efcc3fd | ||
![]() |
2567f5006e | ||
![]() |
fd648d3850 | ||
![]() |
ac34350392 | ||
![]() |
8df691a52d | ||
![]() |
11f8e33fdf | ||
![]() |
7de111726b | ||
![]() |
5a12521b58 | ||
![]() |
ad196c4d6b | ||
![]() |
17a877c693 | ||
![]() |
0c3e03a81b | ||
![]() |
163117d4fb | ||
![]() |
4c8ae68027 | ||
![]() |
ed771f4ae4 | ||
![]() |
9d5c7b6230 | ||
![]() |
b85b786dcc | ||
![]() |
7904be6d5c | ||
![]() |
df5d2d8c0e | ||
![]() |
a556f1afa9 | ||
![]() |
61fe293af8 | ||
![]() |
3ac264ea99 | ||
![]() |
32111fe5a4 | ||
![]() |
dff590e7df | ||
![]() |
bc27f3c205 | ||
![]() |
4c820d9f67 | ||
![]() |
8e6f1962e0 | ||
![]() |
59521772af | ||
![]() |
099b3cea88 | ||
![]() |
e1b3911546 | ||
![]() |
7bf3ccdda3 | ||
![]() |
029d83ad5b | ||
![]() |
5da49257dc | ||
![]() |
b529a5b14a | ||
![]() |
fcb823bb2f | ||
![]() |
69acc58487 | ||
![]() |
50e6dfd863 | ||
![]() |
0843103eda | ||
![]() |
a52bf9959d | ||
![]() |
fbea226894 | ||
![]() |
e6db6a9726 | ||
![]() |
05b0694776 | ||
![]() |
d6c98a345c | ||
![]() |
bf84cb3153 | ||
![]() |
c98268c287 | ||
![]() |
a48246d3e3 |
4
.gitattributes
vendored
4
.gitattributes
vendored
@@ -1,3 +1,3 @@
|
|||||||
*.py linguist-detectable=false
|
*.py linguist-detectable=true
|
||||||
*.json liguist-detectable=false
|
*.json liguist-detectable=false
|
||||||
*.c linguist-detectable=true
|
*.c linguist-detectable=true
|
||||||
|
2
.gitignore
vendored
2
.gitignore
vendored
@@ -2,3 +2,5 @@
|
|||||||
.DS_Store
|
.DS_Store
|
||||||
__pycache__/
|
__pycache__/
|
||||||
xkeysnail/
|
xkeysnail/
|
||||||
|
keybindings_*
|
||||||
|
mutter_*
|
||||||
|
137
README.md
137
README.md
@@ -10,6 +10,34 @@
|
|||||||
|
|
||||||
Seamless copy and paste with all apps and terminals. Also the only linux remapper that is aware of your cursor/caret status - meaning it avoids shortcut conflicts within an app versus wordwise shortcuts when a text field is in use. (xkeysnail implementation of Kinto has caret checking disabled in master for now.)
|
Seamless copy and paste with all apps and terminals. Also the only linux remapper that is aware of your cursor/caret status - meaning it avoids shortcut conflicts within an app versus wordwise shortcuts when a text field is in use. (xkeysnail implementation of Kinto has caret checking disabled in master for now.)
|
||||||
|
|
||||||
|
## Table of Contents
|
||||||
|
|
||||||
|
[What does this do exactly?](#What-does-this-do-exactly)
|
||||||
|
|
||||||
|
[What does Kinto require?](#What-does-Kinto-require)
|
||||||
|
|
||||||
|
[How to install](#How-to-install)
|
||||||
|
|
||||||
|
[Shortcut Creation (Xkeysnail)](#Shortcut-Creation-Xkeysnail)
|
||||||
|
|
||||||
|
[Other Notes Related to Install](#Other-Notes-Related-to-Install)
|
||||||
|
|
||||||
|
[How to Upgrade/Control Kinto](#How-to-Upgrade-Kinto)
|
||||||
|
|
||||||
|
[Troubleshooting](#Troubleshooting)
|
||||||
|
|
||||||
|
[Language Support](#Language-Support)
|
||||||
|
|
||||||
|
[Related or Useful Resources](#Related-or-Useful-Resources)
|
||||||
|
|
||||||
|
[Contributing](#Contributing)
|
||||||
|
|
||||||
|
[More information about Kinto](#More-information-about-Kinto)
|
||||||
|
|
||||||
|
[License](#License)
|
||||||
|
|
||||||
|
[Credits and Contributions](#Credits-and-Contributions)
|
||||||
|
|
||||||
## What does this do exactly?
|
## What does this do exactly?
|
||||||
|
|
||||||
Kinto works for standard Windows, Apple and Chromebook keyboards. The following however describes the dynamic rebinding based on a standard Windows keyboard. (Alt location is Cmd for Apple keyboards)
|
Kinto works for standard Windows, Apple and Chromebook keyboards. The following however describes the dynamic rebinding based on a standard Windows keyboard. (Alt location is Cmd for Apple keyboards)
|
||||||
@@ -20,6 +48,10 @@ Kinto works for standard Windows, Apple and Chromebook keyboards. The following
|
|||||||
|
|
||||||
- Cursor/word-wise shortcut keys have been added to align with macOS keyboard shortcuts.
|
- Cursor/word-wise shortcut keys have been added to align with macOS keyboard shortcuts.
|
||||||
|
|
||||||
|
Does Kinto have to have specific keyamps for individual apps?
|
||||||
|
|
||||||
|
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!
|
||||||
|
|
||||||
## What does Kinto require?
|
## What does Kinto require?
|
||||||
|
|
||||||
- Python (initial install only)
|
- Python (initial install only)
|
||||||
@@ -36,7 +68,7 @@ On most distros you can confirm navigate to your "Language Support" and set "Key
|
|||||||
|
|
||||||
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
|
- WSL Ubuntu edition
|
||||||
- Powershell - run as Administrator
|
- Powershell - run as Administrator
|
||||||
@@ -85,9 +117,9 @@ To Uninstall Kinto
|
|||||||
**Terminal Keys**
|
**Terminal Keys**
|
||||||
| Value| Description|Mac/Kinto Equivalent|
|
| Value| Description|Mac/Kinto Equivalent|
|
||||||
| ----- |:--------:|:--------:|
|
| ----- |:--------:|:--------:|
|
||||||
|RC,RCtrl|Right Control on Left & Right Alt/Cmd key|Cmd|
|
|RC,RCtrl|Right Control → Left & Right Alt/Cmd key|Cmd|
|
||||||
|M,Alt| Alt/Option|Alt/Option|
|
|M,Alt|Alt/Option|Alt/Option|
|
||||||
|Ctrl | Ctrl|Ctrl|
|
|LC,LCtrl |Left Control|Ctrl|
|
||||||
|
|
||||||
You can define new keymaps for your specific app via this method. You also do not have to cancel out the original keybinding if you do not need or want to, but you can do so with "pass_through_key".
|
You can define new keymaps for your specific app via this method. You also do not have to cancel out the original keybinding if you do not need or want to, but you can do so with "pass_through_key".
|
||||||
|
|
||||||
@@ -116,7 +148,9 @@ The older xkb shortcut method info can be read about in ticket [#125](https://gi
|
|||||||
|
|
||||||
## Other Notes Related to Install
|
## Other Notes Related to Install
|
||||||
|
|
||||||
**Manjaro with Gnome there are issues.**
|
**Manjaro with Gnome there are issues with caret/input checking.**
|
||||||
|
|
||||||
|
Only impacts back/forward hotkeys for web browsers.
|
||||||
|
|
||||||
Please see this ticket for more information.
|
Please see this ticket for more information.
|
||||||
|
|
||||||
@@ -189,7 +223,6 @@ systemctl --user disable keyswap
|
|||||||
sudo systemctl disable xkeysnail
|
sudo systemctl disable xkeysnail
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|
||||||
## Learning macOS style hotkeys on Linux
|
## Learning macOS style hotkeys on Linux
|
||||||
|
|
||||||
You can use websites like https://www.shortcutfoo.com in Google Chrome while using the terminal style keymap, but Firefox is not compatible due to detecting "cmd" as keycode 224. Chrome detects Win/Super/Cmd as keycode 91 on all OS's.
|
You can use websites like https://www.shortcutfoo.com in Google Chrome while using the terminal style keymap, but Firefox is not compatible due to detecting "cmd" as keycode 224. Chrome detects Win/Super/Cmd as keycode 91 on all OS's.
|
||||||
@@ -313,16 +346,102 @@ sudo systemctl start xkeysnail
|
|||||||
sudo systemctl status xkeysnail
|
sudo systemctl status xkeysnail
|
||||||
```
|
```
|
||||||
|
|
||||||
|
## Notes about Windows 10
|
||||||
|
Sharpkeys was used to create the layout/reg files to swap the Ctrl, Win and Alt keys. Sharpkeys was not required however because the reg keys were extracted. Autohotkey is used to manage keyswaps needed for terminal usage. Autohotkey is also used to add additional mac like keybinds for Sublime text and can be used for other apps as well.
|
||||||
|
|
||||||
|
Microsoft is working on a new Powertoy Keyboard Manager that could be used with an easier to use GUI interface, but this approach should be fully sufficient for a mac like experience and autohotkeys appears to be more than capable enough to handle complex rebinding of any or most mac like shortcuts.
|
||||||
|
|
||||||
## Language Support
|
## Language Support
|
||||||
I'd appreciate any help from people with non-US based keyboards, to help ensure that these keymaps and keyswap methods work in all or most languages.
|
I'd appreciate any help from people with non-US based keyboards, to help ensure that these keymaps and keyswap methods work in all or most languages.
|
||||||
|
|
||||||
If you would like to attempt adding additional custom keymaps for other languages then I strongly recommend reading Glen Whitney's post here.
|
If you would like to attempt adding additional custom keymaps for other languages then I strongly recommend reading Glen Whitney's post here.
|
||||||
https://superuser.com/questions/385748/binding-superc-superv-to-copy-and-paste
|
https://superuser.com/questions/385748/binding-superc-superv-to-copy-and-paste
|
||||||
|
|
||||||
## Notes about Windows 10
|
## Related or Useful Resources
|
||||||
Sharpkeys was used to create the layout/reg files to swap the Ctrl, Win and Alt keys. Sharpkeys was not required however because the reg keys were extracted. Autohotkey is used to manage keyswaps needed for terminal usage. Autohotkey is also used to add additional mac like keybinds for Sublime text and can be used for other apps as well.
|
|
||||||
|
|
||||||
Microsoft is working on a new Powertoy Keyboard Manager that could be used with an easier to use GUI interface, but this approach should be fully sufficient for a mac like experience and autohotkeys appears to be more than capable enough to handle complex rebinding of any or most mac like shortcuts.
|
[Xkeysnail](https://github.com/mooz/xkeysnail) by mooz
|
||||||
|
|
||||||
|
Yet another keyboard remapping tool for X environment
|
||||||
|
|
||||||
|
[fusuma](https://github.com/iberianpig/fusuma) by iberianpig
|
||||||
|
|
||||||
|
Multitouch gestures with libinput driver on Linux
|
||||||
|
|
||||||
|
[Fluent Terminal - Windows only](https://github.com/felixse/FluentTerminal) by felixse
|
||||||
|
|
||||||
|
A Terminal Emulator based on UWP and web technologies.
|
||||||
|
|
||||||
|
[PowerToys - Windows only](https://github.com/microsoft/PowerToys) by microsoft
|
||||||
|
|
||||||
|
Windows system utilities to maximize productivity
|
||||||
|
|
||||||
|
[AutoHotKey - Windows only](https://github.com/AutoHotkey/AutoHotkey) by AutoHotkey
|
||||||
|
|
||||||
|
AutoHotkey is a powerful and easy to use scripting language for desktop automation on Windows.
|
||||||
|
|
||||||
|
[pykeymacs](https://github.com/zhanghai/pykeymacs) by zhanghai
|
||||||
|
|
||||||
|
Emacs style keyboard macros implemented in Python
|
||||||
|
|
||||||
|
[Dynamic Wallpapers](https://github.com/adi1090x/dynamic-wallpaper) by adi1090x
|
||||||
|
|
||||||
|
Simple bash script to set a Dynamic Wallpaper according to certain conditions.
|
||||||
|
|
||||||
|
[macify-linux](https://github.com/Jonchun/macify-linux) by JonChun
|
||||||
|
|
||||||
|
Automated setup scripts to transform Linux into macOS. (Uses Kinto for key remaps)
|
||||||
|
|
||||||
|
[ibus-typing-booster](https://github.com/mike-fabian/ibus-typing-booster) by mike-fabian
|
||||||
|
|
||||||
|
ibus-typing-booster is a completion input method for faster typing
|
||||||
|
|
||||||
|
[twemoji color font](https://github.com/eosrei/twemoji-color-font) by eosrei
|
||||||
|
|
||||||
|
Twitter Unicode 12 emoji color SVGinOT font for Linux/MacOS/Windows
|
||||||
|
|
||||||
|
[iTerm2 Color Schemes](https://github.com/mbadolato/iTerm2-Color-Schemes) by mbadolato
|
||||||
|
|
||||||
|
Over 225 terminal color schemes/themes for iTerm/iTerm2. Includes ports to Terminal, Konsole, PuTTY, Xresources, XRDB, Remmina, Termite, XFCE, Tilda, FreeBSD VT, Terminator, Kitty...
|
||||||
|
|
||||||
|
[espanso](https://github.com/federico-terzi/espanso) by federico-terzi
|
||||||
|
|
||||||
|
Cross-platform Text Expander written in Rust
|
||||||
|
|
||||||
|
[GalliumOS](https://github.com/GalliumOS/galliumos-distro) by GalliumOS
|
||||||
|
|
||||||
|
Docs, issues, and artwork sources for GalliumOS
|
||||||
|
|
||||||
|
[eOS-X](https://github.com/ipproductions/eOS-X) by ipproductions
|
||||||
|
|
||||||
|
Dark & Light Theme w/ OSX controls for Elementary OS
|
||||||
|
|
||||||
|
[Autorandr](https://github.com/phillipberndt/autorandr) by phillipberndt
|
||||||
|
|
||||||
|
Auto-detect the connected display hardware and load the appropriate X11 setup using xrandr
|
||||||
|
|
||||||
|
[Barrier](https://github.com/debauchee/barrier) by debauchee
|
||||||
|
|
||||||
|
Open-source KVM software
|
||||||
|
|
||||||
|
[Synergy Free Binaries](https://github.com/amankhoza/synergy-binaries) by amankhoza
|
||||||
|
|
||||||
|
The latest freely available Synergy binaries
|
||||||
|
|
||||||
|
[Synergy Official](https://symless.com/) by Symless
|
||||||
|
|
||||||
|
Latest Official Synergy
|
||||||
|
|
||||||
|
[Karabiner-Elements](https://github.com/pqrs-org/Karabiner-Elements) by pqrs-org
|
||||||
|
|
||||||
|
Karabiner-Elements is a powerful utility for keyboard customization on macOS Sierra (10.12) or later.
|
||||||
|
|
||||||
|
[mbpfan](https://github.com/linux-on-mac/mbpfan) by linux-on-mac
|
||||||
|
|
||||||
|
A simple daemon to control fan speed on all MacBook/MacBook Pros (probably all Apple computers) for Linux Kernel 3 and newer
|
||||||
|
|
||||||
|
[vala-panel](https://github.com/rilian-la-te/vala-panel) by rilian-la-te
|
||||||
|
|
||||||
|
Vala rewrite of SimplePanel - GitHub mirror (Global Menu for XFCE)
|
||||||
|
|
||||||
## Contributing
|
## Contributing
|
||||||
|
|
||||||
|
432
references/builtin-keyboard.json
Normal file
432
references/builtin-keyboard.json
Normal file
@@ -0,0 +1,432 @@
|
|||||||
|
{"scancode":"01",
|
||||||
|
"eventcode":1,
|
||||||
|
"eventname":"ESC"},
|
||||||
|
{"scancode":"02",
|
||||||
|
"eventcode":2,
|
||||||
|
"eventname":"1"},
|
||||||
|
{"scancode":"03",
|
||||||
|
"eventcode":3,
|
||||||
|
"eventname":"2"},
|
||||||
|
{"scancode":"04",
|
||||||
|
"eventcode":4,
|
||||||
|
"eventname":"3"},
|
||||||
|
{"scancode":"05",
|
||||||
|
"eventcode":5,
|
||||||
|
"eventname":"4"},
|
||||||
|
{"scancode":"06",
|
||||||
|
"eventcode":6,
|
||||||
|
"eventname":"5"},
|
||||||
|
{"scancode":"07",
|
||||||
|
"eventcode":7,
|
||||||
|
"eventname":"6"},
|
||||||
|
{"scancode":"08",
|
||||||
|
"eventcode":8,
|
||||||
|
"eventname":"7"},
|
||||||
|
{"scancode":"09",
|
||||||
|
"eventcode":9,
|
||||||
|
"eventname":"8"},
|
||||||
|
{"scancode":"0a",
|
||||||
|
"eventcode":10,
|
||||||
|
"eventname":"9"},
|
||||||
|
{"scancode":"0b",
|
||||||
|
"eventcode":11,
|
||||||
|
"eventname":"0"},
|
||||||
|
{"scancode":"0c",
|
||||||
|
"eventcode":12,
|
||||||
|
"eventname":"MINUS"},
|
||||||
|
{"scancode":"0d",
|
||||||
|
"eventcode":13,
|
||||||
|
"eventname":"EQUAL"},
|
||||||
|
{"scancode":"0e",
|
||||||
|
"eventcode":14,
|
||||||
|
"eventname":"BACKSPACE"},
|
||||||
|
{"scancode":"0f",
|
||||||
|
"eventcode":15,
|
||||||
|
"eventname":"TAB"},
|
||||||
|
{"scancode":"10",
|
||||||
|
"eventcode":16,
|
||||||
|
"eventname":"Q"},
|
||||||
|
{"scancode":"11",
|
||||||
|
"eventcode":17,
|
||||||
|
"eventname":"W"},
|
||||||
|
{"scancode":"12",
|
||||||
|
"eventcode":18,
|
||||||
|
"eventname":"E"},
|
||||||
|
{"scancode":"13",
|
||||||
|
"eventcode":19,
|
||||||
|
"eventname":"R"},
|
||||||
|
{"scancode":"14",
|
||||||
|
"eventcode":20,
|
||||||
|
"eventname":"T"},
|
||||||
|
{"scancode":"15",
|
||||||
|
"eventcode":21,
|
||||||
|
"eventname":"Y"},
|
||||||
|
{"scancode":"16",
|
||||||
|
"eventcode":22,
|
||||||
|
"eventname":"U"},
|
||||||
|
{"scancode":"17",
|
||||||
|
"eventcode":23,
|
||||||
|
"eventname":"I"},
|
||||||
|
{"scancode":"18",
|
||||||
|
"eventcode":24,
|
||||||
|
"eventname":"O"},
|
||||||
|
{"scancode":"19",
|
||||||
|
"eventcode":25,
|
||||||
|
"eventname":"P"},
|
||||||
|
{"scancode":"1a",
|
||||||
|
"eventcode":26,
|
||||||
|
"eventname":"LEFTBRACE"},
|
||||||
|
{"scancode":"1b",
|
||||||
|
"eventcode":27,
|
||||||
|
"eventname":"RIGHTBRACE"},
|
||||||
|
{"scancode":"1c",
|
||||||
|
"eventcode":28,
|
||||||
|
"eventname":"ENTER"},
|
||||||
|
{"scancode":"1d",
|
||||||
|
"eventcode":29,
|
||||||
|
"eventname":"LEFTCTRL"},
|
||||||
|
{"scancode":"1e",
|
||||||
|
"eventcode":30,
|
||||||
|
"eventname":"A"},
|
||||||
|
{"scancode":"1f",
|
||||||
|
"eventcode":31,
|
||||||
|
"eventname":"S"},
|
||||||
|
{"scancode":"20",
|
||||||
|
"eventcode":32,
|
||||||
|
"eventname":"D"},
|
||||||
|
{"scancode":"21",
|
||||||
|
"eventcode":33,
|
||||||
|
"eventname":"F"},
|
||||||
|
{"scancode":"22",
|
||||||
|
"eventcode":34,
|
||||||
|
"eventname":"G"},
|
||||||
|
{"scancode":"23",
|
||||||
|
"eventcode":35,
|
||||||
|
"eventname":"H"},
|
||||||
|
{"scancode":"24",
|
||||||
|
"eventcode":36,
|
||||||
|
"eventname":"J"},
|
||||||
|
{"scancode":"25",
|
||||||
|
"eventcode":37,
|
||||||
|
"eventname":"K"},
|
||||||
|
{"scancode":"26",
|
||||||
|
"eventcode":38,
|
||||||
|
"eventname":"L"},
|
||||||
|
{"scancode":"27",
|
||||||
|
"eventcode":39,
|
||||||
|
"eventname":"SEMICOLON"},
|
||||||
|
{"scancode":"28",
|
||||||
|
"eventcode":40,
|
||||||
|
"eventname":"APOSTROPHE"},
|
||||||
|
{"scancode":"29",
|
||||||
|
"eventcode":41,
|
||||||
|
"eventname":"GRAVE"},
|
||||||
|
{"scancode":"2a",
|
||||||
|
"eventcode":42,
|
||||||
|
"eventname":"LEFTSHIFT"},
|
||||||
|
{"scancode":"2b",
|
||||||
|
"eventcode":43,
|
||||||
|
"eventname":"BACKSLASH"},
|
||||||
|
{"scancode":"2c",
|
||||||
|
"eventcode":44,
|
||||||
|
"eventname":"Z"},
|
||||||
|
{"scancode":"2d",
|
||||||
|
"eventcode":45,
|
||||||
|
"eventname":"X"},
|
||||||
|
{"scancode":"2e",
|
||||||
|
"eventcode":46,
|
||||||
|
"eventname":"C"},
|
||||||
|
{"scancode":"2f",
|
||||||
|
"eventcode":47,
|
||||||
|
"eventname":"V"},
|
||||||
|
{"scancode":"30",
|
||||||
|
"eventcode":48,
|
||||||
|
"eventname":"B"},
|
||||||
|
{"scancode":"31",
|
||||||
|
"eventcode":49,
|
||||||
|
"eventname":"N"},
|
||||||
|
{"scancode":"32",
|
||||||
|
"eventcode":50,
|
||||||
|
"eventname":"M"},
|
||||||
|
{"scancode":"33",
|
||||||
|
"eventcode":51,
|
||||||
|
"eventname":"COMMA"},
|
||||||
|
{"scancode":"34",
|
||||||
|
"eventcode":52,
|
||||||
|
"eventname":"DOT"},
|
||||||
|
{"scancode":"35",
|
||||||
|
"eventcode":53,
|
||||||
|
"eventname":"SLASH"},
|
||||||
|
{"scancode":"36",
|
||||||
|
"eventcode":54,
|
||||||
|
"eventname":"RIGHTSHIFT"},
|
||||||
|
{"scancode":"37",
|
||||||
|
"eventcode":55,
|
||||||
|
"eventname":"KPASTERISK"},
|
||||||
|
{"scancode":"38",
|
||||||
|
"eventcode":56,
|
||||||
|
"eventname":"LEFTALT"},
|
||||||
|
{"scancode":"39",
|
||||||
|
"eventcode":57,
|
||||||
|
"eventname":"SPACE"},
|
||||||
|
{"scancode":"40",
|
||||||
|
"eventcode":58,
|
||||||
|
"eventname":"CAPSLOCK"},
|
||||||
|
{"scancode":"41",
|
||||||
|
"eventcode":59,
|
||||||
|
"eventname":"F1"},
|
||||||
|
{"scancode":"42",
|
||||||
|
"eventcode":60,
|
||||||
|
"eventname":"F2"},
|
||||||
|
{"scancode":"43",
|
||||||
|
"eventcode":61,
|
||||||
|
"eventname":"F3"},
|
||||||
|
{"scancode":"44",
|
||||||
|
"eventcode":62,
|
||||||
|
"eventname":"F4"},
|
||||||
|
{"scancode":"45",
|
||||||
|
"eventcode":63,
|
||||||
|
"eventname":"F5"},
|
||||||
|
{"scancode":"46",
|
||||||
|
"eventcode":64,
|
||||||
|
"eventname":"F6"},
|
||||||
|
{"scancode":"47",
|
||||||
|
"eventcode":65,
|
||||||
|
"eventname":"F7"},
|
||||||
|
{"scancode":"48",
|
||||||
|
"eventcode":66,
|
||||||
|
"eventname":"F8"},
|
||||||
|
{"scancode":"49",
|
||||||
|
"eventcode":67,
|
||||||
|
"eventname":"F9"},
|
||||||
|
{"scancode":"50",
|
||||||
|
"eventcode":68,
|
||||||
|
"eventname":"F10"},
|
||||||
|
{"scancode":"51",
|
||||||
|
"eventcode":69,
|
||||||
|
"eventname":"NUMLOCK"},
|
||||||
|
{"scancode":"52",
|
||||||
|
"eventcode":70,
|
||||||
|
"eventname":"SCROLLLOCK"},
|
||||||
|
{"scancode":"53",
|
||||||
|
"eventcode":71,
|
||||||
|
"eventname":"KP7"},
|
||||||
|
{"scancode":"54",
|
||||||
|
"eventcode":72,
|
||||||
|
"eventname":"KP8"},
|
||||||
|
{"scancode":"55",
|
||||||
|
"eventcode":73,
|
||||||
|
"eventname":"KP9"},
|
||||||
|
{"scancode":"56",
|
||||||
|
"eventcode":74,
|
||||||
|
"eventname":"KPMINUS"},
|
||||||
|
{"scancode":"57",
|
||||||
|
"eventcode":75,
|
||||||
|
"eventname":"KP4"},
|
||||||
|
{"scancode":"58",
|
||||||
|
"eventcode":76,
|
||||||
|
"eventname":"KP5"},
|
||||||
|
{"scancode":"59",
|
||||||
|
"eventcode":77,
|
||||||
|
"eventname":"KP6"},
|
||||||
|
{"scancode":"5A",
|
||||||
|
"eventcode":78,
|
||||||
|
"eventname":"KPPLUS"},
|
||||||
|
{"scancode":"5B",
|
||||||
|
"eventcode":79,
|
||||||
|
"eventname":"KP1"},
|
||||||
|
{"scancode":"5C",
|
||||||
|
"eventcode":80,
|
||||||
|
"eventname":"KP2"},
|
||||||
|
{"scancode":"5D",
|
||||||
|
"eventcode":81,
|
||||||
|
"eventname":"KP3"},
|
||||||
|
{"scancode":"5E",
|
||||||
|
"eventcode":82,
|
||||||
|
"eventname":"KP0"},
|
||||||
|
{"scancode":"5F",
|
||||||
|
"eventcode":83,
|
||||||
|
"eventname":"KPDOT"},
|
||||||
|
{"scancode":"60",
|
||||||
|
"eventcode":85,
|
||||||
|
"eventname":"ZENKAKUHANKAKU"},
|
||||||
|
{"scancode":"61",
|
||||||
|
"eventcode":86,
|
||||||
|
"eventname":"102ND"},
|
||||||
|
{"scancode":"62",
|
||||||
|
"eventcode":87,
|
||||||
|
"eventname":"F11"},
|
||||||
|
{"scancode":"63",
|
||||||
|
"eventcode":88,
|
||||||
|
"eventname":"F12"},
|
||||||
|
{"scancode":"64",
|
||||||
|
"eventcode":89,
|
||||||
|
"eventname":"RO"},
|
||||||
|
{"scancode":"65",
|
||||||
|
"eventcode":90,
|
||||||
|
"eventname":"KATAKANA"},
|
||||||
|
{"scancode":"66",
|
||||||
|
"eventcode":91,
|
||||||
|
"eventname":"HIRAGANA"},
|
||||||
|
{"scancode":"67",
|
||||||
|
"eventcode":92,
|
||||||
|
"eventname":"HENKAN"},
|
||||||
|
{"scancode":"68",
|
||||||
|
"eventcode":93,
|
||||||
|
"eventname":"KATAKANAHIRAGANA"},
|
||||||
|
{"scancode":"69",
|
||||||
|
"eventcode":94,
|
||||||
|
"eventname":"MUHENKAN"},
|
||||||
|
{"scancode":"6A",
|
||||||
|
"eventcode":95,
|
||||||
|
"eventname":"KPJPCOMMA"},
|
||||||
|
{"scancode":"6B",
|
||||||
|
"eventcode":96,
|
||||||
|
"eventname":"KPENTER"},
|
||||||
|
{"scancode":"6C",
|
||||||
|
"eventcode":97,
|
||||||
|
"eventname":"RIGHTCTRL"},
|
||||||
|
{"scancode":"6D",
|
||||||
|
"eventcode":98,
|
||||||
|
"eventname":"KPSLASH"},
|
||||||
|
{"scancode":"6E",
|
||||||
|
"eventcode":99,
|
||||||
|
"eventname":"SYSRQ"},
|
||||||
|
{"scancode":"6F",
|
||||||
|
"eventcode":100,
|
||||||
|
"eventname":"RIGHTALT"},
|
||||||
|
{"scancode":"70",
|
||||||
|
"eventcode":102,
|
||||||
|
"eventname":"HOME"},
|
||||||
|
{"scancode":"71",
|
||||||
|
"eventcode":103,
|
||||||
|
"eventname":"UP"},
|
||||||
|
{"scancode":"72",
|
||||||
|
"eventcode":104,
|
||||||
|
"eventname":"PAGEUP"},
|
||||||
|
{"scancode":"73",
|
||||||
|
"eventcode":105,
|
||||||
|
"eventname":"LEFT"},
|
||||||
|
{"scancode":"74",
|
||||||
|
"eventcode":106,
|
||||||
|
"eventname":"RIGHT"},
|
||||||
|
{"scancode":"75",
|
||||||
|
"eventcode":107,
|
||||||
|
"eventname":"END"},
|
||||||
|
{"scancode":"76",
|
||||||
|
"eventcode":108,
|
||||||
|
"eventname":"DOWN"},
|
||||||
|
{"scancode":"77",
|
||||||
|
"eventcode":109,
|
||||||
|
"eventname":"PAGEDOWN"},
|
||||||
|
{"scancode":"78",
|
||||||
|
"eventcode":110,
|
||||||
|
"eventname":"INSERT"},
|
||||||
|
{"scancode":"79",
|
||||||
|
"eventcode":111,
|
||||||
|
"eventname":"DELETE"},
|
||||||
|
{"scancode":"7A",
|
||||||
|
"eventcode":112,
|
||||||
|
"eventname":"MACRO"},
|
||||||
|
{"scancode":"7B",
|
||||||
|
"eventcode":113,
|
||||||
|
"eventname":"MUTE"},
|
||||||
|
{"scancode":"7C",
|
||||||
|
"eventcode":114,
|
||||||
|
"eventname":"VOLUMEDOWN"},
|
||||||
|
{"scancode":"7D",
|
||||||
|
"eventcode":115,
|
||||||
|
"eventname":"VOLUMEUP"},
|
||||||
|
{"scancode":"7E",
|
||||||
|
"eventcode":116,
|
||||||
|
"eventname":"POWER"},
|
||||||
|
{"scancode":"7F",
|
||||||
|
"eventcode":117,
|
||||||
|
"eventname":"KPEQUAL"},
|
||||||
|
{"scancode":"80",
|
||||||
|
"eventcode":118,
|
||||||
|
"eventname":"KPPLUSMINUS"},
|
||||||
|
{"scancode":"81",
|
||||||
|
"eventcode":119,
|
||||||
|
"eventname":"PAUSE"},
|
||||||
|
{"scancode":"82",
|
||||||
|
"eventcode":121,
|
||||||
|
"eventname":"KPCOMMA"},
|
||||||
|
{"scancode":"83",
|
||||||
|
"eventcode":122,
|
||||||
|
"eventname":"HANGUEL"},
|
||||||
|
{"scancode":"84",
|
||||||
|
"eventcode":123,
|
||||||
|
"eventname":"HANJA"},
|
||||||
|
{"scancode":"85",
|
||||||
|
"eventcode":124,
|
||||||
|
"eventname":"YEN"},
|
||||||
|
{"scancode":"86",
|
||||||
|
"eventcode":125,
|
||||||
|
"eventname":"LEFTMETA"},
|
||||||
|
{"scancode":"87",
|
||||||
|
"eventcode":126,
|
||||||
|
"eventname":"RIGHTMETA"},
|
||||||
|
{"scancode":"88",
|
||||||
|
"eventcode":127,
|
||||||
|
"eventname":"COMPOSE"},
|
||||||
|
{"scancode":"89",
|
||||||
|
"eventcode":128,
|
||||||
|
"eventname":"STOP"},
|
||||||
|
{"scancode":"8A",
|
||||||
|
"eventcode":140,
|
||||||
|
"eventname":"CALC"},
|
||||||
|
{"scancode":"8B",
|
||||||
|
"eventcode":142,
|
||||||
|
"eventname":"SLEEP"},
|
||||||
|
{"scancode":"8C",
|
||||||
|
"eventcode":143,
|
||||||
|
"eventname":"WAKEUP"},
|
||||||
|
{"scancode":"8D",
|
||||||
|
"eventcode":155,
|
||||||
|
"eventname":"MAIL"},
|
||||||
|
{"scancode":"8E",
|
||||||
|
"eventcode":156,
|
||||||
|
"eventname":"BOOKMARKS"},
|
||||||
|
{"scancode":"8F",
|
||||||
|
"eventcode":157,
|
||||||
|
"eventname":"COMPUTER"},
|
||||||
|
{"scancode":"90",
|
||||||
|
"eventcode":158,
|
||||||
|
"eventname":"BACK"},
|
||||||
|
{"scancode":"91",
|
||||||
|
"eventcode":159,
|
||||||
|
"eventname":"FORWARD"},
|
||||||
|
{"scancode":"92",
|
||||||
|
"eventcode":163,
|
||||||
|
"eventname":"NEXTSONG"},
|
||||||
|
{"scancode":"93",
|
||||||
|
"eventcode":164,
|
||||||
|
"eventname":"PLAYPAUSE"},
|
||||||
|
{"scancode":"94",
|
||||||
|
"eventcode":165,
|
||||||
|
"eventname":"PREVIOUSSONG"},
|
||||||
|
{"scancode":"95",
|
||||||
|
"eventcode":166,
|
||||||
|
"eventname":"STOPCD"},
|
||||||
|
{"scancode":"96",
|
||||||
|
"eventcode":172,
|
||||||
|
"eventname":"HOMEPAGE"},
|
||||||
|
{"scancode":"97",
|
||||||
|
"eventcode":173,
|
||||||
|
"eventname":"REFRESH"},
|
||||||
|
{"scancode":"98",
|
||||||
|
"eventcode":183,
|
||||||
|
"eventname":"F13"},
|
||||||
|
{"scancode":"99",
|
||||||
|
"eventcode":184,
|
||||||
|
"eventname":"F14"},
|
||||||
|
{"scancode":"9A",
|
||||||
|
"eventcode":185,
|
||||||
|
"eventname":"F15"},
|
||||||
|
{"scancode":"9B",
|
||||||
|
"eventcode":217,
|
||||||
|
"eventname":"SEARCH"},
|
||||||
|
{"scancode":"9C",
|
||||||
|
"eventcode":226,
|
||||||
|
"eventname":"MEDIA"}
|
138
references/overlay.py
Normal file
138
references/overlay.py
Normal file
@@ -0,0 +1,138 @@
|
|||||||
|
import wx
|
||||||
|
# import wx.richtext as rt
|
||||||
|
# import images
|
||||||
|
# http://www.ccp4.ac.uk/dist/checkout/wxPython-src-3.0.2.0/wxPython/demo/RichTextCtrl.py
|
||||||
|
# https://stackoverflow.com/questions/40257359/how-to-dynamically-update-multiple-wxpython-static-text
|
||||||
|
|
||||||
|
def GetRoundBitmap( w, h, r ):
|
||||||
|
maskColor = wx.Colour(0,0,0)
|
||||||
|
shownColor = wx.Colour(5,5,5)
|
||||||
|
b = wx.EmptyBitmap(w,h)
|
||||||
|
dc = wx.MemoryDC(b)
|
||||||
|
dc.SetBrush(wx.Brush(maskColor))
|
||||||
|
dc.DrawRectangle(0,0,w,h)
|
||||||
|
dc.SetBrush(wx.Brush(shownColor))
|
||||||
|
dc.SetPen(wx.Pen(shownColor))
|
||||||
|
dc.DrawRoundedRectangle(0,0,w,h,r)
|
||||||
|
dc.SelectObject(wx.NullBitmap)
|
||||||
|
b.SetMaskColour(maskColor)
|
||||||
|
return b
|
||||||
|
|
||||||
|
def GetRoundShape( w, h, r ):
|
||||||
|
return wx.Region( GetRoundBitmap(w,h,r) )
|
||||||
|
|
||||||
|
class PanelOne(wx.Panel):
|
||||||
|
def __init__(self, parent):
|
||||||
|
wx.Panel.__init__(self, parent)
|
||||||
|
self.Bind(wx.EVT_KEY_UP, self.OnKeyDown)
|
||||||
|
wx.StaticText(self, label = "'^⌘G - Select All (Ctrl-Cmd-G) ^⌘G - Select All (Ctrl-Cmd-G)\n^⌘G - Select All (Ctrl-Cmd-G) ^⌘G - Select All (Ctrl-Cmd-G)")
|
||||||
|
self.SetTransparent( 220 )
|
||||||
|
|
||||||
|
def OnKeyDown(self, event):
|
||||||
|
self.Destroy()
|
||||||
|
|
||||||
|
class FancyFrame(wx.Frame):
|
||||||
|
def __init__(self):
|
||||||
|
sizer = wx.GridBagSizer()
|
||||||
|
style = ( wx.CLIP_CHILDREN | wx.STAY_ON_TOP | wx.FRAME_NO_TASKBAR |
|
||||||
|
wx.NO_BORDER | wx.FRAME_SHAPED )
|
||||||
|
wx.Frame.__init__(self, None, title='Fancy', style = style)
|
||||||
|
|
||||||
|
# self.rtc = rt.RichTextCtrl(self, style=wx.VSCROLL|wx.TE_READONLY|wx.HSCROLL|wx.NO_BORDER);
|
||||||
|
# self.rtc.Disable()
|
||||||
|
boldstatic = wx.Font(pointSize = 24, family = wx.DEFAULT,
|
||||||
|
style = wx.BOLD, weight = wx.BOLD,
|
||||||
|
faceName = 'Consolas')
|
||||||
|
normalstatic = wx.Font(pointSize = 10, family = wx.DEFAULT,
|
||||||
|
style = wx.NORMAL, weight = wx.NORMAL,
|
||||||
|
faceName = 'Consolas')
|
||||||
|
# font = wx.Font(pointSize = 18, family = wx.DEFAULT,
|
||||||
|
# style = wx.NORMAL, weight = wx.NORMAL,
|
||||||
|
# faceName = 'Consolas')
|
||||||
|
self.SetFont(boldstatic)
|
||||||
|
self.SetBackgroundColour((211,211,211))
|
||||||
|
self.label = wx.StaticText(self, label = "^⌘G", pos = (100,50))
|
||||||
|
self.SetFont(normalstatic)
|
||||||
|
self.label2 = wx.StaticText(self, label = " - Select All (Ctrl-Cmd-G)", pos = (200,50))
|
||||||
|
# sizer.Add(self.label, (4, 0), (1, 5), wx.EXPAND)
|
||||||
|
# sizer.Add(self.label2, (5, 0), (1, 5), wx.EXPAND)
|
||||||
|
# wx.StaticText(self, label = "^⌘G - Select All (Ctrl-Cmd-G) || ^⌘G - Select All (Ctrl-Cmd-G)\n^⌘G - Select All (Ctrl-Cmd-G) ^⌘G - Select All (Ctrl-Cmd-G)")
|
||||||
|
# self.rtc.Bind(wx.EVT_SET_FOCUS,self.OnInput)
|
||||||
|
# self.rtc.Bind(wx.EVT_KILL_FOCUS,self.OnInput)
|
||||||
|
# self.rtc.Bind(wx.EVT_KEY_UP, self.OnKeyDown)
|
||||||
|
# self.rtc.BeginFontSize(14)
|
||||||
|
# self.rtc.BeginBold()
|
||||||
|
# self.rtc.WriteText("^⌘G")
|
||||||
|
# self.rtc.EndBold()
|
||||||
|
# self.rtc.BeginFontSize(10)
|
||||||
|
# self.rtc.WriteText(" - Select All (Ctrl-Cmd-G)\n")
|
||||||
|
# self.rtc.BeginFontSize(14)
|
||||||
|
# self.rtc.WriteText("Different font sizes on the same line is allowed, too.")
|
||||||
|
# self.rtc.EndFontSize()
|
||||||
|
|
||||||
|
# self.rtc.WriteText(" Next we'll show an indented paragraph.")
|
||||||
|
|
||||||
|
# self.rtc.BeginLeftIndent(60)
|
||||||
|
# self.rtc.Newline()
|
||||||
|
|
||||||
|
# self.rtc.WriteText("It was in January, the most down-trodden month of an Edinburgh winter. An attractive woman came into the cafe, which is nothing remarkable.")
|
||||||
|
# self.rtc.EndLeftIndent()
|
||||||
|
# self.SetFont(wx.Font(20, wx.SWISS, wx.NORMAL, wx.BOLD))
|
||||||
|
# font = wx.Font(18, wx.DECORATIVE, wx.ITALIC, wx.NORMAL)
|
||||||
|
# wx.text.SetFont(font)
|
||||||
|
# self.panelOne = PanelOne(self)
|
||||||
|
# self.SetFocus()
|
||||||
|
w, h = wx.GetDisplaySize()
|
||||||
|
self.SetSize((w/2, h/2))
|
||||||
|
self.SetPosition( ((w-w/2)/2,(h-h/2)/2) )
|
||||||
|
self.SetTransparent( 220 )
|
||||||
|
|
||||||
|
self.Bind(wx.EVT_KEY_UP, self.OnKeyDown)
|
||||||
|
self.Bind(wx.EVT_MOTION, self.OnMouse)
|
||||||
|
self.Bind(wx.EVT_PAINT, self.OnPaint)
|
||||||
|
if wx.Platform == '__WXGTK__':
|
||||||
|
self.Bind(wx.EVT_WINDOW_CREATE, self.SetRoundShape)
|
||||||
|
else:
|
||||||
|
self.SetRoundShape()
|
||||||
|
|
||||||
|
self.SetSizer(sizer)
|
||||||
|
self.Show(True)
|
||||||
|
|
||||||
|
|
||||||
|
def OnInput(self, e):
|
||||||
|
self.Destroy()
|
||||||
|
# e.Skip()
|
||||||
|
|
||||||
|
def SetRoundShape(self, event=None):
|
||||||
|
w, h = self.GetSizeTuple()
|
||||||
|
self.SetShape(GetRoundShape( w,h, 10 ) )
|
||||||
|
|
||||||
|
def OnPaint(self, event):
|
||||||
|
dc = wx.PaintDC(self)
|
||||||
|
dc = wx.GCDC(dc)
|
||||||
|
w, h = self.GetSizeTuple()
|
||||||
|
r = 10
|
||||||
|
dc.SetPen( wx.Pen("#D3D3D3dth = 2"))
|
||||||
|
dc.SetBrush( wx.Brush("#D3D3D3"))
|
||||||
|
dc.DrawRoundedRectangle( 0,0,w,h,r )
|
||||||
|
|
||||||
|
def OnKeyDown(self, event):
|
||||||
|
# self.Close(force=True)
|
||||||
|
self.Destroy()
|
||||||
|
|
||||||
|
def OnMouse(self, event):
|
||||||
|
"""implement dragging"""
|
||||||
|
if not event.Dragging():
|
||||||
|
self._dragPos = None
|
||||||
|
return
|
||||||
|
self.CaptureMouse()
|
||||||
|
if not self._dragPos:
|
||||||
|
self._dragPos = event.GetPosition()
|
||||||
|
else:
|
||||||
|
pos = event.GetPosition()
|
||||||
|
displacement = self._dragPos - pos
|
||||||
|
self.SetPosition( self.GetPosition() - displacement )
|
||||||
|
|
||||||
|
app = wx.App()
|
||||||
|
f = FancyFrame()
|
||||||
|
app.MainLoop()
|
220
setup.py
220
setup.py
@@ -6,6 +6,44 @@ from prekinto import *
|
|||||||
|
|
||||||
homedir = os.path.expanduser("~")
|
homedir = os.path.expanduser("~")
|
||||||
|
|
||||||
|
def windows_setup():
|
||||||
|
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
|
||||||
|
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")
|
||||||
|
elif default == 5:
|
||||||
|
os.system("regedit " + path + "\\windows\\remove_keyswap.reg")
|
||||||
|
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 < 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"')
|
||||||
|
os.system('refreshenv')
|
||||||
|
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 " + path + "\\windows\\kinto-new.ahk")
|
||||||
|
if(stvscode):
|
||||||
|
os.system('perl -pi -e "s/(; )(.*)(; ST2CODE)/$2$3/g" ./windows/kinto-new.ahk')
|
||||||
|
os.system("copy /Y " + path + "\\windows\\kinto-new.ahk \"C:\\ProgramData\\Microsoft\\Windows\\Start Menu\\Programs\\StartUp\\kinto.ahk\"")
|
||||||
|
os.system("del /f .\\windows\\kinto-new.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\"")
|
||||||
|
|
||||||
def cmdline(command):
|
def cmdline(command):
|
||||||
process = Popen(
|
process = Popen(
|
||||||
args=command,
|
args=command,
|
||||||
@@ -14,9 +52,24 @@ def cmdline(command):
|
|||||||
shell=True
|
shell=True
|
||||||
)
|
)
|
||||||
return process.communicate()[0]
|
return process.communicate()[0]
|
||||||
|
|
||||||
|
# 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:
|
||||||
|
if os.name != 'nt':
|
||||||
|
print("You are not using x11, please logout and back in using x11/Xorg")
|
||||||
|
sys.exit()
|
||||||
|
else:
|
||||||
|
print("\nYou are detected as running Windows.")
|
||||||
|
windows_setup()
|
||||||
|
sys.exit()
|
||||||
|
|
||||||
distro = cmdline("awk -F= '$1==\"NAME\" { print $2 ;}' /etc/os-release").replace('"','').strip().split(" ")[0]
|
distro = cmdline("awk -F= '$1==\"NAME\" { print $2 ;}' /etc/os-release").replace('"','').strip().split(" ")[0]
|
||||||
dename = cmdline("./system-config/dename.sh").replace('"','').strip().split(" ")[0].lower()
|
dename = cmdline("./system-config/dename.sh").replace('"','').strip().split(" ")[0].lower()
|
||||||
|
|
||||||
|
run_pkg = ""
|
||||||
|
|
||||||
def requirements(pkgm):
|
def requirements(pkgm):
|
||||||
print(bcolors.CYELLOW2 + "You need to install some packages, " +run_pkg+ ", for Kinto to fully remap browsers during input focus.\n" + bcolors.ENDC)
|
print(bcolors.CYELLOW2 + "You need to install some packages, " +run_pkg+ ", for Kinto to fully remap browsers during input focus.\n" + bcolors.ENDC)
|
||||||
print("sudo " + pkgm + " " + run_pkg + "\n")
|
print("sudo " + pkgm + " " + run_pkg + "\n")
|
||||||
@@ -59,7 +112,7 @@ def setShortcuts():
|
|||||||
addhotkeys = yn_choice("\nDo you want to apply system level shortcuts?")
|
addhotkeys = yn_choice("\nDo you want to apply system level shortcuts?")
|
||||||
if(addhotkeys):
|
if(addhotkeys):
|
||||||
distro = distro.lower()
|
distro = distro.lower()
|
||||||
if dename == "gnome":
|
if dename == "gnome" or dename == "mate":
|
||||||
cmdline('dconf dump /org/gnome/desktop/wm/keybindings/ > keybindings_`date +"%Y.%m.%d-%s"`.conf')
|
cmdline('dconf dump /org/gnome/desktop/wm/keybindings/ > keybindings_`date +"%Y.%m.%d-%s"`.conf')
|
||||||
cmdline('dconf dump /org/gnome/mutter/keybindings/ > mutter_`date +"%Y.%m.%d-%s"`.conf')
|
cmdline('dconf dump /org/gnome/mutter/keybindings/ > mutter_`date +"%Y.%m.%d-%s"`.conf')
|
||||||
if(kintotype == 1):
|
if(kintotype == 1):
|
||||||
@@ -70,7 +123,10 @@ 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']\"")
|
||||||
if distro == "ubuntu" and dename == "gnome":
|
cmdline("gsettings set org.gnome.shell.keybindings toggle-application-view \"['LaunchB']\"")
|
||||||
|
if dename != "mate":
|
||||||
|
cmdline("gsettings set org.gnome.mutter overlay-key ''")
|
||||||
|
if (distro == "ubuntu" and dename == "gnome") or (distro == "linux" and dename == "mate") or (distro == "ubuntu" and dename == "mate"):
|
||||||
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']\"")
|
||||||
cmdline("gsettings set org.gnome.desktop.wm.keybindings switch-to-workspace-left ['']")
|
cmdline("gsettings set org.gnome.desktop.wm.keybindings switch-to-workspace-left ['']")
|
||||||
@@ -102,7 +158,9 @@ def setShortcuts():
|
|||||||
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_term')
|
||||||
cmdline('perl -pi -e "s/(\/\/ )(.*)(\/\/ Elementary cmdtab)/\$2\$3/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')
|
cmdline('perl -pi -e "s/(\w.*)(\/\/ Default cmdtab)/\/\/ \$1\$2/g" ~/.xkb/symbols/mac_gui')
|
||||||
elif distro == "galliumos" and dename == "xfce":
|
# elif distro == "budgie" and dename == "gnome":
|
||||||
|
# print("Apply budgie shortcuts here")
|
||||||
|
elif (distro == "galliumos" and dename == "xfce") or (distro == "ubuntu" and dename == "xfce"):
|
||||||
print("Applying GalliumOS (xfce) shortcuts...")
|
print("Applying GalliumOS (xfce) shortcuts...")
|
||||||
cmdline('cp ~/.config/xfce4/xfconf/xfce-perchannel-xml/xfce4-keyboard-shortcuts.xml ./xfce4-keyboard-shortcuts_`date +"%Y.%m.%d-%s"`.xml')
|
cmdline('cp ~/.config/xfce4/xfconf/xfce-perchannel-xml/xfce4-keyboard-shortcuts.xml ./xfce4-keyboard-shortcuts_`date +"%Y.%m.%d-%s"`.xml')
|
||||||
# Reset Show desktop
|
# Reset Show desktop
|
||||||
@@ -154,6 +212,8 @@ def setShortcuts():
|
|||||||
if(kintotype == 1):
|
if(kintotype == 1):
|
||||||
cmdline('kwriteconfig5 --file "$HOME/.config/kglobalshortcutsrc" --group "kwin" --key "Walk Through Windows" "Ctrl+Tools,Alt+Tab,Walk Through Windows"')
|
cmdline('kwriteconfig5 --file "$HOME/.config/kglobalshortcutsrc" --group "kwin" --key "Walk Through Windows" "Ctrl+Tools,Alt+Tab,Walk Through Windows"')
|
||||||
cmdline('kwriteconfig5 --file "$HOME/.config/kglobalshortcutsrc" --group "kwin" --key "Walk Through Windows (Reverse)" "Ctrl+Shift+Tools,Alt+Shift+Backtab,Walk Through Windows (Reverse)"')
|
cmdline('kwriteconfig5 --file "$HOME/.config/kglobalshortcutsrc" --group "kwin" --key "Walk Through Windows (Reverse)" "Ctrl+Shift+Tools,Alt+Shift+Backtab,Walk Through Windows (Reverse)"')
|
||||||
|
cmdline('kwriteconfig5 --file "$HOME/.config/kglobalshortcutsrc" --group "kwin" --key "Walk Through Windows of Current Application" "Alt+F6,none,Walk Through Windows of Current Application"')
|
||||||
|
cmdline('kwriteconfig5 --file "$HOME/.config/kglobalshortcutsrc" --group "kwin" --key "Walk Through Windows of Current Application (Reverse)" "Alt+Shift+F6,none,Walk Through Windows of Current Application (Reverse)"')
|
||||||
else:
|
else:
|
||||||
cmdline('kwriteconfig5 --file "$HOME/.config/kglobalshortcutsrc" --group "kwin" --key "Walk Through Windows" "Ctrl+F13,Alt+Tab,Walk Through Windows"')
|
cmdline('kwriteconfig5 --file "$HOME/.config/kglobalshortcutsrc" --group "kwin" --key "Walk Through Windows" "Ctrl+F13,Alt+Tab,Walk Through Windows"')
|
||||||
cmdline('kwriteconfig5 --file "$HOME/.config/kglobalshortcutsrc" --group "kwin" --key "Walk Through Windows (Reverse)" "Ctrl+Shift+F14,Alt+Shift+Backtab,Walk Through Windows (Reverse)"')
|
cmdline('kwriteconfig5 --file "$HOME/.config/kglobalshortcutsrc" --group "kwin" --key "Walk Through Windows (Reverse)" "Ctrl+Shift+F14,Alt+Shift+Backtab,Walk Through Windows (Reverse)"')
|
||||||
@@ -175,38 +235,6 @@ def setShortcuts():
|
|||||||
cmdline('sleep 1 && rm -f ./tempkb.conf;rm -f ./tempmt.conf')
|
cmdline('sleep 1 && rm -f ./tempkb.conf;rm -f ./tempmt.conf')
|
||||||
# cmdline('dconf update')
|
# cmdline('dconf update')
|
||||||
|
|
||||||
def windows_setup():
|
|
||||||
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
|
|
||||||
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")
|
|
||||||
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\"")
|
|
||||||
|
|
||||||
def Uninstall():
|
def Uninstall():
|
||||||
print("You selected to Uninstall Kinto.\n")
|
print("You selected to Uninstall Kinto.\n")
|
||||||
restore = yn_choice("\nYour DE is " + dename + ".\n\nY: Restore hotkeys from backup\nN: Reset OS/DE hotkeys\nWhich option would you prefer?")
|
restore = yn_choice("\nYour DE is " + dename + ".\n\nY: Restore hotkeys from backup\nN: Reset OS/DE hotkeys\nWhich option would you prefer?")
|
||||||
@@ -215,7 +243,7 @@ def Uninstall():
|
|||||||
if dename == "gnome":
|
if dename == "gnome":
|
||||||
print("Restoring DE hotkeys...")
|
print("Restoring DE hotkeys...")
|
||||||
wmkeys = cmdline('ls | grep -m1 "keybinding"')
|
wmkeys = cmdline('ls | grep -m1 "keybinding"')
|
||||||
mutterkeys = cmdline('ls | grep -m1 "mutter"')
|
mutterkeys = cmdline('ls | grep -m1 "mutter_"')
|
||||||
if len(wmkeys) > 0:
|
if len(wmkeys) > 0:
|
||||||
print('dconf load /org/gnome/desktop/wm/keybindings/ < ' + wmkeys)
|
print('dconf load /org/gnome/desktop/wm/keybindings/ < ' + wmkeys)
|
||||||
cmdline('dconf load /org/gnome/desktop/wm/keybindings/ < ' + wmkeys)
|
cmdline('dconf load /org/gnome/desktop/wm/keybindings/ < ' + wmkeys)
|
||||||
@@ -238,7 +266,7 @@ def Uninstall():
|
|||||||
cmdline('cp ./' + xfcekeys + ' ~/.config/xfce4/xfconf/xfce-perchannel-xml/xfce4-keyboard-shortcuts.xml')
|
cmdline('cp ./' + xfcekeys + ' ~/.config/xfce4/xfconf/xfce-perchannel-xml/xfce4-keyboard-shortcuts.xml')
|
||||||
if dename == "gnome" or dename == "kde" or dename == "xfce":
|
if dename == "gnome" or dename == "kde" or dename == "xfce":
|
||||||
print("./uninstall.sh\n")
|
print("./uninstall.sh\n")
|
||||||
cmdline("./uninstall.sh")
|
subprocess.check_call(shlex.split("./uninstall.sh"))
|
||||||
print("Done.")
|
print("Done.")
|
||||||
if dename == "kde" or dename == "xfce":
|
if dename == "kde" or dename == "xfce":
|
||||||
print("Please log off and back on for your original hotkeys to take effect.")
|
print("Please log off and back on for your original hotkeys to take effect.")
|
||||||
@@ -249,6 +277,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')
|
||||||
@@ -258,69 +290,60 @@ def Uninstall():
|
|||||||
cmdline('cp /etc/xdg/xfce4/xfconf/xfce-perchannel-xml/xfce4-keyboard-shortcuts.xml ~/.config/xfce4/xfconf/xfce-perchannel-xml/xfce4-keyboard-shortcuts.xml')
|
cmdline('cp /etc/xdg/xfce4/xfconf/xfce-perchannel-xml/xfce4-keyboard-shortcuts.xml ~/.config/xfce4/xfconf/xfce-perchannel-xml/xfce4-keyboard-shortcuts.xml')
|
||||||
if dename == "gnome" or dename == "kde" or dename == "xfce":
|
if dename == "gnome" or dename == "kde" or dename == "xfce":
|
||||||
print("./uninstall.sh\n")
|
print("./uninstall.sh\n")
|
||||||
cmdline("./uninstall.sh")
|
subprocess.check_call(shlex.split("./uninstall.sh"))
|
||||||
print("Done.")
|
print("Done.")
|
||||||
if dename == "kde" or dename == "xfce":
|
if dename == "kde" or dename == "xfce":
|
||||||
print("Please log off and back on for your original DE hotkeys to take effect.")
|
print("Please log off and back on for your original DE hotkeys to take effect.")
|
||||||
|
|
||||||
# check_x11 = cmdline("env | grep -i x11").strip()
|
def kintoImpOne():
|
||||||
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:
|
check_xbind = cmdline("which xbindkeys 2>/dev/null").strip()
|
||||||
if os.name != 'nt':
|
check_xdotool = cmdline("which xdotool 2>/dev/null").strip()
|
||||||
print("You are not using x11, please logout and back in using x11/Xorg")
|
check_ibus = cmdline("which ibus-setup 2>/dev/null").strip()
|
||||||
sys.exit()
|
|
||||||
|
pkgm = cmdline("which apt-get 2>/dev/null").strip()
|
||||||
|
|
||||||
|
if len(pkgm) == 0:
|
||||||
|
pkgm = cmdline("which dnf 2>/dev/null").strip()
|
||||||
|
if len(pkgm) > 0:
|
||||||
|
pkgm += " check-update;sudo dnf install -y "
|
||||||
else:
|
else:
|
||||||
print("You are detected as running Windows.")
|
pkgm += " install -y "
|
||||||
windows_setup()
|
pkgm += " update; sudo apt-get install -y "
|
||||||
|
|
||||||
|
if len(pkgm) == 0:
|
||||||
|
pkgm = cmdline("which pacman 2>/dev/null").strip()
|
||||||
|
if len(pkgm) > 0:
|
||||||
|
pkgm += " -Syy; sudo pacman -S "
|
||||||
|
|
||||||
|
|
||||||
|
if len(pkgm) == 0:
|
||||||
|
print("No supported package manager found. Exiting...")
|
||||||
sys.exit()
|
sys.exit()
|
||||||
|
|
||||||
check_xbind = cmdline("which xbindkeys 2>/dev/null").strip()
|
|
||||||
check_xdotool = cmdline("which xdotool 2>/dev/null").strip()
|
|
||||||
check_ibus = cmdline("which ibus-setup 2>/dev/null").strip()
|
|
||||||
|
|
||||||
pkgm = cmdline("which apt-get 2>/dev/null").strip()
|
runpkg = 0
|
||||||
|
global run_pkg
|
||||||
|
|
||||||
if len(pkgm) == 0:
|
if len(check_xbind) > 0 and len(check_xdotool) > 0 and len(check_ibus) > 0:
|
||||||
pkgm = cmdline("which dnf 2>/dev/null").strip()
|
print("Xbindkeys, xdotool and IBus requirement is installed.")
|
||||||
if len(pkgm) > 0:
|
if len(check_xbind) == 0:
|
||||||
pkgm += " check-update;sudo dnf install -y "
|
run_pkg = "xbindkeys"
|
||||||
else:
|
runpkg = 1
|
||||||
pkgm += " install -y "
|
if len(check_xdotool) == 0:
|
||||||
pkgm += " update; sudo apt-get install -y "
|
run_pkg += " xdotool"
|
||||||
|
runpkg = 1
|
||||||
|
if len(check_ibus) == 0:
|
||||||
|
# may differ with distro, but for now
|
||||||
|
run_pkg += " ibus"
|
||||||
|
runpkg = 1
|
||||||
|
|
||||||
if len(pkgm) == 0:
|
if runpkg != 0:
|
||||||
pkgm = cmdline("which pacman 2>/dev/null").strip()
|
print(runpkg)
|
||||||
if len(pkgm) > 0:
|
requirements(pkgm)
|
||||||
pkgm += " -Syy; sudo pacman -S "
|
|
||||||
|
|
||||||
|
if not os.path.exists(homedir + '/.config/ibus/bus') and cmdline("ls ~/.config/ibus/bus -1rt") == "":
|
||||||
if len(pkgm) == 0:
|
install_ibus()
|
||||||
print("No supported package manager found. Exiting...")
|
|
||||||
sys.exit()
|
|
||||||
|
|
||||||
|
|
||||||
runpkg = 0
|
|
||||||
run_pkg = ""
|
|
||||||
|
|
||||||
if len(check_xbind) > 0 and len(check_xdotool) > 0 and len(check_ibus) > 0:
|
|
||||||
print("Xbindkeys, xdotool and IBus requirement is installed.")
|
|
||||||
if len(check_xbind) == 0:
|
|
||||||
run_pkg = "xbindkeys"
|
|
||||||
runpkg = 1
|
|
||||||
if len(check_xdotool) == 0:
|
|
||||||
run_pkg += " xdotool"
|
|
||||||
runpkg = 1
|
|
||||||
if len(check_ibus) == 0:
|
|
||||||
# may differ with distro, but for now
|
|
||||||
run_pkg += " ibus"
|
|
||||||
runpkg = 1
|
|
||||||
|
|
||||||
if runpkg != 0:
|
|
||||||
requirements(pkgm)
|
|
||||||
|
|
||||||
if not os.path.exists(homedir + '/.config/ibus/bus') and cmdline("ls ~/.config/ibus/bus -1rt") == "":
|
|
||||||
install_ibus()
|
|
||||||
|
|
||||||
try:
|
try:
|
||||||
f = open("defaults.json")
|
f = open("defaults.json")
|
||||||
@@ -355,13 +378,30 @@ 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):
|
||||||
setShortcuts()
|
|
||||||
subprocess.check_call(shlex.split("./xkeysnail_service.sh"))
|
subprocess.check_call(shlex.split("./xkeysnail_service.sh"))
|
||||||
|
if os.path.isdir(homedir + "/.config/kinto") == True:
|
||||||
|
setShortcuts()
|
||||||
|
subprocess.check_call(shlex.split("./xkeysnail_service.sh budgieUpdate"))
|
||||||
exit()
|
exit()
|
||||||
|
|
||||||
|
if(kintotype == 3):
|
||||||
|
subprocess.check_call(shlex.split("./xkeysnail_service.sh uninstall"))
|
||||||
|
exit()
|
||||||
|
|
||||||
|
if(kintotype == 4):
|
||||||
|
Uninstall()
|
||||||
|
exit()
|
||||||
|
|
||||||
|
kintoImpOne()
|
||||||
|
|
||||||
for index, item in enumerate(data['defaulttypes']):
|
for index, item in enumerate(data['defaulttypes']):
|
||||||
ossym = ""
|
ossym = ""
|
||||||
if item == "windows":
|
if item == "windows":
|
||||||
|
1
system-config/budgie-daemon_10.5.1.md5
Normal file
1
system-config/budgie-daemon_10.5.1.md5
Normal file
@@ -0,0 +1 @@
|
|||||||
|
3cd35e15350ca7dac0c3cbfce1c661f7 /usr/bin/budgie-daemon
|
1
system-config/budgie-desktop_10.5.1.md5
Normal file
1
system-config/budgie-desktop_10.5.1.md5
Normal file
@@ -0,0 +1 @@
|
|||||||
|
8660c2f8e0a9d3cff896254f6c0f9159 /usr/bin/budgie-desktop
|
@@ -3,13 +3,13 @@
|
|||||||
if pkgmgr="$( which apt-get )" 2> /dev/null; then
|
if pkgmgr="$( which apt-get )" 2> /dev/null; then
|
||||||
echo "Debian"
|
echo "Debian"
|
||||||
$pkgmgr update
|
$pkgmgr update
|
||||||
$pkgmgr --yes --force-yes install "$1"
|
$pkgmgr --yes --force-yes install $1
|
||||||
elif pkgmgr="$( which dnf )" 2> /dev/null; then
|
elif pkgmgr="$( which dnf )" 2> /dev/null; then
|
||||||
echo "dnf"
|
echo "dnf"
|
||||||
$pkgmgr check-update; $pkgmgr install -y "$1"
|
$pkgmgr check-update; $pkgmgr install -y $1
|
||||||
elif pkgmgr="$( which pacman )" 2> /dev/null; then
|
elif pkgmgr="$( which pacman )" 2> /dev/null; then
|
||||||
echo "Arch-based"
|
echo "Arch-based"
|
||||||
$pkgmgr -Syy;yes | $pkgmgr -S "$1"
|
$pkgmgr -Syy;yes | $pkgmgr -S $1
|
||||||
else
|
else
|
||||||
echo "Package manager not found, please install $1" >&2
|
echo "Package manager not found, please install $1" >&2
|
||||||
exit 1
|
exit 1
|
||||||
|
12
uninstall.sh
12
uninstall.sh
@@ -1,5 +1,10 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
# 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
|
||||||
|
echo '0' | sudo tee -a /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
|
||||||
|
sudo update-initramfs -u -k all
|
||||||
|
fi
|
||||||
systemctl --user stop keyswap 2>/dev/null
|
systemctl --user stop keyswap 2>/dev/null
|
||||||
systemctl --user disable keyswap
|
systemctl --user disable keyswap
|
||||||
systemctl --user stop keyswap.timer 2>/dev/null
|
systemctl --user stop keyswap.timer 2>/dev/null
|
||||||
@@ -9,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
|
@@ -16,7 +16,7 @@
|
|||||||
"symbols":"",
|
"symbols":"",
|
||||||
"types":"",
|
"types":"",
|
||||||
"de":[],
|
"de":[],
|
||||||
"appnames":[ "Gnome-terminal","konsole","io.elementary.terminal","terminator","sakura","guake","tilda","xterm","eterm","kitty" ]
|
"appnames":[ "Gnome-terminal","konsole","io.elementary.terminal","terminator","sakura","guake","tilda","xterm","eterm","kitty","alacritty","mate-terminal","tilix","xfce4-terminal" ]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "firefox",
|
"name": "firefox",
|
||||||
@@ -73,4 +73,4 @@
|
|||||||
"run_term":"",
|
"run_term":"",
|
||||||
"run_gui":""
|
"run_gui":""
|
||||||
}]
|
}]
|
||||||
}
|
}
|
||||||
|
@@ -10,3 +10,6 @@ else{
|
|||||||
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
|
||||||
}
|
}
|
||||||
|
if(-not(test-path "C:\Strawberry\")){
|
||||||
|
choco install strawberryperl
|
||||||
|
}
|
||||||
|
@@ -1,39 +1,44 @@
|
|||||||
|
SetTitleMatchMode, 2
|
||||||
|
|
||||||
GroupAdd, terminals, ahk_exe ubuntu.exe
|
GroupAdd, terminals, ahk_exe ubuntu.exe
|
||||||
GroupAdd, terminals, ahk_exe ConEmu.exe
|
GroupAdd, terminals, ahk_exe ConEmu.exe
|
||||||
GroupAdd, terminals, ahk_exe ConEmu64.exe
|
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 Cmd.exe
|
||||||
|
GroupAdd, terminals, Fluent Terminal ahk_class ApplicationFrameWindow
|
||||||
|
|
||||||
GroupAdd, posix, ahk_exe ubuntu.exe
|
GroupAdd, posix, ahk_exe ubuntu.exe
|
||||||
GroupAdd, posix, ahk_exe ConEmu.exe
|
GroupAdd, posix, ahk_exe ConEmu.exe
|
||||||
GroupAdd, posix, ahk_exe ConEmu64.exe
|
GroupAdd, posix, ahk_exe ConEmu64.exe
|
||||||
|
GroupAdd, posix, ahk_exe Hyper.exe
|
||||||
GroupAdd, posix, ahk_exe mintty.exe
|
GroupAdd, posix, ahk_exe mintty.exe
|
||||||
|
GroupAdd, posix, Fluent Terminal ahk_class ApplicationFrameWindow
|
||||||
|
|
||||||
GroupAdd, ConEmu, ahk_exe ConEmu.exe
|
GroupAdd, ConEmu, ahk_exe ConEmu.exe
|
||||||
GroupAdd, ConEmu, ahk_exe ConEmu64.exe
|
GroupAdd, ConEmu, ahk_exe ConEmu64.exe
|
||||||
GroupAdd, ConEmu, ahk_exe WindowsTerminal.exe
|
GroupAdd, ConEmu, ahk_exe WindowsTerminal.exe
|
||||||
|
|
||||||
GroupAdd, editors, ahk_exe sublime_text.exe
|
GroupAdd, editors, ahk_exe sublime_text.exe
|
||||||
|
GroupAdd, editors, ahk_exe VSCodium.exe
|
||||||
|
GroupAdd, editors, ahk_exe Code.exe
|
||||||
|
|
||||||
; Cmd+Space Alternative
|
GroupAdd, vscode, ahk_exe VSCodium.exe
|
||||||
LWin & vk07::return
|
GroupAdd, vscode, ahk_exe Code.exe
|
||||||
LWin::return
|
|
||||||
RWin & vk07::return
|
|
||||||
RWin::return
|
|
||||||
^Space::Send ^{Esc}
|
|
||||||
; ^Space::run AppName
|
|
||||||
|
|
||||||
; Cmd Tab For App Switching
|
|
||||||
LCtrl & Tab::AltTab
|
|
||||||
RCtrl & Tab::AltTab
|
|
||||||
; Ctrl Tab for In-App Tab Switching
|
|
||||||
LWin & Tab::Send ^{Tab}
|
|
||||||
RWin & Tab::Send ^{Tab}
|
|
||||||
|
|
||||||
; Close Apps
|
; Close Apps
|
||||||
^q::Send !{F4}
|
^q::Send !{F4}
|
||||||
|
|
||||||
|
; Emoji Panel
|
||||||
|
#^Space::Send {LWin down};{LWin up}
|
||||||
|
|
||||||
|
; Full Screenshot
|
||||||
|
^+3::Send {PrintScreen}
|
||||||
|
|
||||||
|
; Region Screenshot
|
||||||
|
^+4::Send #+{S}
|
||||||
|
|
||||||
; wordwise support
|
; wordwise support
|
||||||
$^Left::Send {Home}
|
$^Left::Send {Home}
|
||||||
$^+Left::Send +{Home}
|
$^+Left::Send +{Home}
|
||||||
@@ -50,7 +55,48 @@ $^+Right::Send +{End}
|
|||||||
!Right::Send ^{Right}
|
!Right::Send ^{Right}
|
||||||
!+Right::Send ^+{Right}
|
!+Right::Send ^+{Right}
|
||||||
|
|
||||||
#IfWinActive ahk_group editors
|
; Cmd+Space Alternative
|
||||||
|
LWin & vk07::return
|
||||||
|
LWin::return
|
||||||
|
RWin & vk07::return
|
||||||
|
RWin::return
|
||||||
|
^Space::Send ^{Esc}
|
||||||
|
; ^Space::run AppName
|
||||||
|
|
||||||
|
; Cmd Tab For App Switching
|
||||||
|
LCtrl & Tab::AltTab
|
||||||
|
RCtrl & Tab::AltTab
|
||||||
|
|
||||||
|
; Ctrl Tab for In-App Tab Switching
|
||||||
|
; https://autohotkey.com/board/topic/72433-controltab/
|
||||||
|
#if GetKeyState("LWin")
|
||||||
|
*Tab::
|
||||||
|
if(!GetKeyState("LControl"))
|
||||||
|
Send {LControl Down}
|
||||||
|
Send {Tab}
|
||||||
|
SetTimer, WaitForWinUp, 10
|
||||||
|
ToolTip trigger
|
||||||
|
return
|
||||||
|
|
||||||
|
WaitForWinUp:
|
||||||
|
if(!GetKeyState("LWin", "P"))
|
||||||
|
{
|
||||||
|
Send {LControl Up}
|
||||||
|
SetTimer, WaitForWinUp, Off
|
||||||
|
}
|
||||||
|
return
|
||||||
|
|
||||||
|
; Sublime Text Remaps for VS Code
|
||||||
|
#IfWinActive ahk_group vscode ; ST2CODE
|
||||||
|
; Remap Ctrl+Shift to behave like macOS Sublimetext
|
||||||
|
; Will extend cursor to multiple lines
|
||||||
|
#+Up::send ^!{Up} ; ST2CODE
|
||||||
|
#+Down::send ^!{Down} ; ST2CODE
|
||||||
|
; Remap Ctrl+Cmd+G to select all matches
|
||||||
|
#^g::send ^+{L} ; ST2CODE
|
||||||
|
#If ; ST2CODE
|
||||||
|
|
||||||
|
#IfWinActive ahk_exe sublime_text.exe
|
||||||
; 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 {shift up}^!{Up}
|
#+Up::send {shift up}^!{Up}
|
||||||
@@ -64,13 +110,37 @@ $^+Right::Send +{End}
|
|||||||
; Copy
|
; Copy
|
||||||
^c::Send {LCtrl down}{LShift down}c{LCtrl Up}{LShift Up}
|
^c::Send {LCtrl down}{LShift down}c{LCtrl Up}{LShift Up}
|
||||||
#c::Send {LCtrl down}c{LCtrl Up}
|
#c::Send {LCtrl down}c{LCtrl Up}
|
||||||
#IfWinNotActive ahk_group ConEmu
|
; Paste
|
||||||
; Paste
|
$^v::
|
||||||
^v::Send {LCtrl down}{LShift down}v{LCtrl Up}{LShift Up}
|
If not WinActive("ahk_group ConEmu") && not WinActive("ahk_exe cmd.exe"){
|
||||||
#If
|
Send {LCtrl down}{LShift down}v{LCtrl Up}{LShift Up}
|
||||||
|
}
|
||||||
|
else{
|
||||||
|
Send ^v
|
||||||
|
}
|
||||||
|
return
|
||||||
#If
|
#If
|
||||||
|
|
||||||
#IfWinActive ahk_group posix
|
#IfWinActive ahk_group posix
|
||||||
|
; Open/Close Tab for those that support it
|
||||||
|
$^t::
|
||||||
|
If not WinActive("ahk_group ConEmu"){
|
||||||
|
Send {LCtrl down}{LShift down}t{LCtrl Up}{LShift Up}
|
||||||
|
}
|
||||||
|
else{
|
||||||
|
Send ^t
|
||||||
|
}
|
||||||
|
return
|
||||||
|
|
||||||
|
$^w::
|
||||||
|
If not WinActive("ahk_group ConEmu"){
|
||||||
|
Send {LCtrl down}{LShift down}w{LCtrl Up}{LShift Up}
|
||||||
|
}
|
||||||
|
else{
|
||||||
|
Send ^w
|
||||||
|
}
|
||||||
|
return
|
||||||
|
|
||||||
; End of Line
|
; End of Line
|
||||||
#e::Send {LCtrl down}e{LCtrl Up}
|
#e::Send {LCtrl down}e{LCtrl Up}
|
||||||
^e::return
|
^e::return
|
||||||
@@ -95,11 +165,11 @@ $^+Right::Send +{End}
|
|||||||
#z::Send {LCtrl down}z{LCtrl Up}
|
#z::Send {LCtrl down}z{LCtrl Up}
|
||||||
#If
|
#If
|
||||||
|
|
||||||
#IfWinActive ahk_group ConEmu
|
; #IfWinActive ahk_group ConEmu
|
||||||
; Paste
|
; ; Paste
|
||||||
$^v::Send {Shift down}{Insert}{Shift Up}
|
; $^v::Send {Shift down}{Insert}{Shift Up}
|
||||||
#v::Send {LCtrl down}v{LCtrl Up}
|
; #v::Send {LCtrl down}v{LCtrl Up}
|
||||||
#If
|
; #If
|
||||||
|
|
||||||
#IfWinActive ahk_exe mintty.exe
|
#IfWinActive ahk_exe mintty.exe
|
||||||
; Copy
|
; Copy
|
||||||
|
@@ -3,10 +3,16 @@
|
|||||||
import re
|
import re
|
||||||
from xkeysnail.transform import *
|
from xkeysnail.transform import *
|
||||||
|
|
||||||
terminals = ["gnome-terminal","konsole","io.elementary.terminal","terminator","sakura","guake","tilda","xterm","eterm","kitty"]
|
# Use the following for testing terminal keymaps
|
||||||
|
# terminals = [ "", ... ]
|
||||||
|
# xbindkeys -mk
|
||||||
|
terminals = ["gnome-terminal","konsole","io.elementary.terminal","terminator","sakura","guake","tilda","xterm","eterm","kitty","alacritty","mate-terminal","tilix","xfce4-terminal"]
|
||||||
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)
|
||||||
|
|
||||||
|
mscodes = ["code","vscodium"]
|
||||||
|
codeStr = "|".join(str(x) for x in mscodes)
|
||||||
|
|
||||||
# [Global modemap] Change modifier keys as in xmodmap
|
# [Global modemap] Change modifier keys as in xmodmap
|
||||||
define_conditional_modmap(lambda wm_class: wm_class.casefold() not in terminals,{
|
define_conditional_modmap(lambda wm_class: wm_class.casefold() not in terminals,{
|
||||||
# # Chromebook
|
# # Chromebook
|
||||||
@@ -23,6 +29,9 @@ define_conditional_modmap(lambda wm_class: wm_class.casefold() not in terminals,
|
|||||||
# Key.RIGHT_META: Key.RIGHT_ALT, # WinMac
|
# Key.RIGHT_META: Key.RIGHT_ALT, # WinMac
|
||||||
# Key.RIGHT_CTRL: Key.RIGHT_META, # WinMac
|
# Key.RIGHT_CTRL: Key.RIGHT_META, # WinMac
|
||||||
|
|
||||||
|
# # KintoWin
|
||||||
|
# Key.LEFT_CTRL: Key.RIGHT_CTRL, # KintoWin
|
||||||
|
|
||||||
# # 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
|
||||||
@@ -36,7 +45,7 @@ define_conditional_modmap(re.compile(termStr, re.IGNORECASE), {
|
|||||||
# Key.LEFT_ALT: Key.RIGHT_CTRL, # Chromebook
|
# Key.LEFT_ALT: Key.RIGHT_CTRL, # Chromebook
|
||||||
# # Left Ctrl Stays Left Ctrl
|
# # Left Ctrl Stays Left Ctrl
|
||||||
# Key.LEFT_META: Key.LEFT_ALT, # Chromebook
|
# Key.LEFT_META: 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
|
||||||
# # Right Meta does not exist on chromebooks
|
# # Right Meta does not exist on chromebooks
|
||||||
|
|
||||||
@@ -44,10 +53,14 @@ define_conditional_modmap(re.compile(termStr, re.IGNORECASE), {
|
|||||||
# 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_CTRL, # WinMac
|
# Key.LEFT_CTRL: Key.LEFT_CTRL, # 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
|
||||||
# Key.RIGHT_CTRL: Key.LEFT_CTRL, # WinMac
|
# Key.RIGHT_CTRL: Key.LEFT_CTRL, # WinMac
|
||||||
|
|
||||||
|
# # KintoWin
|
||||||
|
# Key.LEFT_CTRL: Key.RIGHT_CTRL, # KintoWin
|
||||||
|
# Key.LEFT_META: Key.LEFT_CTRL, # KintoWin
|
||||||
|
|
||||||
# # 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
|
||||||
@@ -64,25 +77,30 @@ define_keymap(re.compile("org.gnome.nautilus", re.IGNORECASE),{
|
|||||||
})
|
})
|
||||||
|
|
||||||
define_keymap(None,{
|
define_keymap(None,{
|
||||||
|
# Basic App hotkey functions
|
||||||
|
K("RC-Q"): K("Alt-F4"),
|
||||||
|
K("RC-H"): K("Alt-F9"),
|
||||||
# Cmd Tab - App Switching Default
|
# Cmd Tab - App Switching Default
|
||||||
K("RC-Tab"): K("RC-F13"), # Default
|
K("RC-Tab"): K("RC-F13"), # Default not-xfce4
|
||||||
K("RC-Shift-Tab"): K("RC-Shift-F13"), # Default
|
K("RC-Shift-Tab"): K("RC-Shift-F13"), # Default not-xfce4
|
||||||
K("RC-Grave"): K("RC-Shift-F13"), # Default
|
K("RC-Grave"): K("M-F6"), # Default not-xfce4
|
||||||
# K("RC-Tab"): K("RC-backslash"), # Chromebook
|
K("RC-Shift-Grave"): K("M-Shift-F6"), # Default not-xfce4
|
||||||
# K("RC-Shift-Tab"): K("RC-Shift-backslash"), # Chromebook
|
# K("RC-Tab"): K("RC-backslash"), # xfce4
|
||||||
# K("RC-Grave"): K("RC-Shift-backslash"), # Chromebook
|
# K("RC-Shift-Tab"): K("RC-Shift-backslash"), # xfce4
|
||||||
|
# K("RC-Grave"): K("RC-Shift-backslash"), # xfce4
|
||||||
# In-App Tab switching
|
# In-App Tab switching
|
||||||
# K("M-Tab"): K("C-Tab"), # Chromebook - In-App Tab switching
|
# K("M-Tab"): K("C-Tab"), # Chromebook - In-App Tab switching
|
||||||
# K("M-Shift-Tab"): K("C-Shift-Tab"), # Chromebook - In-App Tab switching
|
# K("M-Shift-Tab"): K("C-Shift-Tab"), # Chromebook - In-App Tab switching
|
||||||
# K("M-Grave") : K("C-Shift-Tab"), # Chromebook - In-App Tab switching
|
# K("M-Grave") : K("C-Shift-Tab"), # Chromebook - In-App Tab switching
|
||||||
K("Super-Tab"): K("LC-Tab"), # Default
|
K("Super-Tab"): K("LC-Tab"), # Default not-chromebook
|
||||||
K("Super-Shift-Tab"): K("LC-Shift-Tab"), # Default
|
K("Super-Shift-Tab"): K("LC-Shift-Tab"), # Default not-chromebook
|
||||||
K("LC-Grave") : K("LC-Shift-Tab"), # Default
|
|
||||||
|
|
||||||
# Wordwise
|
# Wordwise
|
||||||
K("RC-Left"): K("Home"), # Beginning of Line
|
K("RC-Left"): K("Home"), # Beginning of Line
|
||||||
|
K("Super-a"): K("Home"), # Beginning of Line
|
||||||
K("RC-Shift-Left"): K("Shift-Home"), # Select all to Beginning of Line
|
K("RC-Shift-Left"): K("Shift-Home"), # Select all to Beginning of Line
|
||||||
K("RC-Right"): K("End"), # End of Line
|
K("RC-Right"): K("End"), # End of Line
|
||||||
|
K("Super-e"): K("End"), # End of Line
|
||||||
K("RC-Shift-Right"): K("Shift-End"), # Select all to End of Line
|
K("RC-Shift-Right"): K("Shift-End"), # Select all to End of Line
|
||||||
# K("RC-Left"): K("C-LEFT_BRACE"), # Firefox-nw - Back
|
# K("RC-Left"): K("C-LEFT_BRACE"), # Firefox-nw - Back
|
||||||
# K("RC-Right"): K("C-RIGHT_BRACE"), # Firefox-nw - Forward
|
# K("RC-Right"): K("C-RIGHT_BRACE"), # Firefox-nw - Forward
|
||||||
@@ -92,12 +110,16 @@ define_keymap(None,{
|
|||||||
K("RC-Shift-Up"): K("C-Shift-Home"), # Select all to Beginning of File
|
K("RC-Shift-Up"): K("C-Shift-Home"), # Select all to Beginning of File
|
||||||
K("RC-Down"): K("C-End"), # End of File
|
K("RC-Down"): K("C-End"), # End of File
|
||||||
K("RC-Shift-Down"): K("C-Shift-End"), # Select all to End of File
|
K("RC-Shift-Down"): K("C-Shift-End"), # Select all to End of File
|
||||||
K("M-Backspace"): K("Delete"), # Delete
|
# K("M-Backspace"): K("Delete"), # Chromebook - Delete
|
||||||
|
K("Super-Backspace"): K("C-Backspace"), # Default not-chromebook - Delete Left Word of Cursor
|
||||||
|
K("Super-Delete"): K("C-Delete"), # Default not-chromebook - Delete Right Word of Cursor
|
||||||
|
K("Alt-Backspace"): K("C-Backspace"), # Default not-chromebook - Delete Left Word of Cursor
|
||||||
|
K("Alt-Delete"): K("C-Delete"), # Default not-chromebook - Delete Right Word of Cursor
|
||||||
# K(""): pass_through_key, # cancel
|
# K(""): pass_through_key, # cancel
|
||||||
# K(""): K(""), #
|
# K(""): K(""), #
|
||||||
})
|
})
|
||||||
|
|
||||||
define_keymap(lambda wm_class: wm_class.casefold() not in ("code"),{
|
define_keymap(lambda wm_class: wm_class.casefold() not in mscodes,{
|
||||||
# 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
|
||||||
@@ -120,7 +142,7 @@ define_keymap(lambda wm_class: wm_class.casefold() not in ("code"),{
|
|||||||
})
|
})
|
||||||
|
|
||||||
# Keybindings for VS Code
|
# Keybindings for VS Code
|
||||||
define_keymap(re.compile("code", re.IGNORECASE),{
|
define_keymap(re.compile(codeStr, re.IGNORECASE),{
|
||||||
# Wordwise remaining - for VS Code
|
# Wordwise remaining - for VS Code
|
||||||
# Alt-F19 hack fixes Alt menu activation
|
# Alt-F19 hack fixes Alt menu activation
|
||||||
K("M-Left"): [K("M-F19"),K("C-Left")], # Left of Word
|
K("M-Left"): [K("M-F19"),K("C-Left")], # Left of Word
|
||||||
@@ -128,6 +150,11 @@ define_keymap(re.compile("code", re.IGNORECASE),{
|
|||||||
K("M-Shift-Left"): [K("M-F19"),K("C-Shift-Left")], # Select Left of Word
|
K("M-Shift-Left"): [K("M-F19"),K("C-Shift-Left")], # Select Left of Word
|
||||||
K("M-Shift-Right"): [K("M-F19"),K("C-Shift-Right")], # Select Right of Word
|
K("M-Shift-Right"): [K("M-F19"),K("C-Shift-Right")], # Select Right of Word
|
||||||
|
|
||||||
|
# K("C-PAGE_DOWN"): pass_through_key, # cancel next_view
|
||||||
|
# K("C-PAGE_UP"): pass_through_key, # cancel prev_view
|
||||||
|
K("C-M-Left"): K("C-PAGE_UP"), # next_view
|
||||||
|
K("C-M-Right"): K("C-PAGE_DOWN"), # prev_view
|
||||||
|
|
||||||
# VS Code Shortcuts
|
# VS Code Shortcuts
|
||||||
K("C-g"): pass_through_key, # cancel Go to Line...
|
K("C-g"): pass_through_key, # cancel Go to Line...
|
||||||
K("Super-g"): K("C-g"), # Go to Line...
|
K("Super-g"): K("C-g"), # Go to Line...
|
||||||
@@ -140,9 +167,10 @@ define_keymap(re.compile("code", 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-g"): K("C-f2"), # Sublime - find_all_under
|
# K("Super-C-g"): K("C-f2"), # Default - Sublime - find_all_under
|
||||||
K("Super-Shift-up"): K("M-Shift-up"), # multi-cursor up
|
# K("C-M-g"): K("C-f2"), # Chromebook - Sublime - find_all_under
|
||||||
K("Super-Shift-down"): K("M-Shift-down"), # multi-cursor down
|
# K("Super-Shift-up"): K("M-Shift-up"), # multi-cursor up - Sublime
|
||||||
|
# K("Super-Shift-down"): K("M-Shift-down"), # multi-cursor down - Sublime
|
||||||
# K(""): pass_through_key, # cancel
|
# K(""): pass_through_key, # cancel
|
||||||
# K(""): K(""), #
|
# K(""): K(""), #
|
||||||
}, "Code")
|
}, "Code")
|
||||||
@@ -220,7 +248,7 @@ define_keymap(re.compile("konsole", re.IGNORECASE),{
|
|||||||
|
|
||||||
}, "Konsole tab switching")
|
}, "Konsole tab switching")
|
||||||
|
|
||||||
define_keymap(re.compile("Io.elementary.terminal", re.IGNORECASE),{
|
define_keymap(re.compile("Io.elementary.terminal|kitty", re.IGNORECASE),{
|
||||||
# Ctrl Tab - In App Tab Switching
|
# Ctrl Tab - In App Tab Switching
|
||||||
K("LC-Tab") : K("LC-Shift-Right"),
|
K("LC-Tab") : K("LC-Shift-Right"),
|
||||||
K("LC-Shift-Tab") : K("LC-Shift-Left"),
|
K("LC-Shift-Tab") : K("LC-Shift-Left"),
|
||||||
@@ -240,7 +268,6 @@ define_keymap(re.compile(termStr, re.IGNORECASE),{
|
|||||||
K("RC-MINUS"): K("C-Shift-MINUS"),
|
K("RC-MINUS"): K("C-Shift-MINUS"),
|
||||||
K("RC-EQUAL"): K("C-Shift-EQUAL"),
|
K("RC-EQUAL"): K("C-Shift-EQUAL"),
|
||||||
K("RC-BACKSPACE"): K("C-Shift-BACKSPACE"),
|
K("RC-BACKSPACE"): K("C-Shift-BACKSPACE"),
|
||||||
K("RC-Q"): K("C-Shift-Q"),
|
|
||||||
K("RC-W"): K("C-Shift-W"),
|
K("RC-W"): K("C-Shift-W"),
|
||||||
K("RC-E"): K("C-Shift-E"),
|
K("RC-E"): K("C-Shift-E"),
|
||||||
K("RC-R"): K("C-Shift-R"),
|
K("RC-R"): K("C-Shift-R"),
|
||||||
|
@@ -5,10 +5,10 @@
|
|||||||
|
|
||||||
typeset -l distro
|
typeset -l distro
|
||||||
distro=$(awk -F= '$1=="NAME" { print $2 ;}' /etc/os-release)
|
distro=$(awk -F= '$1=="NAME" { print $2 ;}' /etc/os-release)
|
||||||
|
typeset -l dename
|
||||||
|
dename=$(./system-config/dename.sh | cut -d " " -f1)
|
||||||
|
|
||||||
function uninstall {
|
function uninstall {
|
||||||
typeset -l dename
|
|
||||||
dename=$(./system-config/dename.sh | cut -d " " -f1)
|
|
||||||
|
|
||||||
while true; do
|
while true; do
|
||||||
read -rep $'\nPress R to restore your original shortcuts.\nPress F to reset to factory shortcuts. (f/r)\n' yn
|
read -rep $'\nPress R to restore your original shortcuts.\nPress F to reset to factory shortcuts. (f/r)\n' yn
|
||||||
@@ -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
|
||||||
@@ -40,7 +44,7 @@ function uninstall {
|
|||||||
if [ "$dename" == "gnome" ]; then
|
if [ "$dename" == "gnome" ]; then
|
||||||
echo "Restoring DE hotkeys..."
|
echo "Restoring DE hotkeys..."
|
||||||
wmkeys=$(ls | grep -m1 "keybinding")
|
wmkeys=$(ls | grep -m1 "keybinding")
|
||||||
mutterkeys=$(ls | grep -m1 "mutter")
|
mutterkeys=$(ls | grep -m1 "mutter_")
|
||||||
if [[ ${#wmkeys} > 0 ]]; then
|
if [[ ${#wmkeys} > 0 ]]; then
|
||||||
echo "dconf load /org/gnome/desktop/wm/keybindings/ < $wmkeys"
|
echo "dconf load /org/gnome/desktop/wm/keybindings/ < $wmkeys"
|
||||||
dconf load /org/gnome/desktop/wm/keybindings/ < "$wmkeys"
|
dconf load /org/gnome/desktop/wm/keybindings/ < "$wmkeys"
|
||||||
@@ -68,19 +72,102 @@ function uninstall {
|
|||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function budgieUninstall {
|
||||||
|
if [ -f /usr/bin/budgie-desktop ];then
|
||||||
|
read -n 1 -s -r -p "Your system may log you off immediately during the restoration of budgie-daemon. Press any key to continue..."
|
||||||
|
bdmd5="$(md5sum /usr/bin/budgie-daemon | awk '{ print $1 }')"
|
||||||
|
oldbdmd5=$(md5sum ./budgie-daemon_10.5.1.bak | awk '{ print $1 }')
|
||||||
|
if [ "$bdmd5" != "$oldbdmd5" ]; then
|
||||||
|
echo -e "\nReplacing budgie-daemon with backup..."
|
||||||
|
sudo pkill budgie-daemon && sudo cp ./budgie-daemon_10.5.1.bak /usr/bin/budgie-daemon
|
||||||
|
else
|
||||||
|
echo -e "\nBudgie-daemon is already an original."
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
function budgieUpdate {
|
||||||
|
# Check for budgie and install App Switching hack
|
||||||
|
if [ -f /usr/bin/budgie-desktop ];then
|
||||||
|
while true; do
|
||||||
|
read -rep $'Would you like to update Budgie to support proper App Switching? (y/n)\n(Your system will immediately log you out after this runs.)\n' yn
|
||||||
|
case $yn in
|
||||||
|
[Yy]* ) yn="y"; break;;
|
||||||
|
[Nn]* ) yn="n";break;;
|
||||||
|
* ) echo "Please answer yes or no.";;
|
||||||
|
esac
|
||||||
|
done
|
||||||
|
if [ "$yn" == "y" ]; then
|
||||||
|
budgieVersion="$(/usr/bin/budgie-desktop --version | awk '{ print $2; }' | head -n1)"
|
||||||
|
if [ "$budgieVersion" == "10.5.1" ]; then
|
||||||
|
if ! [ -f ./system-config/budgie-daemon_10.5.1 ]; then
|
||||||
|
wget https://github.com/rbreaves/budgie-desktop/raw/43d3b44243b0bcaee3262a79818024a651475b58/binaries/budgie-daemon_10.5.1 -O ./system-config/budgie-daemon_10.5.1
|
||||||
|
fi
|
||||||
|
bdmd5=$(md5sum /usr/bin/budgie-daemon | awk '{ print $1 }')
|
||||||
|
newbdmd5=$(md5sum ./system-config/budgie-daemon_10.5.1 | awk '{ print $1 }')
|
||||||
|
if [ "$bdmd5" != "$newbdmd5" ]; then
|
||||||
|
cp /usr/bin/budgie-daemon ./budgie-daemon_"$budgieVersion".bak
|
||||||
|
sudo pkill budgie-daemon && sudo cp ./system-config/budgie-daemon_10.5.1 /usr/bin/budgie-daemon
|
||||||
|
echo "Updated Budgie to use App Switching Patch"
|
||||||
|
else
|
||||||
|
echo "Budgie-daemon already patched, skipping replacement."
|
||||||
|
fi
|
||||||
|
else
|
||||||
|
echo "Your Budgie version was $budgieVersion and the patch is for 10.5.1."
|
||||||
|
while true; do
|
||||||
|
read -rep $'Would you like to replace it any ways? (y/n)\n(A backup will be made)\n' yn
|
||||||
|
case $yn in
|
||||||
|
[Yy]* ) yn="y"; break;;
|
||||||
|
[Nn]* ) yn="n";break;;
|
||||||
|
* ) echo "Please answer yes or no.";;
|
||||||
|
esac
|
||||||
|
done
|
||||||
|
if [ "$yn" == "y" ]; then
|
||||||
|
if ! [ -f ./system-config/budgie-daemon_10.5.1 ]; then
|
||||||
|
wget https://github.com/rbreaves/budgie-desktop/raw/43d3b44243b0bcaee3262a79818024a651475b58/binaries/budgie-daemon_10.5.1 -O ./system-config/budgie-daemon_10.5.1
|
||||||
|
fi
|
||||||
|
cp /usr/bin/budgie-daemon ./budgie-daemon_"$budgieVersion".bak
|
||||||
|
sudo pkill budgie-daemon && sudo cp ./system-config/budgie-daemon_10.5.1 /usr/bin/budgie-daemon
|
||||||
|
echo "Updated Budgie to use App Switching Patch"
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
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)"
|
||||||
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) Windows w/ Kinto - aka Linux VM"
|
||||||
|
# echo " 5) Uninstall"
|
||||||
|
|
||||||
read n
|
read n
|
||||||
|
|
||||||
set "$n"
|
set "$n"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [[ $1 == "1" || $1 == "2" || $1 == "3" || $1 == "winmac" || $1 == "mac" || $1 == "chromebook" ]]; then
|
# multi-language
|
||||||
|
rightalt=false
|
||||||
|
# VS code remap
|
||||||
|
vssublime=false
|
||||||
|
|
||||||
|
if [[ $1 == "1" || $1 == "2" || $1 == "3" || $1 == "4" || $1 == "kintowin" || $1 == "winmac" || $1 == "mac" || $1 == "chromebook" ]]; then
|
||||||
|
while true; do
|
||||||
|
read -rep $'\nDo you want multi-language support (the right Alt key will not remap)? (y/N)\n' yn
|
||||||
|
case $yn in
|
||||||
|
[Yy]* ) rightalt=true; break;;
|
||||||
|
* ) break;;
|
||||||
|
esac
|
||||||
|
done
|
||||||
|
while true; do
|
||||||
|
read -rep $'\nWould you like to give VS Code Sublime Text keymaps? (y/N)\n' yn
|
||||||
|
case $yn in
|
||||||
|
[Yy]* ) vssublime=true; break;;
|
||||||
|
* ) break;;
|
||||||
|
esac
|
||||||
|
done
|
||||||
branch=$(git rev-parse --abbrev-ref HEAD)
|
branch=$(git rev-parse --abbrev-ref HEAD)
|
||||||
if [ "$branch" == "dev" ] || [ "$branch" == "alpha" ];then
|
if [ "$branch" == "dev" ] || [ "$branch" == "alpha" ];then
|
||||||
while true; do
|
while true; do
|
||||||
@@ -106,21 +193,25 @@ if [[ $1 == "1" || $1 == "2" || $1 == "3" || $1 == "winmac" || $1 == "mac" || $1
|
|||||||
sudo ./system-config/unipkg.sh python3-pip
|
sudo ./system-config/unipkg.sh python3-pip
|
||||||
fi
|
fi
|
||||||
if ! [ -x "$(command -v python3-config)" ]; then
|
if ! [ -x "$(command -v python3-config)" ]; then
|
||||||
if [ "$distro" == "ubuntu" ] || [ "$distro" == "debian" ]; then
|
if [ "$distro" == "ubuntu" ] || [ "$distro" == "debian" ] || [ "$distro" == '"linux mint"' ]; then
|
||||||
pydev="python3-dev"
|
pydev="python3-dev"
|
||||||
elif [ "$distro" == "fedora" ]; then
|
elif [ "$distro" == "fedora" ]; then
|
||||||
pydev="python3-devel"
|
pydev="python3-devel"
|
||||||
fi
|
fi
|
||||||
if [ "$distro" == "gnome" ] || [ "$distro" == "fedora" ] || [ "$distro" == "debian" ]; then
|
if [ "$distro" == "gnome" ] || [ "$distro" == "fedora" ] || [ "$distro" == "debian" ] || [ "$distro" == '"linux mint"' ]; then
|
||||||
echo "Will need to install $pydev..."
|
echo "Will need to install $pydev..."
|
||||||
sudo ./system-config/unipkg.sh "$pydev"
|
sudo ./system-config/unipkg.sh "$pydev"
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
if ! [ -x "$(command -v xhost)" ]; then
|
if ! [ -x "$(command -v xhost)" ] || ! [ -x "$(command -v gcc)" ]; then
|
||||||
if [ "$distro" == "\"manjaro linux\"" ]; then
|
if [ "$distro" == "\"manjaro linux\"" ]; then
|
||||||
sudo ./system-config/unipkg.sh xorg-xhost
|
sudo ./system-config/unipkg.sh "xorg-xhost gcc"
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
if [ "$distro" == '"linux mint"' ]; then
|
||||||
|
pip3 install setuptools
|
||||||
|
fi
|
||||||
|
|
||||||
# echo "Transferring files..."
|
# echo "Transferring files..."
|
||||||
mkdir -p ~/.config/kinto
|
mkdir -p ~/.config/kinto
|
||||||
|
|
||||||
@@ -156,21 +247,38 @@ if [[ $1 == "1" || $1 == "2" || $1 == "3" || $1 == "winmac" || $1 == "mac" || $1
|
|||||||
sed -i "s/{username}/`whoami`/g" ~/.config/kinto/prexk.sh
|
sed -i "s/{username}/`whoami`/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
|
||||||
elif ! [[ $1 == "4" || $1 == "uninstall" ]]; then
|
|
||||||
echo "Expected argument was not provided"
|
if $vssublime ; then
|
||||||
|
perl -pi -e "s/(# )(.*)(- Sublime)/\$2\$3/g" ./xkeysnail-config/kinto.py.new >/dev/null 2>&1
|
||||||
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [[ $1 == "1" || $1 == "winmac" ]]; then
|
if [[ $1 == "1" || $1 == "winmac" ]]; 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 -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
|
||||||
perl -pi -e "s/(# )(.*)(# WinMac)/\$2\$3/g" ./xkeysnail-config/kinto.py.new
|
perl -pi -e "s/(# )(.*)(# WinMac)/\$2\$3/g" ./xkeysnail-config/kinto.py.new
|
||||||
|
if [[ $dename == "xfce" ]]; then
|
||||||
|
perl -pi -e "s/(# )(.*)(# xfce4)/\$2\$3/g" ./xkeysnail-config/kinto.py.new
|
||||||
|
perl -pi -e "s/(\w.*)(# Default not-xfce4)/# \$1\$2/g" ./xkeysnail-config/kinto.py.new
|
||||||
|
fi
|
||||||
elif [[ $1 == "2" || $1 == "mac" ]]; then
|
elif [[ $1 == "2" || $1 == "mac" ]]; then
|
||||||
perl -pi -e "s/(# )(.*)(# Mac)/\$2\$3/g" ./xkeysnail-config/kinto.py.new
|
perl -pi -e "s/(# )(.*)(# Mac)/\$2\$3/g" ./xkeysnail-config/kinto.py.new
|
||||||
|
if [[ $dename == "xfce" ]]; then
|
||||||
|
perl -pi -e "s/(# )(.*)(# xfce4)/\$2\$3/g" ./xkeysnail-config/kinto.py.new
|
||||||
|
perl -pi -e "s/(\w.*)(# Default not-xfce4)/# \$1\$2/g" ./xkeysnail-config/kinto.py.new
|
||||||
|
fi
|
||||||
elif [[ $1 == "3" || $1 == "chromebook" ]]; then
|
elif [[ $1 == "3" || $1 == "chromebook" ]]; then
|
||||||
perl -pi -e "s/(# )(.*)(# Chromebook)/\$2\$3/g" ./xkeysnail-config/kinto.py.new
|
perl -pi -e "s/(# )(.*)(# Chromebook)/\$2\$3/g" ./xkeysnail-config/kinto.py.new
|
||||||
|
perl -pi -e "s/(# )(.*)(# xfce4)/\$2\$3/g" ./xkeysnail-config/kinto.py.new
|
||||||
perl -pi -e "s/(\w.*)(# Default)/# \$1\$2/g" ./xkeysnail-config/kinto.py.new
|
perl -pi -e "s/(\w.*)(# Default)/# \$1\$2/g" ./xkeysnail-config/kinto.py.new
|
||||||
|
elif [[ $1 == "4" || $1 == "kintowin" ]]; then
|
||||||
|
perl -pi -e "s/(# )(.*)(# KintoWin)/\$2\$3/g" ./xkeysnail-config/kinto.py.new
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [[ $1 == "1" || $1 == "2" || $1 == "3" || $1 == "winmac" || $1 == "mac" || $1 == "chromebook" ]]; then
|
if $rightalt ; then
|
||||||
|
perl -pi -e "s/(\w.*)(Multi-language)/# \$1\$2/g" ./xkeysnail-config/kinto.py.new >/dev/null 2>&1
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [[ $1 == "1" || $1 == "2" || $1 == "3" || $1 == "4" || $1 == "kintowin" || $1 == "winmac" || $1 == "mac" || $1 == "chromebook" ]]; then
|
||||||
mv ./xkeysnail-config/kinto.py.new ~/.config/kinto/kinto.py
|
mv ./xkeysnail-config/kinto.py.new ~/.config/kinto/kinto.py
|
||||||
# if [ "$distro" == "fedora" ];then
|
# if [ "$distro" == "fedora" ];then
|
||||||
sudo rm /etc/systemd/system/xkeysnail.service
|
sudo rm /etc/systemd/system/xkeysnail.service
|
||||||
@@ -185,17 +293,20 @@ if [[ $1 == "1" || $1 == "2" || $1 == "3" || $1 == "winmac" || $1 == "mac" || $1
|
|||||||
sudo ln -s "$xkeypath"xkeysnail.service /etc/systemd/system/xkeysnail.service && echo "Created soft symlink..." || echo "Failed to create soft symlink..."
|
sudo ln -s "$xkeypath"xkeysnail.service /etc/systemd/system/xkeysnail.service && echo "Created soft symlink..." || echo "Failed to create soft symlink..."
|
||||||
sudo ln -s "$xkeypath"xkeysnail.service /etc/systemd/system/graphical.target.wants/xkeysnail.service && echo "Created soft symlink for graphical target..." || echo "Failed to create soft symlink for graphical target..."
|
sudo ln -s "$xkeypath"xkeysnail.service /etc/systemd/system/graphical.target.wants/xkeysnail.service && echo "Created soft symlink for graphical target..." || echo "Failed to create soft symlink for graphical target..."
|
||||||
xhost +SI:localuser:root
|
xhost +SI:localuser:root
|
||||||
git clone --depth 1 https://github.com/rbreaves/xkeysnail.git
|
git clone --depth 10 https://github.com/rbreaves/xkeysnail.git || git pull --depth 10
|
||||||
cd xkeysnail
|
cd xkeysnail
|
||||||
|
git checkout 51c369084e0045a8410d227bab52411bf84fb65b
|
||||||
giturl=$(git ls-remote --get-url)
|
giturl=$(git ls-remote --get-url)
|
||||||
if [ "$geturl" != "https://github.com/rbreaves/xkeysnail.git" ];then
|
if [ "$giturl" != "https://github.com/rbreaves/xkeysnail.git" ];then
|
||||||
|
echo -e "\nreplacing xkeysnail with fork...\n"
|
||||||
cd ..
|
cd ..
|
||||||
rm -rf ./xkeysnail
|
rm -rf ./xkeysnail
|
||||||
git clone --depth 1 https://github.com/rbreaves/xkeysnail.git
|
git clone --depth 10 https://github.com/rbreaves/xkeysnail.git
|
||||||
cd xkeysnail
|
cd xkeysnail
|
||||||
|
git checkout 51c369084e0045a8410d227bab52411bf84fb65b
|
||||||
fi
|
fi
|
||||||
git pull origin master
|
|
||||||
sudo pip3 install --upgrade .
|
sudo pip3 install --upgrade .
|
||||||
|
cd ..
|
||||||
sudo systemctl daemon-reload
|
sudo systemctl daemon-reload
|
||||||
sudo systemctl --state=not-found --all | grep xkeysnail
|
sudo systemctl --state=not-found --all | grep xkeysnail
|
||||||
if [ "$distro" == "fedora" ];then
|
if [ "$distro" == "fedora" ];then
|
||||||
@@ -238,9 +349,14 @@ if [[ $1 == "1" || $1 == "2" || $1 == "3" || $1 == "winmac" || $1 == "mac" || $1
|
|||||||
echo "You can run 'sudo systemctl status xkeysnail' for more info"
|
echo "You can run 'sudo systemctl status xkeysnail' for more info"
|
||||||
echo "You can also run 'sudo journalctl -u xkeysnail'"
|
echo "You can also run 'sudo journalctl -u xkeysnail'"
|
||||||
fi
|
fi
|
||||||
elif ! [[ $1 == "4" || $1 == "uninstall" ]]; then
|
echo ""
|
||||||
echo "Expected argument was not provided"
|
if $vssublime ; then
|
||||||
else
|
echo -e "\e[1m\e[32mEnabled\e[0m VS Code Sublime Text remap."
|
||||||
|
fi
|
||||||
|
if $rightalt ; then
|
||||||
|
echo -e "\e[1m\e[32mEnabled\e[0m mutli-language support."
|
||||||
|
fi
|
||||||
|
elif [[ $1 == "5" || $1 == "uninstall" || $1 == "Uninstall" ]]; then
|
||||||
echo "Uninstalling Kinto - xkeysnail (udev)"
|
echo "Uninstalling Kinto - xkeysnail (udev)"
|
||||||
uninstall
|
uninstall
|
||||||
# Undo Apple keyboard cmd & alt swap
|
# Undo Apple keyboard cmd & alt swap
|
||||||
@@ -259,5 +375,10 @@ else
|
|||||||
sudo rm /usr/lib/systemd/system/xkeysnail.service
|
sudo rm /usr/lib/systemd/system/xkeysnail.service
|
||||||
sudo systemctl daemon-reload
|
sudo systemctl daemon-reload
|
||||||
sudo systemctl --state=not-found --all | grep xkeysnail
|
sudo systemctl --state=not-found --all | grep xkeysnail
|
||||||
|
budgieUninstall
|
||||||
exit 0
|
exit 0
|
||||||
|
elif [[ $1 == "5" || $1 == "budgieUpdate" ]]; then
|
||||||
|
budgieUpdate
|
||||||
|
else
|
||||||
|
echo "Expected argument was not provided"
|
||||||
fi
|
fi
|
Reference in New Issue
Block a user