Compare commits

...

533 Commits

Author SHA1 Message Date
Ben Reaves
346c79ca42 Closes #660, fixes incompatibility w/ Fedora 35 & 36 2022-05-13 23:33:09 -04:00
Ben Reaves
f65e31791f Merge pull request #649 from RedBearAK/patch-44
[Win] Enable browser page navigation with Cmd+Braces/Brackets
2022-05-05 08:21:12 -05:00
Ben Reaves
1b30572953 Merge pull request #662 from RedBearAK/patch-47
Enable Cmd+Braces page nav in Chrome(s)
2022-05-04 21:56:02 -05:00
RedBearAK
11b2f30169 Enable Cmd+Braces page nav in Chrome(s)
This should enable page nav (back/forward in page history) with Cmd+Braces in Chrome-based web browsers. 

Also fixes the inability to quit Chrome-based browsers with Cmd+Q.
2022-05-04 18:10:45 -08:00
Ben Reaves
648819ffe7 Merge branch 'hotfix' 2022-04-24 15:47:01 -05:00
Ben Reaves
be898ab3c5 Fix for Ayatana systray indicators w/ appindicator fallback 2022-04-24 15:46:47 -05:00
RedBearAK
bed5f37ce3 [Win] Enable browser page navigation with Cmd+Braces/Brackets
This just enables the Cmd+Braces (brackets?) page navigation for Windows web browsers. And adds some comments on the tab navigation lines. 

Only the page navigation lines are actually new.
2022-04-16 16:22:55 -08:00
Ben Reaves
be0a6bb197 Merge pull request #647 from kirschem/feature/#622-macos-umlaut-behavior-on-windows
#622: Mirror umlaut behavior from macos with ahk
2022-04-15 22:08:38 -05:00
Marcel Kirsche
e4a649fc8c #622: Mirror umlaut behavior from macos with ahk 2022-04-15 17:37:48 +02:00
Ben Reaves
ddc7442e55 Update README.md 2022-04-04 21:00:25 -05:00
Ben Reaves
274833af95 Added additional Firefox wm_class names. Closes #642 2022-04-02 01:36:16 -05:00
Ben Reaves
bd9ecd123f Create 01-ubuntu-budgie.yml 2022-04-01 23:58:25 -05:00
Ben Reaves
14ac2c8349 Update README.md 2022-03-20 02:11:51 -05:00
Ben Reaves
df43fb363d Merge pull request #624 from HelgeCPH/master
Added missing libvte dependency
2022-02-16 23:02:34 -06:00
Helge
0dd5baca34 Added missing libvte dependency
The libvte dev library is missing when installing on Elementary OS (6.1).
Added its installation.
2022-02-16 15:56:04 +01:00
Ben Reaves
896ab30e57 Update README.md 2022-02-09 20:43:15 -06:00
Ben Reaves
f9aaae3038 Merge branch 'hotfix' 2022-01-31 13:16:16 -06:00
Ben Reaves
94b018aa48 Closes #616 major bug with xkeysnail fork d/l 2022-01-31 13:15:15 -06:00
Ben Reaves
6b3ea9afab Merge pull request #611 from RedBearAK/patch-43
Add cutefish-terminal and cutefish-filemanager
2022-01-20 23:01:01 -06:00
Ben Reaves
1ee92339c0 Merge pull request #610 from RedBearAK/patch-42
Disable Duplicate (Cmd+D) shortcut in file managers
2022-01-20 22:57:54 -06:00
RedBearAK
4e1331f9bb Add cutefish-terminal and cutefish-filemanager
The CutefishOS apps seem to have somewhat limited support for keyboard shortcuts in general, but what they do support is working as expected after adding their WM_CLASSes to the config file.
2022-01-20 16:34:45 -09:00
RedBearAK
f44182cefd Disable Duplicate (Cmd+D) shortcut in file managers
As much as I enjoy the convenience of the Cmd+D (Duplicate file/folder) shortcut, I have reluctantly made the decision that for most users it would be best to disable it by default, since it conflicts with the inherited function of "Add Bookmark" that Linux file managers like Nautilus have started using in parity with web browsers. Just one more thing that makes it easier to slide between web browsers and file "browsers". 

It's fun but has never been a "necessary" shortcut since a quick Cmd+C/Cmd+V will always accomplish the same thing. No one but me should miss it being active, and it will no longer interfere by default with bookmarking locations in Nautilus or any other file manager with that function assigned to Cmd+D (Ctrl+D). 

Anyone who really wants it can re-enable it.
2022-01-20 14:59:57 -09:00
Ben Reaves
d15972dcae Merge pull request #600 from RedBearAK/patch-39
Cmd+Shift+Braces for tab/view nav in codeStr apps
2022-01-11 19:50:11 -06:00
RedBearAK
65f48ce2f1 Cmd+Shift+Braces for tab/view nav in codeStr apps
Cmd+Shift+Braces (in addition to the already existing remap of Opt+Cmd+Left/Right) is a verified working alternate shortcut for tab (view) navigation in VSCodium on macOS. 

While Cmd+Braces advances and retracts the indent/tabbing level, these Cmd+Shift+Braces shortcuts (physical Ctrl+Shift+Braces on PC keyboard) appear to do nothing in the Linux version of VSCode without this remap. 

Enabling this will bring the Cmd+Shift+Braces tab navigation behavior in the "codes" apps in line with the same behavior in macOS for web browser tabs, terminal tabs and file manager tabs.
2022-01-11 15:07:02 -09:00
Ben Reaves
589807bad9 Hardcoded python3 path, avoids issue w/ homebrew 2022-01-09 02:10:27 -06:00
Ben Reaves
55a6d132c7 Merge pull request #598 from RedBearAK/patch-38
Tab navigation in terminals with Cmd+Shift+Braces
2022-01-07 22:27:23 -06:00
RedBearAK
eebf4d61eb Tab navigation in terminals with Cmd+Shift+Braces
This update activates tab navigation (prior/next tab, left/right) in terminals, with Ctrl+Shift+Braces (Cmd+Shift+Braces in macOS). 

Verified this is a working shortcut in macOS Mojave, on a 2011 MacBook Pro. Works for tab nav in both Apple's Terminal.app and iTerm2. The Ctrl+PgUp/PgDn shortcut that works for terminal tab nav in Linux does nothing in macOS. 

This is the same shortcut remap that is working for tab nav in web browsers and file managers. All tested working in macOS.
2022-01-07 00:16:15 -09:00
Ben Reaves
b364902db0 Merge pull request #597 from RedBearAK/patch-37
Updates to remaps for Ulauncher
2022-01-06 19:56:17 -06:00
RedBearAK
035b9e2d85 Updates to remaps for Ulauncher
Talked to a Ulauncher dev and determined that the Ulauncher search results are limited for the foreseeable future to a max of 17 items. So the screen size is not relevant and there is no reason at present to remap beyond Ctrl+h. So this keymap block can be trimmed down a bit. 

Remapping Ctrl+a and Ctrl+c of course interferes with quickly selecting and copying text within the search field, so it seems wise to disable those by default, and the trimmed list will no longer have Ctrl+v as a remap, so it won't interfere with pasting text into the search field. I don't see any good way around these conflicts, except maybe shifting the whole remap scheme to using Ctrl+Shift instead of just the Ctrl key. But that wouldn't be very intuitive. 

Most desired results will tend to be near the top of the results list anyway, so the primary benefit is still retained by having 1-9 mapped, plus the remaining letters. 

Adding `KEY_0` to the numerical key remaps, which will have no effect for now since Alt+0 doesn't exist, but I'll be asking the Ulauncher devs to add it as a shortcut in the app, so I hope it will be a usable remap in a future Ulauncher release.
2022-01-06 14:10:43 -09:00
Ben Reaves
db68031eb4 Re-ordered firefox, chrome & general browser definitions for Linux 2022-01-02 17:25:38 -06:00
Ben Reaves
30f4c1285b Merge pull request #594 from RedBearAK/patch-35
Finder mods updates: Nav, Views
2021-12-26 16:37:20 -06:00
RedBearAK
f858ae9614 Fixes for Cmd+Shift+Left/Right shortcut 2021-12-25 23:19:08 -09:00
RedBearAK
75dbe611b3 Update kinto.py 2021-12-24 23:25:28 -09:00
RedBearAK
6cdedf41e3 Add Cmd+Shift+Left/Right for tab nav, fix typos
Adding in Cmd+Shift+Left/Right to match another macOS Finder shortcut that works for tab navigation. 

This is unfortunately different from the web browser shortcut of Cmd+Option+Left/Right for tab nav.
2021-12-24 23:19:19 -09:00
RedBearAK
df8d46e1c1 Additional formatting and typo fixes 2021-12-24 01:28:20 -09:00
RedBearAK
b9f15950b2 Finder mods updates: Nav, Views
Some good updates to the Finder mods here. 

- Make labels a bit more clear. 
- Clean up a lot of formatting/alignment for readability. 
- Make tab nav with braces work in Deepin's dde-file-manager (Ctrl+Shift+Tab/Ctrl+Tab)
- Optional (disabled) shortcut to make new Nautilus windows remap to a system shortcut of Cmd+Option+Space (Ctrl+Alt+Space). 
- Enable Cmd+Braces to supplement Cmd+Left/Right for back-forward nav in all file managers (verified these are working shortcuts in macOS Finder). Uses the same remap as Ctrl+Left/Right to Alt+Left/Right, so works in all supported file managers. One more similarity to make file managers behave the same as web browsers. 
- Bring as much order as possible to the chaos of folder view shortcuts. 

Six file managers approximate the Finder's view options of Cmd+1 (Icons), Cmd+2 (Detailed List), Cmd+3 (Compact list or columns). Eight can do at least the first two views. Now all file managers will use the same folder view for the same Cmd+1/2/3 equivalent. 

Nautilus has two view modes and the shortcuts were reversed. Dolphin has three and was partially reversed. PCManFM has four, with three shortcuts out of order. All fixed to match Finder as closely as possible with this patch. 

Merry Christmas to all, and to all a good night!
2021-12-23 20:54:40 -09:00
Ben Reaves
2f8ae2380f Merge pull request #589 from rbreaves/hotfix
Additional qemu matching for Linux
2021-12-12 15:09:24 -06:00
Ben Reaves
77d52ec176 Additional qemu matching for Linux 2021-12-12 15:06:32 -06:00
Ben Reaves
13a98ce8cc Merge pull request #587 from RedBearAK/patch-33
Remap keys for Ulauncher
2021-12-12 02:27:28 -06:00
Ben Reaves
8f333dec20 Merge pull request #586 from RedBearAK/patch-32
Add new terminal Tabby
2021-12-12 02:26:26 -06:00
RedBearAK
f7ff8d1728 Comment out Ctrl+Q shortcut 2021-12-11 02:26:50 -09:00
RedBearAK
5b2a2c88c2 Remap keys for Ulauncher
Ulauncher displays shortcuts on each line of results to activate that line with a keyboard shortcut. This could mean launching an application, opening a file, or navigating through a directory hierarchy with a file/directory extension. All shortcuts are based on the Alt key, with numbers 1-9 and then letters if there are enough search results being displayed. 

Kinto remaps the Alt key to be Ctrl, so this just remaps Ctrl+[number] and Ctrl+[letter] back to Alt+[number] and Alt+[letter] when WM_CLASS is "ulauncher", to allow the user to continue using the physical Alt key shortcuts to activate Ulauncher search results. 

On a 1080p display, using a file/directory search extension in Ulauncher, I have seen search results with shortcuts from "Alt+1" to at least "Alt+g" being displayed. With this remapping everything seems to work fine for me. I don't know if a high resolution monitor will display all the way up to "Alt+z" but I went ahead and included the whole alphabet just to be sure.
2021-12-11 02:17:36 -09:00
RedBearAK
48b5699aed Add new terminal Tabby
This app (Tabby, used to be Terminus) is heavy and has some really strange behaviors with keyboard shortcuts, but that doesn't seem to actually be a problem with Kinto's remapping. Tabby behaves equally strangely with Kinto disabled. Very slow to react to keyboard shortcuts in general and often requires hitting holding down the modifier and hitting the last key a second time. 

Might be a peculiarity specific to having it installed on my Ubuntu/GNOME 21.10 system. It's a cross-platform terminal app. Might want to check it out on Windows and see if it should be added to the Windows Kinto config file.
2021-12-10 22:51:41 -09:00
Ben Reaves
eec325024d Update README.md 2021-12-08 23:38:53 -06:00
Ben Reaves
a5087b0f95 Update README.md 2021-12-08 16:36:12 -06:00
Ben Reaves
36f189e434 Merge pull request #585 from RedBearAK/patch-31
Add WM_CLASS for Spicy to remotes list
2021-12-04 13:21:59 -06:00
RedBearAK
50b31abba9 Add WM_CLASS for Spicy to remotes list
Playing with QuickEMU. It uses QEMU but the main window has a WM_CLASS of "Spicy" so isn't caught by the "qemu" entry. Adding it to the list of VM-type software.
2021-12-02 20:40:09 -09:00
Ben Reaves
aa53c83c61 Merge pull request #577 from rbreaves/hotfix
Improved virtual desktop support in remotes, added sharpkeys mac kb layout
2021-10-29 19:30:34 -05:00
Ben Reaves
5f795328c9 Improved virtual desktop support in remotes, added sharpkeys mac kb layout 2021-10-27 01:01:45 -05:00
Ben Reaves
39ed3c83f9 Merge pull request #574 from rbreaves/hotfix
Add Waterfox to browsers & Hyper-V to remote exclusions
2021-10-24 13:30:11 -05:00
Ben Reaves
bf35285914 Added Hyper-V VMs to remote exclusions group 2021-10-24 13:28:44 -05:00
Ben Reaves
7a3d9cbd7c Added waterfox to browsers on Linux 2021-10-24 13:22:20 -05:00
Ben Reaves
2a920d0622 Merge pull request #568 from lydell/patch-1
Add support for Firefox Developer Edition
2021-09-13 01:12:07 -05:00
Simon Lydell
253b061b12 Add support for Firefox Developer Edition
I made this change `~/.config/kinto/kinto.py` and restarted the service. Then cmd-option-left/right worked in Firefox Developer Edition as well – https://github.com/rbreaves/kinto/issues/535#issuecomment-917612176

I’m quite new to Kinto so I’m not 100% sure this is the correct fix, but it seems to work.

Thanks for Kinto btw! It’s awesome.
2021-09-12 13:05:34 +02:00
Ben Reaves
c8a28fe3e0 Merge pull request #490 from RedBearAK/patch-21
Open Firefox private window with Ctrl+Shift+N
2021-09-07 23:19:45 -05:00
Ben Reaves
9f5ba6e14e Open Firefox private window - Windows 2021-09-07 23:19:12 -05:00
Ben Reaves
f855da301c Merge pull request #500 from RedBearAK/patch-23
Toggle maximized window state shortcut (KDE Neon)
2021-09-07 23:13:47 -05:00
Ben Reaves
4e33e5516b Merge pull request #536 from RedBearAK/patch-30
Add Cmd+Opt+Left/Right and Cmd+Shift+Braces for browser tab navigation
2021-09-07 23:11:38 -05:00
Ben Reaves
5c25cd15cb Updated browser tab switching for Windows parity 2021-09-07 23:10:42 -05:00
Ben Reaves
af4b4ea08e Merge pull request #541 from RedBearAK/patch-29
Add Cmd+Shift+Braces for tab navigation in file managers
2021-09-07 22:39:26 -05:00
Ben Reaves
e69e529a18 Move lines properly in Editors. Closes #481
Fixes issue in VSCode with moving lines on Alt-Up/Down
2021-07-27 13:42:28 -05:00
Ben Reaves
f717db9aaa Update README.md 2021-07-14 22:05:27 -05:00
Ben Reaves
353c2c6bb4 Update README.md 2021-07-14 22:04:21 -05:00
Ben Reaves
dcbf1e8382 Added Remmina name variation for Ubuntu 18.04, improves remote access functionality 2021-07-05 00:26:36 -05:00
Ben Reaves
9a52bd864a Merge pull request #542 from rbreaves/make_intall_on_fedora_work_in_enforcing_mode
Make intall on fedora work in enforcing mode
2021-07-04 00:22:27 -05:00
Ben Reaves
9b87fda382 Merge branch 'master' into make_intall_on_fedora_work_in_enforcing_mode 2021-07-04 00:10:05 -05:00
RedBearAK
b3fc4c9202 Minor formatting fix 2021-07-01 03:09:11 -08:00
RedBearAK
4858b9cf28 Add Cmd+Shift+Braces for tab navigation in file managers
This adds Cmd+Shift+Braces as an option for tab navigation in most Linux file managers. Also fixes the standard tab navigation shortcuts (Ctrl+PgUp/PgDn) to work in SpaceFM. 

This shortcut works in Finder on macOS. 

Tested this code in: 

Caja
Dolphin
Nautilus
Nemo
PCManFM[-Qt]
SpaceFM (default is Ctrl+Tab/Ctrl+Shift+Tab, now remapping from Ctrl+PgUp/PgDn)
Thunar
2021-07-01 03:04:16 -08:00
RedBearAK
45ad4f3f68 Adding Cmd+Shift+Braces for tab navigation 2021-07-01 02:18:10 -08:00
Ben Reaves
e54dba20a1 Merge pull request #540 from rbreaves/chrome-fix
Fix for toggling between Chrome/IBM/Windows/Mac on Windows
2021-06-30 00:58:58 -05:00
Ben Reaves
56cae8a009 Fixed chrome/IBM setup issues on Windows 2021-06-30 00:54:20 -05:00
Ben Reaves
e7dd3684c2 Fixed syntax issue and regex formulas for chrome/ibm on Windows 2021-06-29 20:38:12 -05:00
Ben Reaves
982cdcb92a Fixes Chrome/IBM layout issue on Windows 2021-06-29 20:23:45 -05:00
Ben Reaves
829289ba78 Merge branch 'hotfix' 2021-06-29 00:27:54 -05:00
Ben Reaves
b8793cff49 Added missing Go to shortcut for Sublime & VSCode for Windows 2021-06-29 00:26:28 -05:00
Ben Reaves
8b522461a5 Update README.md 2021-06-27 23:57:44 -05:00
RedBearAK
1f4b2bb451 Add Cmd+Opt+Left/Right for browser tab navigation
Adding mapping to enable Cmd+Opt+Left/Right to supplement Ctrl+PgUp/PgDn for browser tab navigation. 

Shortcut is verified by testing to work on Firefox, Google Chrome and Opera in macOS, so it should be suitable for inclusion in Kinto. 

Included are some line changes from PR #487, which should close that PR if this is merged.
2021-06-27 17:03:35 -08:00
Ben Reaves
04bc3f60e4 Merge branch 'hotfix' 2021-06-05 02:37:51 -05:00
Ben Reaves
8ffd3159c8 Allowing system tray to be enabled on Gnome by default 2021-06-05 02:37:34 -05:00
Ben Reaves
b19b0bea4b Merge pull request #527 from RedBearAK/patch-28
Make window maximize toggle shortcut work in terminals too
2021-06-03 22:45:49 -05:00
RedBearAK
07bee26ddb Make window maximize toggle shortcut work in terminals too
No Super key in terminals, so "maximize" toggle shortcut from GUI block needs to be modified for the terminals block.
2021-06-03 19:36:13 -08:00
Ben Reaves
6dc97a5628 Merge pull request #526 from RedBearAK/patch-27
Fix zoom in/out (font size) shortcuts in terminals
2021-06-03 22:01:42 -05:00
RedBearAK
59e47dbbd6 Fix zoom in/out (font size) shortcuts in terminals
On macOS the terminal, like a web browser, lets you "zoom" in and out with Cmd+Equal and Cmd+Minus. It doesn't force you to type Cmd+Shift+Equal to get to the "Plus" keycode on the Equal key. On Linux of course, terminals want you to use Ctrl+Shift+Equal (Plus) to zoom in (increase font size) and then Ctrl+Minus without the Shift key to decrease the font size (zoom out). This is very awkward. 

Mapping RC-Minus to C-Minus in the termStr block instead of to C-Shift-Minus lets the user zoom in and out in terminals by just pressing the equivalent of Cmd-(Equal/Minus) keys, without ever worrying about the Shift key. Same as terminals in macOS, and GUI web browsers. 

Since this is probably just one of the keys that was blanket remapped from RC to C-Shift, I don't know of any reason this should be harmful.
2021-06-03 17:42:30 -08:00
Ben Reaves
e6d0512ff4 Update README.md 2021-06-02 18:54:28 -05:00
Ben Reaves
6587a149ce Merge branch 'hotfix' 2021-06-01 21:03:20 -05:00
Ben Reaves
f80a1d616d Reconfigured media keys for Windows w/o mapping over the delete key 2021-06-01 21:02:56 -05:00
Ben Reaves
c391b6abf8 Update README.md 2021-06-01 16:05:24 -05:00
Ben Reaves
f6d57eae4c Update README.md 2021-06-01 16:04:33 -05:00
Ben Reaves
06531dd6cc Update README.md 2021-05-31 12:53:23 -05:00
Ben Reaves
4c2a4993ef Merge branch 'hotfix' 2021-05-28 10:54:42 -05:00
Ben Reaves
572739360e Added NoMachine for Windows => Linux 2021-05-28 10:53:54 -05:00
Ben Reaves
d87802918d Merge pull request #521 from rbreaves/hotfix
Added TERM env fix to remove garbage in syslog. Closes #515
2021-05-27 19:07:12 -05:00
Ben Reaves
e5b2ef8155 Added TERM env fix to remove garbage in syslog. Closes #515 2021-05-27 18:59:36 -05:00
Ben Reaves
7149b4ab24 Merge pull request #519 from rbreaves/hotfix
Closes #518, regex now matches whole wm_class names only & Commented media keys for Windows
2021-05-24 21:01:09 -05:00
Ben Reaves
db61f2d937 Closes #518. Joining wm_class names into regex updated to be whole matches only 2021-05-24 20:59:06 -05:00
Ben Reaves
19aefd68e0 Added commented out media keys for Windows 2021-05-24 18:57:13 -05:00
Ben Reaves
9fb72c95b1 Renamed virtm group to remotes, added msrdc 2021-05-18 17:27:46 -05:00
Ben Reaves
ec8b0fdc22 Merge pull request #514 from RedBearAK/patch-26
Add qemu-system- WM_CLASS variants to remotes list
2021-05-13 09:35:38 -05:00
RedBearAK
1e98cfc29d Add qemu-system- WM_CLASS variants to remotes list
Adding a regex for variants of `qemu-system-.*` to remotes list to bypass Kinto mapping. This is working for me. 

Variants I've seen on my system: 
`qemu-system-i386`
`qemu-system-x86_64`

A snap package called Sosumi operates as a QEMU/KVM front end, and caused a problem because it wanted to see Control_L+Alt_L+G to let go of mouse and keyboard. This solves that problem.
2021-05-13 00:08:34 -08:00
Ben Reaves
e92bc37308 Merge pull request #513 from RedBearAK/patch-26
Add Virt-manager to remotes WM_CLASS list, alphabetize list
2021-05-12 19:57:01 -05:00
RedBearAK
14021fbf67 Add Virt-manager to remotes WM_CLASS list, alphabetize list
Just adding "Virt-manager" WM_CLASS and re-ordering `remotes` alphabetically to conform to other lists.
2021-05-12 16:26:06 -08:00
Ben Reaves
1562096889 Merge pull request #510 from RedBearAK/patch-25
Add Station terminal WM_CLASS to terminals list
2021-05-11 15:23:29 -05:00
RedBearAK
c84d13118a Add Station terminal WM_CLASS to terminals list
Nitrux Linux default terminal is called Station, with WM_CLASS name "station".
2021-05-11 12:14:57 -08:00
Ben Reaves
bec547bbda Merge pull request #509 from rakin406/add-rakin-fork
Add more terminal emulators
2021-05-11 13:28:13 -05:00
rakin406
724006ef3a Add more terminal emulators 2021-05-11 20:02:17 +06:00
Ben Reaves
ef60bf8a59 Fixed broken system tray for linux 1.2-9 2021-05-07 10:46:13 -05:00
Ben Reaves
44080c25da Update README.md 2021-05-05 21:26:45 -05:00
Ben Reaves
6fa6d05123 Update README.md 2021-05-05 21:24:08 -05:00
Ben Reaves
1d1971f7cc Merge pull request #498 from rbreaves/dev
Add support for sysvinit & mxlinux w/ xfce
2021-05-05 21:16:29 -05:00
Ben Reaves
eb113125b5 Corrected the killing of xkeysnail under sysvinit 2021-05-05 21:11:30 -05:00
Ben Reaves
c298bd2b5a Fixes Cmd-Grave for In-App switching 2021-05-05 06:55:42 -05:00
Ben Reaves
e1f1907e46 Reverted adding back of Super for now, fixed Ctrl-Tab for xfce4 2021-05-05 06:17:06 -05:00
Ben Reaves
5d1b1d6598 XFCE super key install conflict resolved. Improved launcher detection/remapping. 2021-05-05 05:30:59 -05:00
Ben Reaves
7375dd78bf Updated hotkeys for xfce4 2021-05-05 01:43:06 -05:00
Ben Reaves
e4540afcb5 Update README.md 2021-05-05 00:30:40 -05:00
Ben Reaves
2490417b85 Updated linux.sh install file to accept use wget or curl 2021-05-05 00:22:00 -05:00
Ben Reaves
9a3521d05c Added missing sysvinit file copy 2021-05-04 23:58:09 -05:00
RedBearAK
9a5b44661c Toggle maximized window state shortcut (KDE Neon)
Putting this in as disabled. It will need some logic in the installer to enable it if Neon is detected, and disable the `(gnome/kde)` line above it. But at least it will be there already, to be manually enabled if necessary. 

See issue #477 for discussion.
2021-05-04 20:26:39 -08:00
Ben Reaves
32fba15d75 Aligning systray w/ GUI app for sysv detection 2021-05-04 18:19:46 -05:00
Ben Reaves
23e2f7018b Merge pull request #495 from rbreaves/feature/mxlinux
Adding support for sysvinit & mxlinux w/ xfce
2021-05-04 18:07:43 -05:00
Ben Reaves
eeb5cc9ecb Quieted most warnings & updated gtk methods 2021-05-04 17:17:26 -05:00
Ben Reaves
4a65034713 Adding support for sysvinit for mxlinux w/ xfce 2021-05-04 16:10:03 -05:00
Ben Reaves
3418e6bf3f Update README.md 2021-05-02 16:59:11 -05:00
Ben Reaves
dbd614783f Update README.md 2021-05-02 05:09:38 -05:00
RedBearAK
d19e5836a5 Open Firefox private window with Ctrl+Shift+N
Safari and Chrome/Chromium use Ctrl+Shift+N to open private/incognito windows. Firefox for some reason wants to use Ctrl+Shift+P. This makes Firefox respond to Ctrl+Shift+N the same way as Safari and the Chromes. Ctrl+Shift+P of course still works also. 

No pre-existing action for Ctrl+Shift+N seems to exist in the current Firefox version. So no known conflict.
2021-04-28 17:40:08 -08:00
Ben Reaves
cf15be6414 Merge pull request #479 from RedBearAK/patch-17
Add GNOME Boxes WM_CLASS for Linux, and a comma
2021-04-13 18:28:35 -05:00
RedBearAK
87dae12d9b Add GNOME Boxes WM_CLASS for Linux, and a comma
Note: I'm trying to consistently leave a comma after the last item in each vertically formatted python list, so that when someone with less python knowledge wants to add something to the list and does it the "lazy way" by just copying the last line, pasting it on the end and editing it to add a new item, they won't cause the "missing comma" python error too easily. Having a comma on the very end of the list with no element after it doesn't seem to cause any harm or python errors. And you can copy/paste the last item as many times as you want without getting into trouble.
2021-04-12 23:40:36 -08:00
Ben Reaves
3b5c35f806 Merge pull request #476 from rbreaves/feature/virtualbox
Added Virtualbox host exception for Linux
2021-04-10 02:14:24 -05:00
Ben Reaves
cf72e880d5 Added Virtualbox host exception for Linux 2021-04-10 02:13:23 -05:00
Ben Reaves
0bcdb8c9b2 Merge pull request #471 from rbreaves/feature/KI-469-File-Managers-Followup
Feature/ki 469 file managers followup
2021-04-07 03:07:13 -05:00
Ben Reaves
e71fa554d3 KI-469 Aligned comments 2021-04-07 03:06:18 -05:00
RedBearAK
2ff2b4c082 Tabs to spaces 2021-04-06 23:31:35 -08:00
RedBearAK
2b83e34c3f Fix comment alignment (two more spaces if line is disabled) 2021-04-06 23:23:16 -08:00
RedBearAK
9af4d29bbf Add PCManFM-Qt to PCManFM override, Fix typos, clarify Dolphin
Just doing some sweeping up and prettifying. Main thing is adding the PCManFM fork, PCManFM-Qt to the overrides block for PCManFM. Working on the Nautilus variant reminded me.
2021-04-06 21:59:59 -08:00
Ben Reaves
c3337b5682 Merge pull request #468 from rbreaves/feature/KI-463-File-Managers
Feature/ki 463 file managers
2021-04-06 22:36:12 -05:00
Ben Reaves
045598bcd5 Merge pull request #467 from RedBearAK/patch-17
Add LXTerminal (LXDE terminal emulator)
2021-04-06 21:51:47 -05:00
RedBearAK
32806c956d Add LXTerminal (LXDE terminal emulator)
Tested working.
2021-04-06 18:38:47 -08:00
Ben Reaves
046c800295 Merge pull request #466 from OlegSmelov/intellij-keymap-line-recent
Fix go to line, recent files popup IntelliJ shortcuts
2021-04-06 18:57:14 -05:00
Oleg Smelov
0cbbc94b2d Fix go to line, recent files popup IntelliJ shortcuts 2021-04-06 23:42:08 +03:00
RedBearAK
4d9d073997 Zorin OS uses "nautilus" instead of "org.gnome.nautilus".
Zorin OS uses Nautilus as default file manager, but its WM_CLASS is shortened to "nautilus" instead of the original "org.gnome.nautilus". So we have to add that to the list (and also to the overrides for Nautilus).
2021-04-05 20:40:03 -08:00
RedBearAK
f0412438b4 Finder mods for Linux file managers (v2021-04-05)
2021-04-05 updated version of Finder mods, supporting common Linux file managers: 

```
# 
# Caja File Browser (MATE file manager, fork of Nautilus)
# DDE File Manager (Deepin Linux file manager)
# Dolphin (KDE file manager)
# Nautilus (GNOME file manager, may be named "Files")
# Nemo (Cinnamon file manager, fork of Nautilus, may be named "Files")
# Pantheon Files (elementary OS file manager, may be named "Files")
# PCManFM (LXDE file manager)
# PCManFM-Qt (LXQt file manager)
# SpaceFM (Fork of PCManFM file manager)
# Thunar File Manager (Xfce file manager)
# 
```

This adds support for the Deepin Linux default file manager, and some rearranging/code clarification improvements on the previous iteration. Closing PR #450 in favor of this update.
2021-04-05 16:02:32 -08:00
Ben Reaves
44d8be7822 Update README.md 2021-04-05 14:23:35 -05:00
Ben Reaves
6bc73c1c23 Merge pull request #462 from RedBearAK/patch-16
Add deepin-terminal WM_CLASS to terminals
2021-04-05 09:43:46 -05:00
RedBearAK
2d3dc5016d Add deepin-terminal WM_CLASS to terminals 2021-04-05 02:29:24 -08:00
Ben Reaves
5864765ed1 Updated readme with uninstall for new install method 2021-04-04 14:31:09 -05:00
Ben Reaves
022dedb1dd Merge pull request #458 from rbreaves/feature/manjaro-update
Feature/manjaro update
2021-04-03 21:29:35 -05:00
Ben Reaves
3e3c27cde3 Merge branch 'master' into feature/manjaro-update 2021-04-03 21:27:19 -05:00
Ben Reaves
93b7fe8d49 Update README.md 2021-04-03 17:59:15 -05:00
Ben Reaves
68c3d23bfe Merge branch 'feature/setup' 2021-04-03 17:41:26 -05:00
Ben Reaves
8fe1bc7772 Added quick Windows installer 2021-04-03 17:40:31 -05:00
Ben Reaves
d640ebfce7 Update README.md 2021-04-03 17:32:13 -05:00
Ben Reaves
1ae096daf5 Merge branch 'hotfix' 2021-04-03 03:36:57 -05:00
Ben Reaves
46354a971c Added git dependency install 2021-04-03 03:36:22 -05:00
Ben Reaves
af6f56d2dc Merge branch 'hotfix' 2021-04-03 02:26:02 -05:00
Ben Reaves
fbc630f1d5 Updated quick install to pull in release & build correctly 2021-04-03 02:25:30 -05:00
Ben Reaves
e1e9b08442 Update README.md 2021-04-03 01:15:00 -05:00
Ben Reaves
b0ba86623b Moved pillow dependency to install after pip3 is installed 2021-04-03 01:09:56 -05:00
Ben Reaves
a798b736b6 Merge pull request #456 from rbreaves/feature/setup
Quick setup script added for Linux
2021-04-03 00:58:25 -05:00
Ben Reaves
3dc68314f9 Quick setup script added for Linux 2021-04-03 00:56:42 -05:00
RedBearAK
5c40258265 Ask user to verify if Manjaro is updated
Install will fail (GUI window will not appear) on Manjaro unless system is fully updated first. This patch asks users to verify that they've run "sudo pacman -Syu" before attempting install. 

Failure is possibly related to the GLIB error mentioned later in the install script. Not certain. But a full update always got Manjaro to finally show the GUI installer window.
2021-04-01 11:03:57 -08:00
Ben Reaves
1529d90918 Fixed breaking some system OS shortcuts w/ Cmd-Dot update on Linux 2021-04-01 01:01:44 -05:00
Ben Reaves
56493b4eec Merge pull request #441 from RedBearAK/patch-7
Reformat WM_CLASS lists as vertically stacked for easier reading/editing
2021-04-01 00:21:34 -05:00
Ben Reaves
974cd13fae Merge pull request #448 from rbreaves/feature/cmd-dot-sigint
Adds Cmd-Dot sigint to Terminals
2021-04-01 00:18:26 -05:00
Ben Reaves
d8ad4b874f Added Cmd-Dot for Windows 2021-04-01 00:17:02 -05:00
Ben Reaves
b532a9891d Updated remotes and terminals groupings for Linux. Adds Cmd-Dot sigint from #442 2021-03-31 23:43:14 -05:00
Ben Reaves
294ba3b89f Merge pull request #443 from RedBearAK/patch-9
Remove duplicate line for mapping Ctrl+V in terminals
2021-03-31 22:22:54 -05:00
Ben Reaves
c908b00a38 Update README.md 2021-03-30 22:33:41 -05:00
Ben Reaves
56f4f679e4 Update README.md 2021-03-30 21:17:23 -05:00
Johannes von Bargen
5e28015a31 remove extra space 2021-03-31 01:22:58 +02:00
Johannes von Bargen
3a59edb51e make the installation run on fedora
* in enforcing mode
* without sudo in the unit file
2021-03-31 01:16:57 +02:00
RedBearAK
ba46c4ff97 Remove duplicate line for mapping Ctrl+V in terminals 2021-03-29 00:35:45 -08:00
RedBearAK
980ae6a237 Mapping Cmd+Dot to Ctrl+C (terminals) and Escape (GUIs) 2021-03-29 00:32:39 -08:00
RedBearAK
1a57dd9a5e Reformat python lists as vertically stacked for easier reading/editing 2021-03-28 19:31:37 -08:00
Ben Reaves
c9810838a1 Merge pull request #440 from mamercad/browser-prev-next-tab
Add shortcuts for browser prev and next tab switching
2021-03-28 20:57:49 -05:00
Mark Mercado
e60f7cffea Add shortcuts for browser prev and next tab switching 2021-03-28 21:46:45 -04:00
Ben Reaves
c8b169b6a0 Update README.md 2021-03-21 00:34:29 -05:00
Ben Reaves
81c0c52902 Merge pull request #428 from RedBearAK/patch-4
Fix typo
2021-03-18 02:22:59 -07:00
RedBearAK
4d697d9cdc Fix typo
Fixed typo in output, line 65
2021-03-17 19:38:57 -08:00
Ben Reaves
307c9bc2d1 Update README.md 2021-03-16 21:58:00 -05:00
Ben Reaves
7436825c93 Update README.md 2021-03-16 21:57:31 -05:00
Ben Reaves
d680a58d04 Merge pull request #426 from jfsso/fix-win-start-path
Fix start script symlink path on Windows install
2021-03-14 10:58:15 -05:00
João Orui
71af27be24 Fix start script symlink path on Windows install
Fixes #256
2021-03-14 17:29:40 +09:00
Ben Reaves
2ce4bbdb82 Merge pull request #422 from RedBearAK/patch-2
Fix "toggle maximization state" shortcut for gnome/kde
2021-03-13 03:19:47 -06:00
RedBearAK
085485dcfc Fix maximize window toggle shortcut for gnome/kde
Changed "LC" to "Super" to fix the "toggle maximization state" shortcut. [ K("RC-Super-f"):K("M-F10"), ]
Not changing the other three instances, not sure if they need to be changed. (eos, manjaro, manjaro)
2021-03-12 23:47:01 -09:00
Ben Reaves
e7188ca693 Update README.md 2021-03-13 00:21:16 -06:00
Ben Reaves
4cf795619d - Updated chromebook remap for Backspace combos 2021-03-12 20:52:37 -06:00
Ben Reaves
588fe1a0dc - Added delete entire line via Cmd-Backspace (Linux) 2021-03-12 20:30:43 -06:00
Ben Reaves
18ae403188 Update README.md 2021-03-12 17:15:53 -06:00
Ben Reaves
de8e674027 Update README.md 2021-03-12 17:14:03 -06:00
Ben Reaves
625f775464 Update README.md 2021-03-12 14:02:00 -06:00
Ben Reaves
4980c4a35e Merge branch 'hotfix' 2021-03-11 00:06:19 -06:00
Ben Reaves
c09d8b07e4 Merge pull request #414 from RedBearAK/patch-1
Tweak GUI app menu to be more like tray icon menu
2021-03-10 22:02:29 -08:00
Ben Reaves
a34acfb0b5 - Added xfreerdp to Linux 2021-03-10 23:59:34 -06:00
RedBearAK
9f694fd198 Tweak GUI app menu to be more like tray icon menu
This tweak moves the "Restart" and "Stop" actions to the top of the File menu in the Kinto.sh GUI. More like the tray icon menu.
2021-03-06 19:03:52 -09:00
Ben Reaves
4349c4f9dd Merge pull request #412 from m000/patch-1
temporary fix for using kinto with Synergy
2021-03-06 19:44:12 -06:00
Manolis Stamatogiannakis
68395fd91c temporary fix for using kinto with Synergy
If you use kinto and [Synergy](https://symless.com/synergy) at the same time, kinto will apply transformations when Synergy has the focus.
This messes up input because the transformed keypresses are consumed by a different desktop.

However it is not possible to write a rule to avoid transforming keypresses specifically for Synergy, because Synergy doesn't seem to set the wm_class.

The  conditional modmap in this commit solves the problem. But it will also affect any other applications not setting the wm_class. For this, the modmap is commented by default, and Synergy users (which shouldn't be too many) need to enable it manually.
2021-03-06 19:33:40 +01:00
Ben Reaves
482de09dcc - Removed extra spacing on remap comments 2021-02-28 22:29:05 -06:00
Ben Reaves
f075f3a927 Merge branch 'hotfix' 2021-02-26 14:19:27 -06:00
Ben Reaves
00cbd59a4e - Removed conflict (windows ahk) 2021-02-26 14:17:53 -06:00
Ben Reaves
cbfe1a4141 Merge pull request #407 from rbreaves/hotfix
- Added Open File Browser (Windows). Closes #405
2021-02-25 22:24:45 -06:00
Ben Reaves
d44247affb - Added Open File Browser (Windows). Closes #405 2021-02-25 22:23:23 -06:00
Ben Reaves
4f1adbc358 Merge branch 'hotfix' 2021-02-25 13:25:34 -06:00
Ben Reaves
a362d704c2 - Commented out duplicate hotkey definition 2021-02-25 13:22:42 -06:00
Ben Reaves
6e2631aa3c Merge pull request #399 from rbreaves/hotfix
- Fixes Win key combos on Search key position (Chromebook for Windows)
2021-02-24 20:12:07 -06:00
Ben Reaves
4bcdcdea6a - Wordwise correctionss, chromebook improvements (RAlt is now Win key) 2021-02-24 20:10:12 -06:00
Ben Reaves
f9d7cba452 Update README.md 2021-02-23 23:57:31 -06:00
Ben Reaves
fb0c476c7f Update README.md 2021-02-20 20:30:42 -08:00
Ben Reaves
afd7ec47bf Update README.md 2021-02-19 22:38:59 -06:00
Ben Reaves
06ba71fa67 Update README.md 2021-02-16 19:45:39 -06:00
Ben Reaves
539d916ae3 Update README.md 2021-02-16 19:42:32 -06:00
Ben Reaves
6d49644151 - Added in ^C sigint for chromebooks in code editors 2021-02-16 18:24:57 -06:00
Ben Reaves
4a3877a5fa Update README.md 2021-02-15 21:33:08 -06:00
Ben Reaves
12efd46dd7 - Fixes Win key combos on Search key position (Chromebook for Windows) 2021-02-15 18:26:40 -06:00
Ben Reaves
e255cb6727 Merge pull request #398 from rbreaves/hotfix
- Fixed hotkey mistakes for Chrome/IBM on Windows
2021-02-15 17:49:58 -06:00
Ben Reaves
8e0828aa3b - Fixed hotkey mistakes for Chrome/IBM on Windows 2021-02-15 17:42:53 -06:00
Ben Reaves
ecbf8a7aed Update README.md 2021-02-15 14:59:07 -06:00
Ben Reaves
93743cc4c5 Update README.md 2021-02-15 14:57:30 -06:00
Ben Reaves
34dee0e9ef Update README.md 2021-02-15 14:56:32 -06:00
Ben Reaves
261befaf7f Update README.md 2021-02-15 14:52:27 -06:00
Ben Reaves
5410895d0a Update README.md 2021-02-15 14:50:48 -06:00
Ben Reaves
319b506260 Update README.md 2021-02-15 14:48:46 -06:00
Ben Reaves
6a8de98bbd Update README.md 2021-02-15 14:44:10 -06:00
Ben Reaves
9aaac4f356 Update README.md 2021-02-15 14:40:48 -06:00
Ben Reaves
e9911f3de8 Update README.md 2021-02-15 14:33:54 -06:00
Ben Reaves
d76dcc9682 Update README.md 2021-02-15 14:31:48 -06:00
Ben Reaves
6a32f41de4 Update README.md 2021-02-15 14:24:30 -06:00
Ben Reaves
273d0e2ee4 Update README.md 2021-02-15 01:07:12 -06:00
Ben Reaves
ce9b137c13 Merge pull request #396 from rbreaves/linux-rdp
- Added Remmina support for RDP sessions (Linux to Windows)
2021-02-14 23:47:28 -06:00
Ben Reaves
dab65cd8f0 - Added Remmina support for RDP sessions (Linux to Windows) 2021-02-14 23:45:29 -06:00
Ben Reaves
50d53ba77f Merge pull request #385 from fracture91/browser-tab-num-jump
Make Command+Num on linux jump to tabs in browsers
2021-02-07 14:12:01 -08:00
Ben Reaves
a285e7ebe9 Merge pull request #386 from fracture91/same-app-switching-backwards
Fix Command + Shift + Grave same app switching so it moves backwards, not forwards
2021-02-04 19:59:49 -08:00
Andrew Hurle
231060ee5b Fix Command + Shift + Grave same app switching so it moves backwards 2021-02-04 21:13:42 -05:00
Andrew Hurle
f693312dce Make Command+Num on linux jump to tabs in browsers
See "Go to Tab 1 to 8" and "Go to Last Tab":

https://support.mozilla.org/en-US/kb/keyboard-shortcuts-perform-firefox-tasks-quickly#w_windows-tabs

See "Jump to a specific tab" and "Jump to the rightmost tab":

https://support.google.com/chrome/answer/157179?co=GENIE.Platform%3DDesktop&hl=en#zippy=%2Ctab-and-window-shortcuts
2021-02-04 17:12:22 -05:00
Ben Reaves
6d2dd55a96 Merge pull request #384 from rbreaves/dev
- Fixes system tray to be executable. Closes #383
2021-02-03 11:33:58 -08:00
Ryan Reaves
46430e3ec6 - Fixes system tray to be executable. Closes #383 2021-02-01 13:03:16 -06:00
Ben Reaves
d1d020ff80 Update README.md 2021-01-21 21:58:33 -06:00
Ben Reaves
bc04c87042 Update README.md 2021-01-21 21:26:26 -06:00
Ben Reaves
dc31e28e16 Merge pull request #377 from rbreaves/dev
- Added min/max fix for Windows to avoid multi-cursor issue
2021-01-16 00:25:05 -06:00
Ben Reaves
30a9529940 - Added min/max fix for Windows to avoid multi-cursor issue 2021-01-15 17:17:24 -06:00
Ben Reaves
7c9887237b Update README.md 2021-01-14 23:19:03 -06:00
Ben Reaves
a090725633 Merge pull request #372 from rbreaves/dev
Set permissions better, add RAlt-Enter for Insert, fix cmd-tab for terms (linux)
2021-01-14 08:38:56 -06:00
Ben Reaves
1e694aa65f Update README.md 2021-01-13 18:57:49 -06:00
Ben Reaves
7f771cb5da Update README.md 2021-01-13 18:45:44 -06:00
Ben Reaves
20e73a060b Update README.md 2021-01-13 18:45:11 -06:00
Ben Reaves
3cbb2efa4b Update README.md 2021-01-12 22:17:41 -06:00
Ben Reaves
39aef1be43 Update README.md 2021-01-12 21:53:06 -06:00
Ben Reaves
e526dfdda0 Update README.md 2021-01-12 18:22:27 -06:00
Ben Reaves
c321e51a8f Merge pull request #370 from albertofem/patch-1
Catch all Jetbrains applications
2021-01-10 16:33:52 -06:00
Ryan Reaves
43b4ae3986 - Added Insert on RAlt-Enter #371 #348, fixed cmd-tab during term usage (linux) 2021-01-10 16:16:42 -06:00
Alberto Fernández
8eb14ee96a Catch all Jetbrains applications
Right now, only IntelliJ IDEA IDE is being remapped. However, if you try to use CLion, PyCharm, etc. those won't be remapped as they have a different `WM_CLASS` value, for example: `jetbrains-clion`, `jetbrains-pycharm`, etc.

This PR just adds a wildcard to the regular expression for jetbrains remapping to catch all IDEs, but excluding the Jetbrains Toolbox app, which does not need remapping.

Tested with CLion, IntelliJ, PyCharm and Android Studio. Not sure if this will catch 100% of availables IDEs in Linux (for example, others like MPS, Datalore, etc.)
2021-01-10 18:45:01 +01:00
Ben Reaves
b76154d046 Update README.md 2021-01-10 03:02:01 -06:00
Ben Reaves
6fa0ec8ddd Update README.md 2021-01-10 02:45:56 -06:00
Ben Reaves
c924d91440 Update README.md 2021-01-10 02:44:51 -06:00
Ben Reaves
e9edc4891c Update README.md 2021-01-10 02:41:26 -06:00
Ben Reaves
015faa4491 - Set more execute permissions after file relocations 2021-01-09 18:30:18 -06:00
Ben Reaves
844f03ebc1 Merge pull request #357 from rbreaves/dev
- Relocated files and updated paths
2021-01-06 21:05:55 -08:00
Ben Reaves
2663bfc574 - Reset scripts to be executable 2021-01-06 23:04:22 -06:00
Ben Reaves
93743a6fa2 Merge branch 'master' into dev 2021-01-06 22:10:58 -06:00
Ben Reaves
74ef2b3a8f - Added sigint, exit for terminals in sublime/vscode 2021-01-06 22:08:17 -06:00
Ben Reaves
b5854eec66 Update README.md 2021-01-05 23:23:49 -06:00
Ben Reaves
06b235d4ea Update README.md 2021-01-05 23:13:05 -06:00
Ben Reaves
98d530921f Update README.md 2020-12-26 23:50:46 -06:00
Ben Reaves
d40fc42e15 Update README.md 2020-12-26 20:06:31 -06:00
Ben Reaves
78a0d993c4 Update README.md 2020-12-26 17:40:54 -06:00
Ben Reaves
51f14984d7 Update README.md 2020-12-26 13:20:15 -06:00
Ben Reaves
096556ef1a Update README.md 2020-12-26 13:19:22 -06:00
Ben Reaves
26d2acd0fd Update README.md 2020-12-26 00:49:46 -06:00
Ben Reaves
be09586239 Update README.md 2020-12-23 18:01:41 -06:00
Ben Reaves
ef238dc94d Update README.md 2020-12-23 17:59:57 -06:00
Ben Reaves
24e42c1c8a - Added Alt+Dn/Up for PgUp/PgDn on Windows 2020-12-23 15:59:36 -06:00
Ben Reaves
b9d3ddd7c0 Update README.md 2020-12-20 13:30:44 -06:00
Ben Reaves
1f70fde0e2 Merge pull request #359 from albertofem/patch-1
Add Hyper terminal to Linux
2020-12-12 15:52:27 -06:00
Alberto Fernández
07e1d44e7d Add Hyper terminal
Recently stumbled upon this tool to use the Mac keyboard under Linux and Windows. It works great!

Hyper (https://hyper.is/) is already added for Windows, not so for Linux!
2020-12-12 22:37:26 +01:00
Ben Reaves
5f83fa9ba5 - Relocated files and updated paths 2020-12-12 12:34:08 -06:00
Ben Reaves
a6b318ef87 Merge pull request #356 from rbreaves/dev
- Removed all unused files and references
2020-12-12 12:13:04 -06:00
Ben Reaves
02aa99f301 - Removed all unused files and references 2020-12-12 12:11:46 -06:00
Ben Reaves
36b4264135 Update README.md 2020-12-11 18:09:02 -06:00
Ben Reaves
4b737f61bf Updated readme 2020-12-11 18:08:21 -06:00
Ben Reaves
8e11cd0dc4 Reorganized the flow of the readme
Install instructions are now at top - links to the requirements are provided there as well. Given the GUI based setup I feel like that screenshot conveys whats going on pretty well and most people probably don't care about how the magic is working as long as it works.
2020-12-11 18:01:58 -06:00
Ben Reaves
1b0a2680f6 Merge pull request #354 from rbreaves/dev
Fixes dev tools shortcut. Closes #347
2020-12-10 21:03:40 -06:00
Ben Reaves
87d7589d7d - Updated firefox prefs on linux side 2020-12-10 21:00:42 -06:00
Ben Reaves
d499e338ab - Updated Firefox preferences hotkey for Win/Linux 2020-12-10 20:19:34 -06:00
Ben Reaves
3458246fbf - Fixed dev tools shortcuts on #347 2020-12-10 19:41:41 -06:00
Ben Reaves
75ac498c9d - Added Browser preferences hotkey Cmd+, #348 2020-12-08 12:36:13 -06:00
Ben Reaves
8723fb549b Merge pull request #351 from rbreaves/dev
- Fixed tooltips keyboard type label after suspend (Windows)
2020-12-08 00:11:30 -06:00
Ben Reaves
f952c9e569 - Fixed tooltips keyboard type label after suspend (Windows) 2020-12-08 00:09:23 -06:00
Ben Reaves
d62e42ed12 Merge pull request #350 from rbreaves/dev
- Update turns off natural copy & paste in Terminal for eOS. Closes #346
2020-12-07 22:52:54 -06:00
Ben Reaves
72d5dc7a8f - Updated kinto to turn off natural copy & paste in Terminal for elementaryOS. Closes #346 2020-12-07 22:50:07 -06:00
Ben Reaves
fc84732fd0 Merge pull request #349 from rbreaves/dev
- Added Dev Tools shortcut for browsers, including MS Edge. Closes #347
2020-12-07 22:26:39 -06:00
Ben Reaves
cf2353b5a6 - Added Dev Tools shortcut for browsers, including MS Edge. Closes #347 2020-12-07 22:23:07 -06:00
Ben Reaves
fab67177b3 Merge pull request #345 from rbreaves/dev
- Added proper commenting out of CB/IBM hotkeys, removed dup rebinds
2020-12-07 00:40:01 -06:00
Ben Reaves
4b51013380 - Added proper commenting out of CB/IBM hotkeys, removed dup rebinds 2020-12-07 00:38:30 -06:00
Ben Reaves
e7d66d36ee Merge pull request #344 from rbreaves/dev
Added a more complete remap for terminals under Windows, resolved emacs conflict
2020-12-07 00:25:07 -06:00
Ben Reaves
3045a424b9 Added a more complete remap for terminals under Windows, resolved emacs conflict 2020-12-07 00:23:10 -06:00
Ben Reaves
d56db46b67 Merge pull request #343 from rbreaves/dev
- Consecutive tab open/close on Terms in Win, ConsoleZ & WinTerm refined
2020-12-06 21:41:52 -06:00
Ben Reaves
bfe8d8f039 Merge branch 'dev' of https://github.com/rbreaves/kinto into dev 2020-12-06 18:15:05 -06:00
Ben Reaves
8ab59cc914 - Consecutive tab open/close on terms added in Windows while held, added ConsoleZ & WinTerm hotkey refinements 2020-12-06 17:55:23 -06:00
Ben Reaves
15adc5b96b Merge pull request #337 from rbreaves/dev
- Added emacs style, courtesy bryanhpchiang. Closes #336
2020-11-29 15:37:53 -06:00
Ben Reaves
dd32a6f954 - Added emacs style, courtesy bryanhpchiang. Closes #336 2020-11-29 15:24:57 -06:00
Ben Reaves
eb96ad08b8 Update README.md 2020-11-24 01:22:34 -06:00
Ben Reaves
0442bd8b6b Update README.md 2020-11-24 01:19:35 -06:00
Ben Reaves
5d37e720c7 Update README.md 2020-11-21 17:32:54 -06:00
Ben Reaves
aa53b7b14d Removed mention of Universal Keys
Will still be added at a later date
2020-11-20 21:07:40 -06:00
Ben Reaves
046bee95c3 Update README.md 2020-11-19 21:08:42 -06:00
Ben Reaves
0c53a7a114 Merge pull request #319 from rbreaves/dev
- Improved setup installer. Further closes #315
2020-11-12 16:01:24 -06:00
Ben Reaves
46b8e1ca6e - Improved setup installer. Further closes #315 2020-11-12 15:48:18 -06:00
Ben Reaves
a4f12cbdd8 Merge pull request #318 from rbreaves/dev
Overlay warning added for setup, 2 default editors added for KDE
2020-11-12 14:52:09 -06:00
Ben Reaves
fe0346ea63 - Corrected text editors to open config files, also properly linked system options for KDE. Closes #317 2020-11-12 14:49:16 -06:00
Ben Reaves
1406e3bea5 - Added 2 additional default text editors. #317 2020-11-11 23:06:12 -06:00
Ben Reaves
e0344eaa72 - Added overlay warning to setup. #315 2020-11-11 22:49:47 -06:00
Ben Reaves
4eea5c17cc Merge pull request #316 from rbreaves/dev
- Fixed installer for Mate. Closes #315
2020-11-11 22:09:30 -06:00
Ben Reaves
6101213537 - Fixed installer for Mate. Closes #315 2020-11-11 22:04:36 -06:00
Ben Reaves
c71714e0c2 Merge pull request #314 from rbreaves/dev
- xkeysnail install check, updated Windows icons & force modifier key release
2020-11-11 20:20:11 -06:00
Ben Reaves
ef6dc65a20 - Added check for xkeysnail installing properly 2020-11-11 20:18:30 -06:00
Ben Reaves
525aa91cbf - Updated Windows icons, modifiers release fix 2020-11-11 19:54:56 -06:00
Ben Reaves
b29ec9d936 Merge pull request #313 from rbreaves/dev
- Adds commandbox for Windows and fixes install issue
2020-11-11 14:42:25 -06:00
Ben Reaves
94595a3324 - Relocated limitedadmins as well for #311, will add check later 2020-11-11 14:17:40 -06:00
Ben Reaves
a9afdac847 - Relocated xkeysnail replacement to after xkeysnail install. Closes #311 2020-11-11 14:03:31 -06:00
Ben Reaves
39f65c0e2b - Added support for commandbox (coldfusion) on Windows 2020-11-11 13:02:20 -06:00
Ben Reaves
1aa23c239c Merge pull request #300 from rbreaves/dev
- Added autostart bool fix, added info on system tray setup for Gnome3
2020-10-30 02:27:28 -05:00
Ben Reaves
b6fb4ba828 - Added autostart bool fix, added info on system tray setup for Gnome3 2020-10-30 02:21:21 -05:00
Ben Reaves
9ce8612f54 Merge branch 'dev' into master 2020-10-29 21:23:36 -05:00
Ben Reaves
1419646e9c - Fixes to resolve install issues on Manjaro Gnome. 2020-10-29 21:23:11 -05:00
Ben Reaves
464ba631cb Merge branch 'dev' 2020-10-26 20:17:25 -05:00
Ben Reaves
d709a7de20 - Added the missing Right Alt key remap for Windows 2020-10-26 20:12:59 -05:00
Ben Reaves
80627807f5 Update README.md 2020-10-25 20:49:14 -05:00
Ben Reaves
cbee0f8f33 Update README.md 2020-10-25 20:46:58 -05:00
Ben Reaves
f34d9b57f6 Update README.md 2020-10-25 20:41:50 -05:00
Ben Reaves
969427bf5b - More initial setup refinements 2020-10-25 17:41:19 -05:00
Ryan Reaves
adc62fc71b - Fixed initial setup UI issue for chromebook users 2020-10-25 16:47:54 -05:00
Ryan Reaves
0baef33cf6 - Initial setup UI improvement 2020-10-25 13:47:05 -05:00
Ryan Reaves
0f1f05d379 - Added commands to ensure that any previous instance is not running during install 2020-10-25 12:43:36 -05:00
Ben Reaves
157ea9a116 - Improved uninstaller, added verbosity 2020-10-24 21:56:29 -05:00
Ben Reaves
3cc1146954 - Removed repetitive output from setup 2020-10-24 20:50:24 -05:00
Ben Reaves
d2ae2a0b1d - Restore prekinto, needed for setup 2020-10-24 20:39:44 -05:00
Ben Reaves
89701595fb - Basic cleanup of old files 2020-10-24 19:28:37 -05:00
Ben Reaves
3f573c6d61 Update README.md 2020-10-24 17:21:05 -05:00
Ryan Reaves
6a20ac5932 Merge branch 'dev' 2020-10-24 12:10:04 -05:00
Ryan Reaves
34a94306ca - Removed unneeded uninstall function for Budgie DE 2020-10-24 12:00:47 -05:00
Ben Reaves
9adf85cbde Update README.md 2020-10-24 02:26:45 -05:00
Ben Reaves
18ddc4da01 Merge branch 'dev' 2020-10-24 00:03:23 -05:00
Ben Reaves
76e6186d54 - Added fix for about versioning 2020-10-24 00:03:01 -05:00
Ben Reaves
b3984244f8 Merge branch 'dev' 2020-10-23 23:57:55 -05:00
Ben Reaves
ef385a29f3 - Added fix for about versioning 2020-10-23 23:57:24 -05:00
Ben Reaves
1e59d89494 Merge pull request #294 from rbreaves/dev
Win & Linux Sys Trays & GUI, Fast KB Switching, Simple Wizard for Linux
2020-10-23 23:15:28 -05:00
Ben Reaves
f7c02dc52f - Resolved merge conflict 2020-10-23 23:09:26 -05:00
Ben Reaves
bf3ea4e358 Update README.md 2020-10-23 23:04:06 -05:00
Ben Reaves
07be0f826f - Fixed bug that causes app to close prematurely in some cases 2020-10-23 22:54:58 -05:00
Ben Reaves
21dd05415e - Added more hotkey fixes for multiple OS's 2020-10-23 22:32:07 -05:00
Ben Reaves
ef4b7f8b01 - Added in better parsing of distro names 2020-10-23 17:02:22 -05:00
Ben Reaves
9d57c1f841 - Updated shortcuts 2020-10-23 16:58:20 -05:00
Ben Reaves
6b0801eef6 - Fixed issue on xkeysnail setup and added elementaryOS hotkeys 2020-10-23 14:50:15 -05:00
Ryan Reaves
145e2a45b0 - Updated shortcuts for fedora 2020-10-23 13:42:31 -05:00
Ben Reaves
92519e31e8 - Added package for manjaro kde 2020-10-23 13:04:19 -05:00
Ryan Reaves
cb60322517 - Added Fedora fix to allow for systemd service files to run 2020-10-23 03:23:12 -05:00
Ben Reaves
11c3195c48 - Added shortcuts for kde neon 2020-10-23 01:52:34 -05:00
Ben Reaves
5f6c498f90 - Added pillow requirement for popos, popos shortcuts 2020-10-22 23:57:50 -05:00
Ben Reaves
c7dfbff27f - Added proper bg color for gui, added hotkeys for ubuntu workspace switching 2020-10-22 22:23:22 -05:00
Ben Reaves
e67f8964a1 - Fixed budgie uninstaller and confirmed SL hotkeys 2020-10-22 19:33:03 -05:00
Ben Reaves
7db6862f4f - Removed Budgie specific iconography from error messages 2020-10-22 17:29:38 -05:00
Ryan Reaves
ff58059770 - Updated installer and removed unnecessary toggle 2020-10-21 21:23:20 -05:00
Ben Reaves
64c96e38c7 - Added stop to gui & sys tray 2020-10-21 19:18:12 -05:00
Ben Reaves
f7c0876e83 Merge branch 'dev' into alpha 2020-10-21 04:13:24 -05:00
Ben Reaves
9b5ae88fe4 - Added missing icons folder 2020-10-21 04:12:39 -05:00
Ben Reaves
87011ddb18 - Added OS level shortcuts to xkeysnail remap WIP 2020-10-21 01:20:28 -05:00
Ben Reaves
ab4551d22f Update README.md 2020-10-21 00:25:33 -05:00
Ben Reaves
fc6b590965 - Reordered Install and requirements info 2020-10-21 00:18:06 -05:00
Ben Reaves
91dd44b6ba - Removed outdated info, added new setup info.
All references to C/x11 version of kinto has been removed. New setup info and screenshot has been added.
2020-10-21 00:16:10 -05:00
Ben Reaves
d7fc4b9277 Merge pull request #271 from rbreaves/alpha
System Tray Update for Windows and Linux
2020-10-20 23:47:23 -05:00
Ben Reaves
006a61a242 - Removed unneeded files 2020-10-20 23:43:36 -05:00
Ben Reaves
bafea4cef1 Merge pull request #293 from rbreaves/gui
- Added GUI, sys tray, and simple wizard installer for Linux
2020-10-20 23:39:58 -05:00
Ryan Reaves
437a2141ff - Install changes, debug fixes, refinements
- Added setup fixes for gui

- Fixed debug issues & updated copyright

- Uninstaller update, init setup improvements, added open kinto to tray

- Fixed order of operations for args parsing

- Fixed initial radio value of keyboard type in main gui app, removed comments, fixed sys tray default for DE

- File cleanup, relocations and faster setup file

- Do not clobber initkb if it already exists
2020-10-20 23:35:42 -05:00
Ben Reaves
aff4d46abc - Force initial setup, added assets
- Added assets for gui

- Updated gui to resize better

- gui sizing improvements

- Updated UI more and changed terminal vte import

- Fixed possible issue with VTE term implementation
2020-10-20 23:35:42 -05:00
Ben Reaves
8460f869a0 - KB Assist refined & key listener added
- KB Assist refined & key listener added

- All pages & bg images added for kb assist WIP

- Keyboard assistant refined

- Connected key event listener to kb assist
2020-10-20 23:35:42 -05:00
Ben Reaves
05683dad2e - GUI & sys tray interaction issues resolved
- Added fix to kill spawned processes to GUI app

- Added proper handling of spawn from disabling sys tray app

- Improved checkTray function

- Set full path to avoid issues on About
2020-10-20 23:35:42 -05:00
Ben Reaves
1c9302cb7a - GUI and sys tray added
- merging layouts

- Major progress, unknowns completed

- Added more menu options

- Updated status placement and formatting

- Ported Tweaks from tray to GUI, added more submenus to tray

- GUI App icon improvements, desktop shortcut (linux), sys tray icon status improved

- Added debug switch to gui app, proper child termination for sys tray

- Updates to debug functionality

- Added support and about to sys tray

- Added more commands to sudoers & added version to about

- KB logic can now refresh when needed

- GUI and sys tray feature complete
2020-10-20 23:35:40 -05:00
Ben Reaves
33e39a8068 Update README.md 2020-10-13 12:23:34 -05:00
Ben Reaves
d4992fe00a - Updated installer with more info for Ubuntu/Gnome3 users 2020-10-12 22:24:28 -05:00
Ben Reaves
be0cfbce2d - Added mousepad as a default for edit config (ensoOS) 2020-10-12 21:54:13 -05:00
Ben Reaves
7574338d3a - Completed tweaks menu for Linux sys tray 2020-10-12 21:34:17 -05:00
Ben Reaves
a692377c0a - Added kb switching improvements & better AltGr detection 2020-10-12 15:41:17 -05:00
Ben Reaves
1e956287c0 - Tweaks menu updated, kb switching via tray for linux 2020-10-12 02:48:02 -05:00
Ben Reaves
ca76a46372 - Adding in cmd-space hotfixes 2020-10-11 20:15:13 -05:00
Ben Reaves
6f314d44b4 - Merged hotfix to dev 2020-10-11 20:04:11 -05:00
Ben Reaves
cce00a26a3 - merged dev 2020-10-11 19:58:21 -05:00
Ben Reaves
64b012ac65 Merge pull request #289 from rbreaves/hotfix
- Fixed uninstall issues for KDE, xfce & improved cmd-space remap. Closes #288
2020-10-11 18:20:43 -05:00
Ben Reaves
29a77f74de - Moved basic code completion to VS Code for Linux to proper location 2020-10-11 18:18:29 -05:00
Ben Reaves
0c1b83ecb7 - Added Cmd-Space fix for KDE and silenced output 2020-10-11 18:05:09 -05:00
Ben Reaves
58a2ac4f35 - Added Cmd-Space support for EnsoOS 2020-10-11 17:39:49 -05:00
Ben Reaves
5f9a6f7a31 - Fixed uninstaller for xfce & kde on restoring original shortcut keys 2020-10-11 14:02:54 -05:00
Ben Reaves
b72def92ce - Reversing App Launcher hotkey from OS to kinto.py 2020-10-11 00:57:07 -05:00
Ben Reaves
0b849d21e8 Update README.md 2020-10-10 13:53:08 -05:00
Ben Reaves
03029e22dc Update README.md 2020-10-10 13:52:04 -05:00
Ben Reaves
b87dfdab9c Update README.md 2020-10-10 01:18:52 -05:00
Ben Reaves
1bdef2f519 Update README.md 2020-10-03 23:52:44 -05:00
Ben Reaves
f4daa29040 Update README.md 2020-10-02 04:42:23 -05:00
Ben Reaves
cd9f3042bd Update README.md 2020-10-02 04:38:46 -05:00
Ben Reaves
139cff181f Merge pull request #280 from rbreaves/hotfix
- Fixes copy/paste for cmd/mintty in Win10
2020-09-29 04:09:28 -05:00
Ben Reaves
d642966ba8 - Fixes copy/paste for cmd/mintty in Win10 2020-09-29 04:06:28 -05:00
Ben Reaves
dc98778439 - Added additional copy/paste fixes for cmd and mintty under Win10 2020-09-29 04:01:28 -05:00
Ben Reaves
5d0454a22f - Fixed autodetect keyboard issue on Window with new toggle 2020-09-15 03:10:38 -05:00
Ben Reaves
2420518c60 - Fixed re-enabling defaults for Win/mac kb after switching from cb/ibm kb under Windows 2020-09-15 02:49:49 -05:00
Ben Reaves
90b27a3e85 - Fixes sys tray hover over (chrome) & adds RDP client app fix for Windows. 2020-09-09 00:01:46 -05:00
Ben Reaves
b2284aa970 - Updated Caps2 documentation 2020-08-28 12:44:58 -05:00
Ben Reaves
3ad2a7f518 - Prepping Kinto for Caps2Esc/Cmd, and Tweaks options 2020-08-28 01:12:23 -05:00
Ben Reaves
b029d1fbb3 - Added Tweaks menu option UI elements 2020-08-27 19:10:45 -05:00
Ben Reaves
2df52c8e37 - WIP Linux System Tray Update 2020-08-26 22:36:09 -05:00
Ben Reaves
fea76528cd - Merged ibm branch into alpha 2020-08-26 22:32:27 -05:00
Ben Reaves
0d8310670b - Fixed installer issues on Linux 2020-08-26 03:24:52 -05:00
Ben Reaves
e43df230f3 - Added IBM & Chromebook support to Windows 10. Added Autodetect toggle. 2020-08-25 22:19:15 -05:00
Ben Reaves
231f537b0d - Merged hotfixes 2020-08-25 04:44:35 -05:00
Ben Reaves
2a396325f2 - Merged hotfixes 2020-08-25 04:40:48 -05:00
Ben Reaves
7fe35cdec3 Merge pull request #270 from rbreaves/hotfix
- Added virtualbox fix
2020-08-25 04:35:25 -05:00
Ben Reaves
e702e461ac Merge pull request #269 from rbreaves/hotfix
- Added VS Code Quick File List traversing. #264
2020-08-25 04:22:44 -05:00
Ben Reaves
f7e3011b8c - Merged latest hotfixes into ibmmmm 2020-08-25 04:21:32 -05:00
Ben Reaves
45e637a2a6 - Added virtualbox fix 2020-08-25 04:15:07 -05:00
Ben Reaves
a4dca21c22 - Added VS Code Quick File List traversing 2020-08-25 04:10:07 -05:00
Ben Reaves
40c3d68336 - WIP Added Chromebook and IBM Model M Keyboard Support for Windows to Installer 2020-08-25 03:52:19 -05:00
Ben Reaves
9f2815d73b - Merged hotfixes and Windows IBM support 2020-08-25 03:23:50 -05:00
Ben Reaves
52f2112abd - Preliminary IBM Model M Support for Linux, partail Win setup 2020-08-25 02:05:38 -05:00
Ben Reaves
efe01c94d4 Merge pull request #268 from rbreaves/hotfix
- Additional fixes for Windows 10 user profile spaces
2020-08-24 14:31:40 -05:00
Ben Reaves
0a5c526941 - Additional fixes for Windows 10 user profile spaces 2020-08-24 14:30:50 -05:00
Ben Reaves
0c7ca8586b Merge pull request #267 from rbreaves/hotfix
- Adds Windows 10 Support for spaces in user profile, code completion fix.
2020-08-24 03:59:11 -05:00
Ben Reaves
b1c361080a - Prevents physical Ctrl+Space from remapping into Ctrl+Esc, aka start menu. #264 2020-08-24 03:57:22 -05:00
Ben Reaves
b1d5aa68f3 - Added support for user profiles with spaces under Windows 10. Closes #266 2020-08-24 03:50:16 -05:00
Ben Reaves
4dd1c26563 Merge pull request #265 from rbreaves/hotfix
- Added manual code completion for vscode and sublimetext. Closes #264
2020-08-24 01:51:11 -05:00
Ben Reaves
c38cccdb44 - Added manual code completion for vscode and sublimetext. Closes #264 2020-08-24 01:49:30 -05:00
Ben Reaves
558e86dd78 Merge pull request #258 from matteron/FixAltBackspaces
Fixing Alt + Backspace on Windows
2020-08-12 14:20:54 -05:00
Schiano, Mattia
463730fe1b Making autohotkey hotkey for ctrl + backspace only read raw keyboard input to prevent alt + backspace from triggering ctrl + backspace 2020-08-11 15:51:50 -04:00
Ben Reaves
79bcdeb89d Merge pull request #255 from rbreaves/alpha
- Added xfce system tray support
2020-08-05 01:42:22 -05:00
Ryan Reaves
a84afd5b10 - Restored ExecStop command to help end xkeysnail for some DEs (xfce) 2020-08-04 21:42:45 -05:00
Ryan Reaves
2e99c023bb - Correct xfce update for kinto system tray 2020-08-04 21:21:01 -05:00
Ben Reaves
98a1d8a0f1 - Added xfce to kinto system tray 2020-08-04 21:04:01 -05:00
Ben Reaves
72f2f93657 - Ensure Kinto is disabled on Windows during VirtualBox usage 2020-08-04 20:17:27 -05:00
Ben Reaves
9ea909af33 Merge pull request #254 from rbreaves/alpha
- Added ability to kill xkeysnail duplicate processes
2020-08-04 17:39:19 -05:00
Ben Reaves
f37d7d09ec - Updated killdups to end all orphaned processes before initiating a new process 2020-08-04 17:37:59 -05:00
Ben Reaves
d180b94bd9 - Added ability to kill xkeysnail duplicate processes 2020-08-04 17:05:48 -05:00
Ben Reaves
f5dc41589d Update README.md 2020-08-03 20:23:11 -05:00
Ben Reaves
4f562357d5 Merge pull request #253 from rbreaves/alpha
- System Tray added for Ubuntu/Gnome, Ubuntu Budgie, and Mate
2020-08-03 18:23:09 -05:00
Ben Reaves
91b58f0100 - Added system tray for gnome, ubuntu budgie, and mate 2020-08-03 18:21:44 -05:00
Ben Reaves
8795783d16 - Merged Dev into alpha 2020-08-03 16:52:31 -05:00
Ben Reaves
be0f2e67bb Merge branch 'dev' 2020-08-03 15:43:50 -05:00
Ben Reaves
2270ea5d0d - Enabled left clicks on Kinto system tray in Windows 2020-08-03 03:10:51 -05:00
Ben Reaves
73f2b44c73 - Added AppIndicator3 system tray app for Linux 2020-08-02 02:12:07 -05:00
Ben Reaves
dafaaeb2a4 - Added additional icons for system tray 2020-08-01 18:34:46 -05:00
Ben Reaves
791ab4e94a - Updated Budgie Applet to stopping xkeysnail universally 2020-08-01 03:30:40 -05:00
Ben Reaves
333c8b387b - Added config, keyboard, and region buttons to budgie applet 2020-08-01 01:01:04 -05:00
Ben Reaves
6da72654ba - Budgie Applet Completed 2020-07-31 23:30:19 -05:00
Ben Reaves
57d56261ed - WIP Updated installer to setup budgie system tray 2020-07-31 21:22:50 -05:00
Ben Reaves
83aaca7f6b - Added kinto solid black svg icon 2020-07-31 13:35:17 -05:00
Ben Reaves
394454aee2 - Added Linux system tray files WIP 2020-07-31 13:30:29 -05:00
Ben Reaves
b1d4aad618 - Added autostart flag for linux system tray apps 2020-07-30 15:42:47 -05:00
Ben Reaves
77e0a7fe19 Merge branch 'master' into alpha 2020-07-30 02:55:24 -05:00
Ben Reaves
52990b5bbe Merge branch 'dev' into alpha 2020-07-30 02:54:46 -05:00
Ben Reaves
7e69d6c03f Merge pull request #251 from rbreaves/dev
- Added missing intellij grouping for Windows 10
2020-07-30 02:54:20 -05:00
Ben Reaves
6f83fafc66 Merge branch 'master' into dev 2020-07-30 02:53:21 -05:00
Ben Reaves
eab147bd88 - Added missing intellij grouping for Windows 10 2020-07-30 02:52:54 -05:00
Ben Reaves
0c5a9775ec - Prepping for Ubuntu Budgie system tray 2020-07-30 02:41:37 -05:00
Ben Reaves
0df6d85571 Merge branch 'master' into alpha 2020-07-30 02:28:23 -05:00
Ben Reaves
03d5df306c Merge branch 'dev' into alpha 2020-07-30 02:28:16 -05:00
Ben Reaves
c4dcd3febc Update README.md 2020-07-24 01:43:30 -05:00
Ben Reaves
7c289b7d0c Update README.md 2020-07-24 01:22:21 -05:00
Ben Reaves
48ef1c596a Merge pull request #246 from rbreaves/dev
- Corrected Minimize all but current window
2020-07-22 23:09:44 -05:00
Ben Reaves
8c677e8ef0 - Corrected Minimize all but current window 2020-07-22 23:08:23 -05:00
Ben Reaves
bd8ea9c4e1 Merge pull request #245 from rbreaves/dev
- IntelliJ corrections, Minimize & Hide Additions for Windows 10
2020-07-22 22:48:16 -05:00
Ben Reaves
9df95e8b8d - Added 3 variations of hide combos for Windows 10 2020-07-22 22:46:42 -05:00
Ben Reaves
e654929d1e - Added show desktop, minimize windows and fixed syntax issues (Windows only) 2020-07-22 20:03:25 -05:00
Ben Reaves
f1b37a8cbd Merge pull request #244 from rbreaves/dev
- Adds budgie message and windows terminal hotkeys
2020-07-21 17:59:42 -05:00
Ben Reaves
f922caff78 - Added Beginning and End of line for terminals on Windows 10 more generically 2020-07-21 17:42:42 -05:00
Ben Reaves
68173fb5b6 Merge branch 'master' into dev 2020-07-21 17:39:59 -05:00
Ben Reaves
53f320e0b9 Update README.md 2020-07-16 13:03:54 -05:00
Ben Reaves
dfec4f7eb1 Update README.md 2020-07-16 11:19:29 -05:00
Ben Reaves
e8d9ae9e8e - Updated xkeysnail service to properly kill any xkeysnail instances running 2020-07-14 00:52:00 -05:00
Ben Reaves
d727489d4a - WIP adding proper closing of xkeysnail on logoff 2020-07-13 13:26:02 -05:00
Ben Reaves
619a395b65 - merged dev into alpha 2020-07-13 13:11:46 -05:00
Ben Reaves
1fb5bf2a4b - Added budgie message for user to reset cmd-tab 2020-07-12 21:10:10 -05:00
Ben Reaves
656e2fafc9 Merge pull request #241 from rbreaves/dev
- Added proper shortcut re-apply fix for mate and budgie
2020-07-12 00:47:12 -05:00
Ben Reaves
3af5eb286d - Added proper shortcut re-apply fix for mate and budgie 2020-07-12 00:45:24 -05:00
Ben Reaves
3945d5c29e Merge pull request #240 from rbreaves/dev
- Corrected kinto.py syntax and url for budgie-daemon
2020-07-12 00:19:40 -05:00
Ben Reaves
afefc5b0f1 - Corrected kinto.py syntax and url for budgie-daemon 2020-07-12 00:12:43 -05:00
Ben Reaves
b66f2c591a Merge pull request #239 from rbreaves/dev
- Added IntelliJ remaps, minor eOS fix, alias busting on which, fixed uninstaller, improved budgie support
2020-07-11 17:36:56 -05:00
Ben Reaves
e12c51f98f - Added IntelliJ remaps to Linux 2020-07-11 17:32:24 -05:00
Ben Reaves
8690436629 - Updated which to avoid alias overrides, Ubuntu Budgie Tab Switching support improvements, Uninstaller updated. 2020-07-11 15:46:50 -05:00
Ben Reaves
0eadd9b3a4 - Skip xkb modifications if install type is xkeysnail. Closes #238 2020-07-08 18:17:22 -05:00
Ben Reaves
1d6d367c39 - Added sigint Ctrl-C for VS Code & IntelliJ keymaps for Windows 2020-07-08 17:44:48 -05:00
Ben Reaves
1e46a4dc74 Merge pull request #237 from RedBearAK/patch-1
Update xkeysnail_service.sh

Looks good, thanks!
2020-07-08 11:39:16 -05:00
RedBearAK
7aeb3dc44c Update xkeysnail_service.sh
Add command to create ~/.config/autostart in case it doesn’t exist.
2020-07-07 23:27:00 -08:00
Ben Reaves
6968e08f2f Update README.md 2020-07-07 19:49:36 -05:00
Ben Reaves
40ea2b6175 Update README.md 2020-07-07 17:37:12 -05:00
Ben Reaves
367d55b04b Merge pull request #235 from rbreaves/dev
- Fixed alt/cmd swap append issue & added proper close all for browsers
2020-07-07 17:02:49 -05:00
Ben Reaves
2864ae409a - Added proper quit hotkey for browsers, except edge (windows). Closes
#232
2020-07-07 16:54:43 -05:00
Ben Reaves
e477848b59 - Removes appending argument from alt/cmd swap on official apple keyboards. Closes #233 2020-07-07 16:15:32 -05:00
Ben Reaves
26dacc7984 Merge pull request #234 from thebitstick/patch-1
Electron Apps have their own names unfortunately
2020-07-06 23:53:23 -05:00
TheBitStick
a3d8ac782a Electron Apps have their own names unfortunately
#232
2020-07-06 23:23:30 -05:00
Ben Reaves
acd0b8031e - Added proper quit hotkey for browsers (linux) 2020-07-06 20:20:16 -05:00
Ben Reaves
9543eba753 Merge pull request #231 from rbreaves/dev
- Multi-language on Right Alt key was incompleted. Closes #192
2020-07-04 17:54:16 -05:00
Ben Reaves
738aee9465 - Multi-language on Right Alt key was incompleted. Closes #192 2020-07-04 17:52:48 -05:00
Ben Reaves
dc826b8454 Merge pull request #230 from rbreaves/dev
- Added copy/paste/sigint for mintty (Windows)
2020-07-03 23:16:41 -05:00
Ben Reaves
8bd6ed242f - Added copy/paste/sigint for mintty (Windows) 2020-07-03 23:15:51 -05:00
Ben Reaves
d96e238550 Merge pull request #226 from rbreaves/dev
- Fuller description of the install type options
2020-07-01 16:04:51 -05:00
Ben Reaves
e1948dcb08 - Fuller description of the install type options 2020-07-01 16:03:34 -05:00
Ben Reaves
7e0680ff75 Update README.md 2020-06-28 12:28:37 -05:00
Ben Reaves
45d413a1ba - Added intellij keymaps to autohotkey 2020-06-22 22:22:17 -05:00
Ben Reaves
a46bb911c9 Update README.md 2020-06-21 19:42:50 -05:00
Ben Reaves
f4cad2a1e3 Update README.md 2020-06-21 19:37:24 -05:00
Ben Reaves
ba10ff6ced Update README.md 2020-06-20 02:21:52 -05:00
Ben Reaves
089fe469a5 Update README.md 2020-06-20 01:37:54 -05:00
Ben Reaves
f39323071a Merge pull request #223 from rbreaves/windows
- Multiple fixes to Windows based install
2020-06-20 01:36:23 -05:00
Ben Reaves
85d6653261 - toggle_kb.bat syntax fix 2020-06-20 01:35:11 -05:00
Ben Reaves
c7c063ada5 Update README.md 2020-06-20 01:32:01 -05:00
Ben Reaves
6a866dec54 Update README.md 2020-06-19 20:58:09 -05:00
Ben Reaves
d52d8cc34f - Windows installer fixes, perl fixes 2020-06-19 18:53:29 -07:00
Ben Reaves
70774c3431 - More updates to the Windows based installer 2020-06-19 20:18:03 -07:00
Ben Reaves
da22daf1f3 - Corrected autohotkey/choco install script, added setup for powershell 2020-06-19 19:03:06 -07:00
Ben Reaves
918f4bbf94 Update README.md 2020-06-19 20:33:17 -05:00
Ben Reaves
065dad7ce3 Update README.md 2020-06-19 16:32:00 -05:00
Ben Reaves
032c317c7e Update README.md 2020-06-19 16:30:58 -05:00
Ben Reaves
80735aefaa Update README.md 2020-06-19 12:11:01 -05:00
Ben Reaves
39bd27ec25 Update README.md 2020-06-19 11:31:13 -05:00
Ben Reaves
f57b02849a Update README.md 2020-06-19 11:30:19 -05:00
Ben Reaves
da98afe154 Update README.md 2020-06-19 11:28:22 -05:00
Ben Reaves
bbb1429c8e Merge pull request #222 from rbreaves/dev
- Updated Uninstaller to silence some output
2020-06-19 11:14:08 -05:00
Ben Reaves
9a1e66620b - Updated Uninstaller to silence some output 2020-06-19 11:04:31 -05:00
Ben Reaves
d527347bdc Merge pull request #221 from rbreaves/dev
- Sublime Text 3 keymaps corrections, completed remaps for Windows
2020-06-18 22:54:32 -05:00
Ben Reaves
efc772d687 - Sublime Text 3 keymaps corrections, completed remaps for Windows 2020-06-18 22:53:04 -05:00
Ben Reaves
7fcd94fda5 - Updated Windows uninstaller 2020-06-18 20:44:57 -05:00
Ben Reaves
5a46aad268 Merge pull request #220 from rbreaves/dev
- Corrected Suspend error, duplicate code issue
2020-06-18 20:31:29 -05:00
Ben Reaves
c66dcbca9a Update README.md 2020-06-18 19:11:04 -05:00
Ben Reaves
72bedf856d Update README.md 2020-06-18 15:10:07 -05:00
Ben Reaves
3d9d2524a2 - Corrected Suspend error, duplicate code issue 2020-06-18 11:39:48 -05:00
Ben Reaves
8848f8cbea Update README.md 2020-06-18 00:50:39 -05:00
Ben Reaves
f5318c9807 Merge pull request #219 from rbreaves/dev
- Corrected copy order and syntax issues
2020-06-17 14:35:42 -05:00
Ben Reaves
de42816a01 - Corrected copy order and syntax issues 2020-06-17 14:34:56 -05:00
102 changed files with 5301 additions and 13269 deletions

34
.github/workflows/01-ubuntu-budgie.yml vendored Normal file
View File

@@ -0,0 +1,34 @@
# This is a basic workflow to help you get started with Actions
name: CI
# Controls when the workflow will run
on:
# Triggers the workflow on push or pull request events but only for the master branch
push:
branches: [ staging ]
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
# This workflow contains a single job called "build"
build:
# The type of runner that the job will run on
runs-on: ubuntu-latest
# Steps represent a sequence of tasks that will be executed as part of the job
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- uses: actions/checkout@v3
# Runs a single command using the runners shell
- name: Run a one-line script
run: echo Hello, world!
# Runs a set of commands using the runners shell
- name: Run a multi-line script
run: |
echo Add other actions to build,
echo test, and deploy your project.

View File

@@ -1,5 +0,0 @@
partial modifier_keys
xkb_symbols "swap_lalt_lctrl" {
replace key <LALT> { [ Control_L, Control_L ] };
replace key <LCTL> { [ Alt_L, Meta_L ] };
};

View File

@@ -1,781 +0,0 @@
// Template
//
// ONE_LEVEL_CTRL
// Base
// Shift
// Alt
// Shift Alt
// Control
// Shift Control
// Super
// Shift Super
// Control Alt
// Super Control
// Super Alt
// Super Control Alt
//
// replace key <KEY> {
// type[Group1]= "ONE_LEVEL_CTRL",
// symbols[Group1]= [
// Base,
// Alt,
// Shift Alt,
// Control,
// Shift Control,
// Super,
// Shift Super,
// Control Alt,
// Super Control",
// Super Alt,
// Super Control Alt
// ],
// actions[Group1]= [
// NoAction(),
// RedirectKey(key=<KEY>,modifiers=NewMod,clearmods=Mod1),
// RedirectKey(key=<KEY>,modifiers=NewMod,clearmods=Mod1+Shift),
// RedirectKey(key=<KEY>,modifiers=NewMod,clearmods=Control),
// RedirectKey(key=<KEY>,modifiers=NewMod,clearmods=Control+Shift),
// RedirectKey(key=<KEY>,modifiers=NewMod,clearmods=Super),
// RedirectKey(key=<KEY>,modifiers=NewMod,clearmods=Super+Shift),
// RedirectKey(key=<KEY>,modifiers=NewMod,clearmods=Control+Alt),
// RedirectKey(key=<KEY>,modifiers=NewMod,clearmods=Super+Control),
// RedirectKey(key=<KEY>,modifiers=NewMod,clearmods=Super+Mod1),
// RedirectKey(key=<KEY>,modifiers=NewMod,clearmods=Control+Mod1)
// ]
// };
hidden partial modifier_keys
xkb_symbols "swapescape" {
key <CAPS> { [ Escape ] };
key <ESC> { [ Caps_Lock ] };
};
hidden partial modifier_keys
xkb_symbols "caps_escape" {
key <CAPS> { [ Escape ] };
};
hidden partial modifier_keys
xkb_symbols "caps_shiftlock" {
replace key <CAPS> { [ Shift_Lock ] };
modifier_map Shift { Shift_Lock };
};
hidden partial modifier_keys
xkb_symbols "caps_none" {
key <CAPS> { [ VoidSymbol ] };
};
default partial xkb_symbols "mac_levelssym" {
// // Minimize window Cmd + H = Alt + F9
// // 2 caveats
// // 1 Cmd + H may not pass through on VMs
// // 2 may cause conflicts with apps
// replace key <AC06> {
// type[Group1]= "ONE_LEVEL_CTRL",
// symbols[Group1]= [
// h,
// H,
// h,
// H,
// h
// ],
// actions[Group1]= [
// NoAction(),
// NoAction(),
// NoAction(),
// NoAction(),
// RedirectKey(key=<AC06>,modifiers=Super,clearmods=Control)
// ]
// };
// Maximize Window Ctrl + Cmd + F = Alt+F10
// Also maps Option + Cmd + F to Control+H for Replace - Sublime
// AD03=e,E
// AC01=a,A
// Ctrl + A - Beginning of Line
replace key <AC01> {
type[Group1]= "ONE_LEVEL_SUPER",
symbols[Group1]= [
// Base
a,
// Shift
A,
// Super
NoSymbol,
// Shift Super
NoSymbol
],
actions[Group1]= [
NoAction(),
NoAction(),
RedirectKey(key=<HOME>,clearmods=Super),
RedirectKey(key=<HOME>,clearmods=Super)
]
};
// Ctrl + E - End of Line
replace key <AD03> {
type[Group1]= "ONE_LEVEL_SUPER",
symbols[Group1]= [
// Base
e,
// Shift
E,
// Super
NoSymbol,
// Shift Super
NoSymbol
],
actions[Group1]= [
NoAction(),
NoAction(),
RedirectKey(key=<END>,clearmods=Super),
RedirectKey(key=<END>,clearmods=Super)
]
};
replace key <AC04> {
type[Group1]= "ONE_LEVEL_CTRL",
symbols[Group1]= [
// Base
f,
// Shift
F,
// Alt
f,
// Shift Alt
F,
// Control
f,
// Shift Control
F,
// Super
f,
// Shift Super
F,
// Control Alt
h
// Super Control
// ,F10 // Default maximize
// // Nothing // KDE maximize
// Super Alt
// Super Control Alt
],
actions[Group1]= [
// Base
NoAction(),
// Shift
NoAction(),
// Alt
NoAction(),
// Shift Alt
NoAction(),
// Control
NoAction(),
// Shift Control
NoAction(),
// Super
NoAction(),
// Shift Super
NoAction(),
// Control Alt
RedirectKey(key=<AC06>,clearmods=Mod1)
// Super Control - Fullscreen
// ,RedirectKey(key=<FK10>,modifiers=Mod1,clearmods=Super+Control) // Default maximize
// // Nothing // KDE maximize
// Super Alt
// Super Control Alt
]
};
// Close App Cmd + Q = Alt + F4
replace key <AD01> {
type[Group1]= "ONE_LEVEL_CTRL",
symbols[Group1]= [
// Base
q,
// Shift
Q,
// Alt
q,
// Shift Alt
Q,
// Control
F4
],
actions[Group1]= [
// Base
NoAction(),
// Shift
NoAction(),
// Alt
NoAction(),
// Shift Alt
NoAction(),
// Control
RedirectKey(key=<FK04>,modifiers=Mod1,clearmods=Control)
]
};
// Show Desktop Cmd + F3 = Super + D
replace key <FK03> {
type[Group1]= "ONE_LEVEL_CTRL",
symbols[Group1]= [
// Base
F3,
// Shift
F3,
// Alt
F3,
// Shift Alt
F3,
// Control
d
],
actions[Group1]= [
NoAction(),
NoAction(),
NoAction(),
NoAction(),
RedirectKey(key=<AC03>,modifiers=Super,clearmods=Control)
]
};
// Fix the G key for Sublime Text
replace key <AC05> {
type[Group1]= "ONE_LEVEL_CTRL",
symbols[Group1]= [
// Base
g,
// Shift
G,
// Alt
g,
// Shift Alt
G,
// Control
g,
// Shift Control
G,
// Super
NoSymbol,
// Shift Super
NoSymbol,
// Control Alt
g,
// Super Control
g,
// Super Alt
g,
// Super Control Alt
g
],
actions[Group1]= [
NoAction(),
NoAction(),
// Pass G Normally
RedirectKey(key=<AC05>),
RedirectKey(key=<AC05>),
// Find Next
RedirectKey(key=<FK03>,clearmods=Control),
// Find Previous
RedirectKey(key=<FK03>,clearmods=Control),
// Sublime Goto Line
RedirectKey(key=<AC05>,modifiers=Control,clearmods=Super),
NoAction(),
// Sublime Quick Find
RedirectKey(key=<FK03>,clearmods=Mod1),
// Sublime Select All Matches
RedirectKey(key=<FK03>,modifiers=Mod1,clearmods=Super+Control),
NoAction(),
NoAction()
]
};
// LEFT to Begin Line or Beginning of word
replace key <LEFT> {
type[Group1]= "ONE_LEVEL_CTRL",
symbols[Group1]= [
// Base
Left,
// Shift
Left,
// Alt
Left,
// Shift Alt
Left,
// Control
NoSymbol,
// Shift Control
NoSymbol,
// Super
Left
],
actions[Group1]= [
// Base
NoAction(),
// Shift
NoAction(),
// Alt - Wordwise
RedirectKey(key=<LEFT>,mods=Control,clearmods=Mod1),
// Shift Alt
RedirectKey(key=<LEFT>,mods=Control,clearmods=Mod1),
// Control
RedirectKey(key=<HOME>,clearmods=Control),
// Shift Control
RedirectKey(key=<HOME>,clearmods=Control),
// Super - Change workspace
NoAction()
]
};
// Right to End of Line or end of word
replace key <RGHT> {
type[Group1]= "ONE_LEVEL_CTRL",
symbols[Group1]= [
// Base
Right,
// Shift
Right,
// Alt
Right,
// Shift Alt
Right,
// Control
NoSymbol,
// Shift Control
NoSymbol,
// Super
Right
],
actions[Group1]= [
// Base
NoAction(),
// Shift
NoAction(),
// Alt - Wordwise
RedirectKey(key=<RGHT>,mods=Control,clearmods=Mod1),
// Shift Alt
RedirectKey(key=<RGHT>,mods=Control,clearmods=Mod1),
// Control
RedirectKey(key=<END>,clearmods=Control),
// Shift Control
RedirectKey(key=<END>,clearmods=Control),
// Super - Change workspace
NoAction()
]
};
//Up to Mac Home
replace key <UP> {
type[Group1]= "ONE_LEVEL_CTRL",
symbols[Group1]= [
// Base
Up,
// Shift
Up,
// Alt
Up,
// Shift Alt
Up,
// Control
NoSymbol,
// Shift Control
NoSymbol,
// Super
Up,
// Shift Super
Up
],
actions[Group1]= [
// Base
NoAction(),
// Shift
NoAction(),
// Alt - Wordwise
RedirectKey(key=<UP>,clearmods=Mod1),
// Shift Alt
// RedirectKey(key=<UP>), // Chromebook multicursor
RedirectKey(key=<UP>,clearmods=Mod1), // Default multicursor
// Control
RedirectKey(key=<HOME>),
// Shift Control
RedirectKey(key=<HOME>),
// Super - Wordwise - Sublime?
RedirectKey(key=<PGUP>,clearmods=Super),
// Shift Super
RedirectKey(key=<UP>,modifiers=Mod1,clearmods=Super)
]
};
// Down to Mac End
replace key <DOWN> {
type[Group1]= "ONE_LEVEL_CTRL",
symbols[Group1]= [
// Base
Down,
// Shift
Down,
// Alt
Down,
// Shift Alt
Down,
// Control
NoSymbol,
// Shift Control
NoSymbol,
// Super
Down,
// Shift Super
Down
],
actions[Group1]= [
// Base
NoAction(),
// Shift
NoAction(),
// Alt - Wordwise
RedirectKey(key=<DOWN>,clearmods=Mod1),
// Shift Alt
RedirectKey(key=<DOWN>,clearmods=Mod1),
// Control
RedirectKey(key=<END>),
// Shift Control
RedirectKey(key=<END>),
// Super - Wordwise - Sublime?
RedirectKey(key=<PGDN>,clearmods=Super),
// Shift Super
RedirectKey(key=<DOWN>,modifiers=Mod1,clearmods=Super)
]
};
// Alt BKSP to DELETE
replace key <BKSP> {
type[Group1]= "ONE_LEVEL_CTRL",
symbols[Group1]= [
BackSpace,
BackSpace,
BackSpace
],
actions[Group1]= [
NoAction(),
NoAction(),
RedirectKey(key=<DELE>,clearmods=Mod1)
]
};
// // Full Print Screen
// // GalliumOS
// replace key <AE03> {
// type[Group1]= "ONE_LEVEL_CTRL",
// symbols[Group1]= [ 3, 3, 3, F5 ],
// actions[Group1]= [ NoAction(), NoAction(), NoAction(), RedirectKey(key=<FK05>,clearmods=Shift) ]
// };
// // Region Print Screen
// // GalliumOS
// replace key <AE04> {
// type[Group1]= "ONE_LEVEL_CTRL",
// symbols[Group1]= [ 4, 4, 4, F5 ],
// actions[Group1]= [ NoAction(), NoAction(), NoAction(), RedirectKey(key=<FK05>) ]
// };
// // Full Print Screen
// // Standard Ubuntu
// replace key <AE03> {
// type[Group1]= "ONE_LEVEL_CTRL",
// symbols[Group1]= [ 3, 3, 3, F5 ],
// actions[Group1]= [ NoAction(), NoAction(), RedirectKey(key=<PRSC>,clearmods=Shift+Control) ]
// };
// // Region Print Screen
// // Standard Ubuntu
// replace key <AE04> {
// type[Group1]= "ONE_LEVEL_CTRL",
// symbols[Group1]= [ 4, 4, 4, F5 ],
// actions[Group1]= [ NoAction(), NoAction(), RedirectKey(key=<PRSC>,clearmods=Control) ]
// };
};
partial xkb_symbols "mac_appcycle_chromebook" {
// Cycle App and In App Tab Switching
replace key <TAB> {
type[Group1]= "ONE_LEVEL_CTRL",
symbols[Group1]= [
Tab,
Tab,
Tab,
Tab,
backslash,
backslash,
NoSymbol,
NoSymbol
],
actions[Group1]= [
NoAction(),
NoAction(),
// Alt
Redirect(key=<TAB>,mods=Control,clearmods=Mod1),
// Alt + Shift
Redirect(key=<TAB>,mods=Control,clearmods=Mod1),
// Control
Redirect(key=<BKSL>),
// Control+Shift
Redirect(key=<BKSL>),
// Super
NoAction(),
// Super + Shift
NoAction()
]
};
};
partial xkb_symbols "mac_appcycle" {
// Cycle App and In App Tab Switching
key <FK13> { [ F13 ] };
key <FK14> { [ F14 ] };
replace key <TAB> {
type[Group1]= "ONE_LEVEL_CMD",
symbols[Group1]= [
Tab,
Tab,
F14,
F13,
NoSymbol,
NoSymbol
],
actions[Group1]= [
// Base
NoAction(),
// Shift
NoAction(),
// Control + Shift
Redirect(key=<FK14>),
// Control
Redirect(key=<FK13>),
// Super
Redirect(key=<TAB>,mods=Control,clearmods=Mod4+Super),
// Super + Shift
Redirect(key=<TAB>,mods=Control,clearmods=Mod4+Super)
]
};
};
partial xkb_symbols "mac_browsers_chromebook" {
// Cycle App and In App Tab Switching
replace key <TAB> {
type[Group1]= "ONE_LEVEL_CTRL",
symbols[Group1]= [
Tab,
Tab,
NoSymbol,
NoSymbol,
backslash,
backslash,
NoSymbol,
NoSymbol
],
actions[Group1]= [
NoAction(),
NoAction(),
// Alt
Redirect(key=<PGDN>,mods=Control,clearmods=Mod1),
// Alt + Shift
Redirect(key=<PGUP>,mods=Control,clearmods=Mod1+Shift),
// Control
Redirect(key=<BKSL>),
// Control+Shift
Redirect(key=<BKSL>),
// Super
NoAction(),
// Super + Shift
NoAction()
]
};
//Up to Mac Home
replace key <UP> {
type[Group1]= "ONE_LEVEL_CTRL",
symbols[Group1]= [
Up,
Up,
Up,
Up,
NoSymbol,
NoSymbol,
Up
],
actions[Group1]= [
NoAction(),
NoAction(),
// Wordwise
RedirectKey(key=<UP>,clearmods=Mod1),
RedirectKey(key=<UP>,clearmods=Mod1),
RedirectKey(key=<HOME>),
RedirectKey(key=<HOME>),
// Wordwise - Sublime?
RedirectKey(key=<PGUP>,clearmods=Super),
RedirectKey(key=<UP>,modifiers=Mod1,clearmods=Super)
]
};
// Down to Mac End
replace key <DOWN> {
type[Group1]= "ONE_LEVEL_CTRL",
symbols[Group1]= [
Down,
Down,
Down,
Down,
NoSymbol,
NoSymbol,
Down
],
actions[Group1]= [
NoAction(),
NoAction(),
// Wordwise
RedirectKey(key=<DOWN>,clearmods=Mod1),
RedirectKey(key=<DOWN>,clearmods=Mod1),
RedirectKey(key=<END>),
RedirectKey(key=<END>),
// Wordwise - Sublime?
RedirectKey(key=<PGDN>,clearmods=Super),
RedirectKey(key=<DOWN>,modifiers=Mod1,clearmods=Super)
]
};
// Alt BKSP to DELETE
replace key <BKSP> {
type[Group1]= "ONE_LEVEL_CTRL",
symbols[Group1]= [
BackSpace,
BackSpace,
BackSpace
],
actions[Group1]= [
NoAction(),
NoAction(),
RedirectKey(key=<DELE>,clearmods=Mod1)
]
};
};
partial xkb_symbols "mac_browsers" {
// Cycle App and In App Tab Switching
key <FK13> { [ F13 ] };
key <FK14> { [ F14 ] };
replace key <TAB> {
type[Group1]= "ONE_LEVEL_CMD",
symbols[Group1]= [
Tab,
Tab,
F14,
F13,
NoSymbol,
NoSymbol
],
actions[Group1]= [
NoAction(),
NoAction(),
Redirect(key=<FK14>),
Redirect(key=<FK13>),
Redirect(key=<PGDN>,mods=Control,clearmods=Mod4+Super),
Redirect(key=<PGUP>,mods=Control,clearmods=Mod4+Super+Shift)
]
};
//Up to Mac Home
replace key <UP> {
type[Group1]= "ONE_LEVEL_CTRL",
symbols[Group1]= [
Up,
Up,
Up,
Up,
NoSymbol,
NoSymbol,
Up
],
actions[Group1]= [
NoAction(),
NoAction(),
// Wordwise
RedirectKey(key=<UP>,clearmods=Mod1),
RedirectKey(key=<UP>,clearmods=Mod1),
RedirectKey(key=<HOME>),
RedirectKey(key=<HOME>),
// Wordwise - Sublime?
RedirectKey(key=<PGUP>,clearmods=Super),
RedirectKey(key=<UP>,modifiers=Mod1,clearmods=Super)
]
};
// Down to Mac End
replace key <DOWN> {
type[Group1]= "ONE_LEVEL_CTRL",
symbols[Group1]= [
Down,
Down,
Down,
Down,
NoSymbol,
NoSymbol,
Down
],
actions[Group1]= [
NoAction(),
NoAction(),
// Wordwise
RedirectKey(key=<DOWN>,clearmods=Mod1),
RedirectKey(key=<DOWN>,clearmods=Mod1),
RedirectKey(key=<END>),
RedirectKey(key=<END>),
// Wordwise - Sublime?
RedirectKey(key=<PGDN>,clearmods=Super),
RedirectKey(key=<DOWN>,modifiers=Mod1,clearmods=Super)
]
};
// Alt BKSP to DELETE
replace key <BKSP> {
type[Group1]= "ONE_LEVEL_CTRL",
symbols[Group1]= [
BackSpace,
BackSpace,
BackSpace
],
actions[Group1]= [
NoAction(),
NoAction(),
RedirectKey(key=<DELE>,clearmods=Mod1)
]
};
};
partial xkb_symbols "mac_chrome" {
// Back Button
replace key <LEFT> {
type[Group1]= "ONE_LEVEL_CTRL",
symbols[Group1]= [
Left,
Left,
NoSymbol,
NoSymbol,
Left
],
actions[Group1]= [
// Base
NoAction(),
// Shift
NoAction(),
// Alt
RedirectKey(key=<FK18>),
// Alt
RedirectKey(key=<FK18>),
// Control
RedirectKey(key=<LEFT>,modifiers=Mod1,clearmods=Control)
]
};
// Forwards Button
replace key <RGHT> {
type[Group1]= "ONE_LEVEL_CTRL",
symbols[Group1]= [
// Base
Right,
// Shift
Right,
// Alt
NoSymbol,
// Shift Alt
NoSymbol,
// Control
Right
],
actions[Group1]= [
// Base
NoAction(),
// Shift
NoAction(),
// Alt
RedirectKey(key=<FK18>),
// Shift Alt
RedirectKey(key=<FK18>),
// Control
RedirectKey(key=<RGHT>,modifiers=Mod1,clearmods=Control)
]
};
};

View File

@@ -1,210 +0,0 @@
default partial xkb_symbols "mac_apple" {
key <LWIN> {
repeat= no,
type= "ONE_LEVEL",
symbols[Group1]= [ Control_L ],
actions[group1]=[ SetMods(modifiers=Control+Shift) ]
};
key <RWIN> {
repeat= no,
type= "ONE_LEVEL",
symbols[Group1]= [ Control_R ],
actions[group1]=[ SetMods(modifiers=Control+Shift) ]
};
};
partial xkb_symbols "mac_win" {
key <LALT> {
repeat= no,
type= "ONE_LEVEL",
symbols[Group1]= [ Hyper_L ],
actions[group1]=[ SetMods(modifiers=Shift+Control) ]
};
key <RALT> {
repeat= no,
type= "ONE_LEVEL",
symbols[Group1]= [ Hyper_R ],
actions[group1]=[ SetMods(modifiers=Shift+Control) ]
};
};
partial xkb_symbols "mac_global" {
// // Minimize Window Cmd + H = Alt+F9
// replace key <AC06> {
// type[Group1]= "ONE_LEVEL_CTRL",
// symbols[Group1]= [
// h,
// H,
// H
// ],
// actions[Group1]= [
// NoAction(),
// NoAction(),
// RedirectKey(key=<AC06>,modifiers=Super,clearmods=Control+Shift)
// ]
// };
//
// Some sort of glitch occurs on shifting F while this segment is active
// it is like the Control key is being held down when it isn't.
//
// // Maximize Window Ctrl + Cmd + F = Alt+F10
// replace key <AC04> {
// type[Group1]= "ONE_LEVEL_CTRL",
// symbols[Group1]= [
// f,
// F,
// F
// ],
// actions[Group1]= [
// // Base
// NoAction(),
// // Shift
// NoAction(),
// // Ctrl + Shift
// RedirectKey(key=<FK10>,modifiers=Mod1,clearmods=Control+Shift)
// ]
// };
// Close App Cmd + Q = Alt + F4
replace key <AD01> {
type[Group1]= "ONE_LEVEL_CTRL",
symbols[Group1]= [
q,
Q,
F4
],
actions[Group1]= [
NoAction(),
NoAction(),
RedirectKey(key=<FK04>,modifiers=Mod1,clearmods=Control+Shift)
]
};
// Show Desktop Cmd + F3 = Super + D
replace key <FK03> {
type[Group1]= "ONE_LEVEL_CTRL",
symbols[Group1]= [
F3,
F3,
D
],
actions[Group1]= [
NoAction(),
NoAction(),
RedirectKey(key=<AC03>,modifiers=Super,clearmods=Control+Shift)
]
};
// Cycle App and In App Tab Switching
key <FK13> { [ F13 ] };
key <FK14> { [ F14 ] };
replace key <TAB> {
type[Group1]= "ONE_LEVEL_CMD",
symbols[Group1]= [
Tab,
Tab,
// F13 // Default cmdtab
// F13 // KDE cmdtab
// Right // Elementary ecmdtab
],
actions[Group1]= [
NoAction(),
NoAction(),
// Redirect(key=<FK13>) // Default cmdtab
// Redirect(key=<FK13>,clearmods=Shift) // KDE cmdtab
// Redirect(key=<RGHT>,mods=Control+Shift,clearmods=Mod4+Super) // Elementary cmdtab
]
};
// Page Up
replace key <UP> {
type[Group1]= "ONE_LEVEL_CTRL",
symbols[Group1]= [
Up,
Up,
NoSymbol
],
actions[Group1]= [
NoAction(),
NoAction(),
RedirectKey(key=<PGUP>,clearmods=Shift+Control)
]
};
// Page Down
replace key <DOWN> {
type[Group1]= "ONE_LEVEL_CTRL",
symbols[Group1]= [
Down,
Down,
NoSymbol
],
actions[Group1]= [
NoAction(),
NoAction(),
RedirectKey(key=<PGDN>,clearmods=Shift+Control)
]
};
// HOME
replace key <LEFT> {
type[Group1]= "ONE_LEVEL_CMD",
symbols[Group1]= [
Left,
Left,
NoSymbol,
Left
],
actions[Group1]= [
NoAction(),
NoAction(),
RedirectKey(key=<HOME>,clearmods=Shift+Control),
RedirectKey(key=<LEFT>,mods=Super,clearmods=Control)
]
};
// END
replace key <RGHT> {
type[Group1]= "ONE_LEVEL_CMD",
symbols[Group1]= [
Right,
Right,
NoSymbol,
Right
],
actions[Group1]= [
NoAction(),
NoAction(),
RedirectKey(key=<END>,clearmods=Shift+Control),
RedirectKey(key=<RGHT>,mods=Super,clearmods=Control)
]
};
// Full Print Screen
// Standard Ubuntu
replace key <AE03> {
type[Group1]= "ONE_LEVEL_CMD",
symbols[Group1]= [
3,
numbersign,
NoSymbol
],
actions[Group1]= [
NoAction(),
NoAction(),
RedirectKey(key=<PRSC>,clearmods=Shift+Control)
]
};
// Region Print Screen
// Standard Ubuntu
replace key <AE04> {
type[Group1]= "ONE_LEVEL_CMD",
symbols[Group1]= [
4,
dollar,
NoSymbol
],
actions[Group1]= [
NoAction(),
NoAction(),
RedirectKey(key=<PRSC>,clearmods=Control)
]
};
};

View File

@@ -1,100 +0,0 @@
default partial xkb_symbols "mac_levelssym" {
key <LALT> {
repeat= no,
type= "ONE_LEVEL",
symbols[Group1]= [ Hyper_L ],
actions[group1]=[ SetMods(modifiers=Shift+Control) ]
};
key <RALT> {
repeat= no,
type= "ONE_LEVEL",
symbols[Group1]= [ Hyper_R ],
actions[group1]=[ SetMods(modifiers=Shift+Control) ]
};
// Page Up
replace key <UP> {
type[Group1]= "ONE_LEVEL_CTRL",
symbols[Group1]= [
Up,
Up,
NoSymbol
],
actions[Group1]= [
NoAction(),
NoAction(),
RedirectKey(key=<PGUP>,clearmods=Shift+Control)
]
};
// Page Down
replace key <DOWN> {
type[Group1]= "ONE_LEVEL_CTRL",
symbols[Group1]= [
Down,
Down,
NoSymbol
],
actions[Group1]= [
NoAction(),
NoAction(),
RedirectKey(key=<PGDN>,clearmods=Shift+Control)
]
};
// HOME
replace key <LEFT> {
type[Group1]= "ONE_LEVEL_CTRL",
symbols[Group1]= [
Left,
Left,
NoSymbol
],
actions[Group1]= [
NoAction(),
NoAction(),
RedirectKey(key=<HOME>,clearmods=Shift+Control)
]
};
// END
replace key <RGHT> {
type[Group1]= "ONE_LEVEL_CTRL",
symbols[Group1]= [
Right,
Right,
NoSymbol
],
actions[Group1]= [
NoAction(),
NoAction(),
RedirectKey(key=<END>,clearmods=Shift+Control)
]
};
// Full Print Screen
// GalliumOS
replace key <AE03> {
type[Group1]= "ONE_LEVEL_CTRL",
symbols[Group1]= [
3,
numbersign,
F5
],
actions[Group1]= [
NoAction(),
NoAction(),
RedirectKey(key=<FK05>,clearmods=Shift)
]
};
// Region Print Screen
// GalliumOS
replace key <AE04> {
type[Group1]= "ONE_LEVEL_CTRL",
symbols[Group1]= [
4,
dollar,
F5
],
actions[Group1]= [
NoAction(),
NoAction(),
RedirectKey(key=<FK05>)
]
};
};

View File

@@ -1,53 +0,0 @@
default partial xkb_types "addmac_levels" {
Virtual_modifiers Super;
type "ONE_LEVEL_CTRL" {
modifiers = Shift+Mod1+Super+Control;
map[Shift] = Level2;
map[Mod1] = Level3;
map[Shift+Mod1] = Level4;
map[Control] = Level5;
map[Shift+Control] = Level6;
map[Super] = Level7;
map[Shift+Super] = Level8;
map[Mod1+Control] = 9;
map[Super+Control] = 10;
map[Super+Mod1] = 11;
map[Super+Mod1+Control] = 12;
level_name[Level1] = "Base";
level_name[Level2] = "Shift";
level_name[Level3] = "Alt";
level_name[Level4] = "Shift Alt";
level_name[Level5] = "Control";
level_name[Level6] = "Shift Control";
level_name[Level7] = "Super";
level_name[Level8] = "Shift Super";
level_name[9] = "Control Alt";
level_name[10] = "Super Control";
level_name[11] = "Super Alt";
level_name[12] = "Super Control Alt";
};
type "ONE_LEVEL_CMD" {
modifiers = Shift+Control+Super;
map[Shift] = Level2;
map[Shift+Control] = Level3;
map[Control] = Level4;
map[Super] = Level5;
map[Shift+Super] = Level6;
level_name[Level1] = "Base";
level_name[Level2] = "Shift";
level_name[Level3] = "Control Shift";
level_name[Level4] = "Control";
level_name[Level5] = "Super";
level_name[Level6] = "Super Shift";
};
type "ONE_LEVEL_SUPER" {
modifiers = Shift+Super;
map[Shift] = Level2;
map[Super] = Level3;
map[Shift+Super] = Level4;
level_name[Level1] = "Base";
level_name[Level2] = "Shift";
level_name[Level3] = "Super";
level_name[Level4] = "Super Shift";
};
};

View File

@@ -1,53 +0,0 @@
default partial xkb_types "addmac_levels" {
Virtual_modifiers Super;
type "ONE_LEVEL_CTRL" {
modifiers = Shift+Mod1+Super+Control;
map[Shift] = Level2;
map[Shift+Control] = Level3;
// map[Mod1] = Level4;
map[Shift+Mod1] = Level5;
map[Control] = Level6;
map[Super] = Level7;
map[Shift+Super] = Level8;
map[Mod1+Control] = 9;
map[Super+Control] = 10;
map[Super+Mod1] = 11;
map[Super+Mod1+Control] = 12;
level_name[Level1] = "Base";
level_name[Level2] = "Shift";
level_name[Level3] = "Shift Control";
// level_name[Level4] = "Alt";
level_name[Level5] = "Shift Alt";
level_name[Level6] = "Control";
level_name[Level7] = "Super";
level_name[Level8] = "Shift Super";
level_name[9] = "Control Alt";
level_name[10] = "Super Control";
level_name[11] = "Super Alt";
level_name[12] = "Super Control Alt";
};
type "ONE_LEVEL_CMD" {
modifiers = Shift+Control+Super;
map[Shift] = Level2;
map[Shift+Control] = Level3;
map[Control] = Level4;
map[Super] = Level5;
map[Shift+Super] = Level6;
level_name[Level1] = "Base";
level_name[Level2] = "Shift";
level_name[Level3] = "Control Shift";
level_name[Level4] = "Control";
level_name[Level5] = "Super";
level_name[Level6] = "Super Shift";
};
type "ONE_LEVEL_SUPER" {
modifiers = Shift+Super;
map[Shift] = Level2;
map[Super] = Level3;
map[Shift+Super] = Level4;
level_name[Level1] = "Base";
level_name[Level2] = "Shift";
level_name[Level3] = "Super";
level_name[Level4] = "Super Shift";
};
};

BIN
Kinto.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 22 KiB

565
README.md
View File

@@ -1,25 +1,221 @@
# Kinto
# Kinto.sh
![kinto-color-132](https://user-images.githubusercontent.com/10969616/84361571-7d5bd780-ab91-11ea-81bc-4d3a2ca51c4e.png)
![kinto-color-132](https://user-images.githubusercontent.com/10969616/94909977-9d2d4900-0469-11eb-8710-986289fe7240.gif)
[![GitHub release](https://img.shields.io/github/release/rbreaves/kinto.svg)](https://github.com/rbreaves/kinto/releases/latest)
\- Type in Linux & Windows like it's a Mac. \-
\- Mac-style shortcut keys for Linux & Windows. \-
Seamless copy and paste with all apps and terminals. The zero effort solution.
v1.2 Release - Kinto now includes a system tray and simple wizard to setup the install with minimal effort.
Kinto is powered by [xkeysnail](https://github.com/mooz/xkeysnail) for Linux & by [Autohotkey](https://github.com/Lexikos/AutoHotkey_L) for Windows 10.
Note: If you plan to remote into Linux via VNC, xRDP, Synergy or other remote desktop solutions then remove the current release & try an earlier [v1.0.7-3](https://github.com/rbreaves/kinto/releases/tag/1.0.7-3) release. It uses xkb so it'll work with virtual xinput devices. Some v1.1-x releases may offer both, but all v1.2.x releases ended support for xkb. I do plan to bring offical support back for virtual input devices.
Additionally VMware, Virtualbox, KVM and other virtualization technologies work best with the current release - so *this note only applies to remote desktop into Linux* - not virtualization.
### [Table of Contents ](#Table-of-Contents)
## Donations
If you like or appreciate this project then please consider donating.
|**Wishlists**|[Amazon](https://smile.amazon.com/hz/wishlist/ls/3EVXR21VFKD9Z?ref_=wl_share)|[Adafruit](https://www.adafruit.com/wishlists/515932)|[eBay](https://www.ebay.com/mye/myebay/WatchList?custom_list_id=636668138019)|
|---|---|---|---|
I have received some really great letters with donations & email. I've also posted some of them with redacted first names to kinto.sh.
Also if you would like to send me a keyboard directly then please reach out to me over [twitter](https://twitter.com/gbit86) and send me a DM.
## How to install (Linux)
Video Tutorial: [Install Kinto.sh for Linux in less than a minute](https://www.youtube.com/watch?v=kd4al45XD1g)
[Linux Requirements](#What-does-Kinto-require)
<img src="https://user-images.githubusercontent.com/10969616/97070698-179c4500-15a0-11eb-8064-c03aa7f4d4a5.png" width="75%">
### Quick Install Method
Paste the following into your Terminal
```
/bin/bash -c "$(wget -qO- https://raw.githubusercontent.com/rbreaves/kinto/HEAD/install/linux.sh || curl -fsSL https://raw.githubusercontent.com/rbreaves/kinto/HEAD/install/linux.sh)"
```
Uninstall
```
/bin/bash <( wget -qO- https://raw.githubusercontent.com/rbreaves/kinto/HEAD/install/linux.sh || curl -fsSL https://raw.githubusercontent.com/rbreaves/kinto/HEAD/install/linux.sh ) -r
```
### Old Install Method
```
git clone https://github.com/rbreaves/kinto.git
cd kinto
sudo apt update
sudo apt install python3
./setup.py
```
**Troubleshoot**
If the wizard does not appear then either type in "kinto.sh" in your application overview search bar or run this following command.
```
~/.config/kinto/gui/kinto-gui.py
```
**Issues with Numpad?**
Try toggling numlock on & off (clear key on official mac keyboards). If it still does not work then restart the Kinto service and try toggling the numlock/clear key again, it will likely work after that. #369
**Uninstall Kinto**
```
./setup.py -r
```
**Other tips**
If you want a global menu app similar to what mac users have then I strongly recommend Ubuntu Budgie as it has the Vala Appmenu built in and ready for activation. Short of that Vala-AppMenu can be installed in various distros, mileage will vary. If you try to activate it in the latest 20.xx releases with XFCE then you may need to run the following commands.
```
sudo apt install xfce4-appmenu-plugin vala-panel-appmenu-common appmenu-gtk2-module appmenu-gtk3-module appmenu-gtk-module-common
xfconf-query -c xsettings -p /Gtk/Modules -n -t string -s "appmenu-gtk-module"
```
**Fractional HiDPI Scaling for Gnome/Budgie w/ x11**
https://github.com/rbreaves/betterScale
Use this with autorandr to save your settings as a profile that will auto re-apply when needed.
## How to Install (Windows)
Video Tutorial: [How to Install Kinto.sh on Windows 10](https://youtu.be/sRk8A8krz40)
[Windows 10 Requirements](#Kinto-for-Windows-10-Requirements)
### Quick install
Open Powershell as Administrator and copy and paste the following. This will download & extract Kinto, install chocolatey, python3 and then install Kinto.
**⚠ NOTE: Please inspect https://raw.githubusercontent.com/rbreaves/kinto/master/install/windows.ps1 and https://chocolatey.org/install.ps1 before running scripts directly. More information about running powershell scripts in this context can be found [here](https://chocolatey.org/install).**
```
Set-ExecutionPolicy Bypass -Scope Process -Force
iwr https://raw.githubusercontent.com/rbreaves/kinto/master/install/windows.ps1 -UseBasicParsing | iex
```
Update system tray to show Kinto icon at all times (optional)
```
cmd /c "explorer shell:::{05d7b0f4-2121-4eff-bf6b-ed3f69b894d9}"
```
### Old method
1. Open Powershell (Right click and Run as Administrator)
2. clone this repo
```
git clone https://github.com/rbreaves/kinto.git
cd kinto
```
3. Install - Select keyboard type
```
py setup.py
```
4. How to make Kinto stay visible in system tray (optional)
<img src="https://user-images.githubusercontent.com/10969616/85195077-2f338c00-b295-11ea-8aa3-e6aa06a9a279.png" width="50%" height="50%">
<img src="https://user-images.githubusercontent.com/10969616/85195079-30fd4f80-b295-11ea-8bcd-257990b77dcb.png" width="50%" height="50%">
<img src="https://user-images.githubusercontent.com/10969616/85195082-322e7c80-b295-11ea-8c81-320dab424c3c.png" width="50%" height="50%">
**Uninstall Kinto**
```
py setup.py
```
Select Uninstall
## How to use in Remote Desktop Solutions
RDP fully works as long as the entire keyboard input is being captured. RDP had been working for awhile with Windows but as of 2/14/2021 Linux & macOS is now supported. VNC & other protocols may work, but is likely most dependent on how the keyboard input is captured on the computer running the client.
|Program|Src/Remote Client ⇒|Dst/Remote Server|Works? |Notes|
|---|---|---|---|---|
|Official MS RDP (mstsc.exe)| ❖Windows ⇒| 🐧Linux | ✅ Yes| Note: [v1.0.7-3 Only](https://github.com/rbreaves/kinto/releases/tag/1.0.7-3). Should work for xRDP/VNC and other remote server protocols. |
|Official MS RDP (mstsc.exe)| ❖Windows ⇒| ❖Windows | ✅ Yes| |
|Official MS RDP| ChromeOS 87+⇒| ❖Windows | ✅ Yes|May work on earlier versions as well, if they support Android apps|
|Remmina| 🐧Linux*/ChromeOS 87+⇒| ❖Windows | ✅ Yes|*Use hover menu to enable "Grab all keyboard events"|
|FreeRDP| 🐧Linux/ChromeOS 87+⇒| ❖Windows | ✅ Yes | |
|FreeRDP| 🍎macOS⇒| ❖Windows | ✅ Yes| [FreeRDP for macOS](#FreeRDP-for-macOS)|
|Remote Desktop Manager Free|🍎iOS⇒| ❖Windows | ✅ Yes| |
|Jump Desktop (RDP)| 🍎macOS*/iOS ⇒| ❖Windows | ✅ Yes|*Preferences -> Keyboard -> Disable "Key Conversions", Enabled "Send macOS Shortcuts" under Keyboard shortcuts|
|Official MS RDP| 🍎macOS⇒| ❖Windows | ❌ No|Initial Cmd key press not being passed|
|Remote Desktop Manager Free| 🍎macOS⇒| ❖Windows | ❌ No|Initial Cmd key press not being passed|
|Royal TSX Client| 🍎macOS⇒| ❖Windows | ❌ No|Initial Cmd key press not being passed|
|Official MS RDP| 🍎🤖iOS/Android⇒| ❖Windows | ❌ No|No workaround atm|
## How to Remap Windows keyboards for remote access to macOS
Quick summary - Swap Alt & Win to conform with Apple keyboard layouts. Sharpkeys for Windows, Setkeycodes for Linux, then install Kinto.sh or change/update the Keyboard Type to Apple in the system tray.
https://benreaves.medium.com/macos-to-linux-back-again-c6151200f4dc
## FreeRDP for macOS
1. Install [brew.sh](https://brew.sh).
```/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"```
2. Install XQuartz (x11/xorg)
```brew install --cask xquartz```
3. log off and back on.
4. Install FreeRDP
```brew install freerdp```
5. Disable [NLA](https://kb.parallels.com/en/123661), if it is enabled on the destination.
6. Run command to access machine
Note: 192.168.x.x = Your IP.
```xfreerdp /u:your_username /v:192.168.x.x /cert-ignore /auto-reconnect-max-retries:0 /f +clipboard -decorations```
7. Click on XQuartz -> Preferences and set these checkmarks so that fullscreen can work, may need to quit it and re-run the xfreerdp command from step 6.
<img src="https://user-images.githubusercontent.com/10969616/108144025-68bfcf80-708e-11eb-96cc-2930b7b1694a.png" width="50%">
More info here
https://medium.com/idomongodb/macos-rdp-to-a-windows-machine-1e0f52f777b
## Jump Desktop for macOS
Screenshots of how to configure Jump Desktop for macOS users accessing a Windows PC with Kinto installed. I apologize that it is not a free RDP client - BUT it does work, and at $15 it is reasonable if you plan to use it frequently.
<img src="https://user-images.githubusercontent.com/10969616/107990246-a2fb7500-6f99-11eb-8c19-0a9b538b996f.png" width="25%">
<img src="https://user-images.githubusercontent.com/10969616/107990265-a8f15600-6f99-11eb-9922-bbcfa0b92031.png" width="50%">
<img src="https://user-images.githubusercontent.com/10969616/107990256-a68efc00-6f99-11eb-9f31-575ed6016944.png" width="50%">
## Table of Contents
[How to install (Linux)](#How-to-install-Linux)
[How to install (Windows)](#How-to-install-Windows)
[What does this do exactly?](#What-does-this-do-exactly)
[What's different from other remappers?](#Whats-different)
[What does Kinto require?](#What-does-Kinto-require)
[How to install](#How-to-install)
[Shortcut Creation (Xkeysnail)](#Shortcut-Creation-Xkeysnail)
[Other Notes Related to Install](#Other-Notes-Related-to-Install)
[Shortcut Creation](#Shortcut-Creation)
[How to Upgrade/Control Kinto](#How-to-Upgrade-Kinto)
@@ -55,72 +251,48 @@ Kinto works for standard Windows, Apple and Chromebook keyboards. The following
|---|---|---|---|---|
|**Virtual**| LCtrl | Alt | RCtrl |Spacebar|
Does Kinto have to have specific keymaps for individual apps?
Note: RCtrl for terminals is also adding in Shift most of the time, however it depends on the specific terminal in use and will change itself to the expected keymaps of that terminal application.
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's different?
Compared to most other remappers ***this is a complete system-wide remap of your base level modifier keys***, this saves time. You're not going to die a death of a thousand papercuts from trying to support every shortcut key under the sun.
It also retains some of the most commonly used system level shortcut keys, such as Cmd-C/V, Cmd-Tab, and Ctrl-Tab among others. You will keep seamless copy & paste between all apps, ability to switch Windows while still using the physical Cmd/Alt key position; switch tabs in your favorite terminals, code editors, or web browsers. Depending on your OS and/or Desktop Environment you may also be able to switch Virtual Desktop environments the same way as well and other basic system level shortcuts.
If your OS and macOS have similar functionality on the system level, but only differ by a slight difference of a shortcut command then Kinto likely supports it already. If Kinto doesn't have what you need then you can open up a support ticket and it will be added. You can also fork the project to add the fix and I will merge it via a PR you make.
Additionally, if you are using a cross-platform app and if it happens to have a few shortcut keys that differ then that can very easily be added to either the kinto.py or kinto.ahk configuration files which on Windows is located here `~/.kinto/kinto.ahk` and on Linux it can be found here `~/.config/kinto/kinto.py`. More info can be found here [Shortcut Creation](#Shortcut-Creation)
## What does Kinto require?
- Python (initial install only)
- systemd
- Python
- systemd or sysvinit
- x11
- IBus*
- Manjaro/Arch/Debian/Ubuntu based distro 16.04+
- Fedora/RHEL (may not work w/ xkeysnail, but original xkb version does)
- xkeysnail (Recommended, but optional)
*IBus is needed to support wordwise during browser app usage as the keymap will need to change slightly depending if the cursor/caret is on screen waiting for input. Setup.py will set it but you can manually set it as well or check your current Input Method.
On most distros you can confirm navigate to your "Language Support" and set "Keyboard input method system:" to IBus for full word-wise support with web browsers.
Wayland support is planned, but not ready yet.
- xkeysnail
### Kinto for Windows 10 Requirements
- WSL Ubuntu edition
- [Git for Windows](https://git-scm.com/download/win)
- Powershell - run as Administrator
- Python3
- [Python3](https://www.python.org/downloads/windows/)
Other programs that will be installed when you run ./setup.py
- Chocolatey
- Autohotkey
- Strawberry Perl
Note: Sublime Text users should disable screen rotation hotkeys as they will interfere with multi-cursor and possibly other combos. See https://windowsloop.com/disable-screen-rotation-keyboard-shortcut/ for details.
Does not have complete parity with the Linux edition, but it is getting very close now. Only lacks some Sublime Text 3 remaps at this point.
You may also want to disable the Xbox Game Bar so that Win+G or other shortcuts will not interfer with any of your remaps. Start menu -> Game bar shortcuts -> toggle Off.
Users can now hotswap between Apple and Windows based keyboards without having to logoff and back on, and Windows is currently the only implementation with a system tray (but this feature is coming to Budgie, XFCE, Mate, Gnome, and lastly KDE).
## Shortcut Creation
<img src="https://user-images.githubusercontent.com/10969616/84471498-100c7d00-ac4b-11ea-972d-60c1907831ec.png" width="50%">
<img src="https://user-images.githubusercontent.com/10969616/84471501-10a51380-ac4b-11ea-9e0e-c19a7ebfad6d.png" width="50%">
[Linux Shortcut Creation (Xkeysnail)](#Linux-Xkeysnail)
[Windows Shortcut Creation (Autohotkey)](#Windows-Autohotkey)
## How to install
1. clone this repo
```
git clone https://github.com/rbreaves/kinto.git
```
2. Install python3 (If needed)
Debian or Ubuntu 16.04 or 18.04
```
sudo apt update
sudo apt install python3
```
3. Follow the prompts and the script will guide you through the rest of the setup.
```
./setup.py
```
To Uninstall Kinto
```
./setup.py
```
## Shortcut Creation (Xkeysnail)
## Linux (Xkeysnail)
**GUI Keys**
| Value| Description|Mac/Kinto Equivalent|
@@ -150,44 +322,68 @@ define_keymap(re.compile("Sublime_text"),{
In the above example I am also showing that you can define a single shortcut to enact multiple shortcut keys if needed by defining an array of shortcuts to trigger.
You can also make changes to the file in your /tmp/kinto/xkeysnail/kinto.py location and see them take affect in real time, but for your changes to be permanent you will need to make your changes in the ~/.config/kinto/kinto.py location & restart the xkeysnail service.
To make changes you can edit ~/.config/kinto/kinto.py under linux & restart the xkeysnail service via the system tray, app or CLI.
systemd
```
sudo systemctl restart xkeysnail
```
sysvinit
```
sudo -E /etc/init.d/kinto restart
```
More information can be seen on the readme page of [xkeysnail](https://github.com/mooz/xkeysnail).
## Windows (Autohotkey)
This applies to the Windows version of Kinto and how to add additional support for Applications. The configuration file location is `~/.kinto/kinto.ahk` and after updating it you will want to right click on the tray icon and click on setting your keyboard type again and it will re-apply the latest changes.
Windows 10 has a couple of ways that you need to be aware of when trying to add a specific application, the typical method of how to add any exe program, but then there is also the newer UWP app format that some applications use which will require a similar but different method, both will be discussed.
### Defining Keymaps Per App by EXE Name
You can use the following legend **but** realize that these remaps reference the Virtual keys in the diagrams mentioned near the beginning of this document, so **do not** confuse it with the physical key unless they happen to be the same key.
|Autohotkey Symbol|Virtual key|Description|
|---|---|---|
|^,Ctrl|Control|Primary modifier, 1st rock from the spacebar|
|!,Alt|Alt|Secondary modifier, 2nd rock from the spacebar|
|#,Win|Win/Super|Tertiary modifier, 3rd rock from the spacebar|
```
...
#IfWinActive ahk_exe sublime_text.exe
#^Up::send !{O} ; Switch file
#^f::send {F11} ; toggle_full_screen
^!v::send {Ctrl Down}k{Ctrl Up}{Ctrl Down}v{Ctrl Up} ; paste_from_history
...
#If
...
```
With this being Autohotkey you can easily pull knowledge from the Autohotkey forums for just about any issue you may have as well.
### Defining Keymaps Per UWP App
```
#If WinActive("- OneNote ahk_class ApplicationFrameWindow", "OneNote")
...
; Add your keymaps here
...
#If
```
I don't have too many examples on this one, most developers seem to be shying away from UWP. Kinto currently supports "Fluent Terminal" which is a UWP app, but it is also being grouped with other Terminal apps for hotkey remapping. You may take a look at that, but you may also want to try creating a new Autohotkey file and use the Window Spy feature built into Autohotkey to help you discover the full name and class names of any application.
## Shortcut Creation (XKB)
The older xkb shortcut method info can be read about in ticket [#125](https://github.com/rbreaves/kinto/issues/125).
## Other Notes Related to Install
**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.
https://github.com/rbreaves/kinto/issues/59
https://wiki.archlinux.org/index.php/IBus
**For other Arch based distros.**
Append the following and logoff and back on, but only after running setup.py to install all packages and the kinto service. Please report if there are any difficulties.
nano ~/.bashrc
```
export GTK_IM_MODULE=xim
export XMODIFIERS=@im=ibus
export QT_IM_MODULE=xim
```
## How to Upgrade Kinto
Simply bring down the latest in either the master branch or dev, but dev is sometimes in flux as new features are being developed. Then you can re-run the setup.py installer, it will stop the service and re-install Kinto.
Simply bring down the latest then you can re-run the setup.py installer, it will stop the service and re-install Kinto.
Note: If you have made any custom changes to ~/.xkb or ~/.config/kinto then you will need to backup or rename those directories before running an update.
Note: If you have made any custom changes to ~/.config/kinto then you will need to backup or rename those directories before running an update.
```
git pull origin master
@@ -196,91 +392,95 @@ git pull origin master
## How to Control Kinto
Under systemd this is how you control Kinto.
Kinto (xkb/x11) = keyswap
Kinto (udev/xkeysnail/x11) = xkeysnail
This info is now superceded by the fact that linux has a full fledge GUI and system tray app that is very easy to use, but I will keep the command line options for those that want to know what they are.
Status
systemd
```
systemctl --user status keyswap
sudo systemctl status xkeysnail
```
Stop (your keymap will return to normal)
sysvinit
```
tail -f /tmp/kinto.log
```
Stop (your keymap will return to normal)
systemd
```
systemctl --user stop keyswap
sudo systemctl stop xkeysnail
```
Start
sysvinit
```
sudo -E /etc/init.d/kinto stop
```
Start
systemd
```
systemctl --user start keyswap
sudo systemctl start xkeysnail
```
Restart
sysvinit
```
sudo -E /etc/init.d/kinto start
```
Restart
systemd
```
systemctl --user restart keyswap
sudo systemctl restart xkeysnail
```
Enable
sysvinit
```
systemctl --user enable keyswap
sudo systemctl enable xkeysnail
```
Disable
```
systemctl --user disable keyswap
sudo systemctl disable xkeysnail
```
## 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.
To make sure you are in the terminal style keymap you can just simply open the terminal and turn off the kinto service, and then switch back to Chrome.
```
systemctl --user stop keyswap && setxkbmap -option;setxkbmap -option altwin:swap_alt_win
sudo -E /etc/init.d/kinto restart
```
## Troubleshooting
### Installed successfully, but modifier keys are not properly remapped?
Are you using a VM on macOS? If so you may need to disable automatic remapping of the Cmd key when using Vmware Fusion of Parallels.
Disable Parallels Re-mapping:
1) Open Parallels and go to Preferences.
2) Click Keyboard and disable the Virtual machine shortcuts.
3) Close Preferences.
To disable keyboard mapping:
1) From Fusion's menu bar, click VMware Fusion > Preferences...
2) Click Keyboard & Mouse.
3) Click the Key Mappings tab.
4) Deselect Enable Key Mapping.
### Does not start when you log in or after you reboot?
Kinto (xkb/x11) = keyswap
Kinto (udev/xkeysnail/x11) = xkeysnail
1. Check the status
```
systemctl --user status keyswap
sudo systemctl status xkeysnail
```
2. Check the service journal
```
journalctl --user-unit=keyswap.service -b
sudo journalctl --unit=xkeysnail.service -b
```
Note: You can also watch your log live
```
journalctl -l --user-unit=keyswap.service -b
sudo journalctl -l --unit=xkeysnail.service -b
```
You may need to manually set your DISPLAY in the systemd service file. Normally it pulls in the proper DISPLAY value but if it doesn't you can try this.
Another possibility is the SELinux could be enabled and needs to be set to permissive. (aka /etc/selinux/config)
To reset the display variable
```
echo $DISPLAY
# :0.0
```
nano ~/.config/systemd/user/keyswap.service
You can use the Kinto.sh app or system tray to edit your service file.
kinto.sh gui
1. Edit -> Edit Service
kinto tray
1. Customize -> Edit Service
or you can use your terminal.
sudo nano /etc/systemd/system/xkeysnail.service
```
@@ -294,89 +494,39 @@ Environment=DISPLAY=:0.0
If you continue to have issues then open a ticket and send me the info.
### Keyswap is not occurring, but it was working.
Kinto (xkb/x11) = keyswap
Kinto (udev/xkeysnail/x11) = xkeysnail
Now that Kinto (xkb/x11) is using a custom written C program I am not aware of any specific bugs or issues, but you can start here if you having difficulties and please report it if it is reproducible.
1. Get status
```
systemctl --user status keyswap
sudo systemctl status xkeysnail
```
2. Restart Kinto
```
systemctl --user restart keyswap
sudo systemctl restart xkeysnail
```
3. Check the Status again and open a ticket if you need to.
```
systemctl --user status keyswap
sudo systemctl status xkeysnail
```
You can also do the following to see if it is an actual issue with kintox11 not running or your service file.
```
cd ~/.config/kinto
./kintox11
```
## Debug
If all else fails you can now run Kinto in debug mode as of 1.0.6-2. The output will become more verbose and I'd recommend running this directly after stopping the service.
Kinto (xkb/x11)
```
systemctl --user stop keyswap
cd ~/.config/kinto
./kintox11 --debug
```
Kinto (udev/xkeysnail)
Stop
```
sudo systemctl stop xkeysnail
```
nano ~/.config/kinto/xkeystart.sh
Remove the 2 instances of --quiet and resave
```
#!/bin/bash
/usr/local/bin/xkeysnail --quiet --watch "$1" &
inotifywait -m -e close_write,moved_to,create -q "$1" |
while read -r path; do
/usr/bin/killall xkeysnail
/usr/local/bin/xkeysnail --quiet --watch "$1" &
done
```
Start
```
sudo systemctl start xkeysnail
sudo systemctl status xkeysnail
```
## 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.
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
## Related or Useful Resources
[Xkeysnail](https://github.com/mooz/xkeysnail) by mooz
Yet another keyboard remapping tool for X environment
[libinput-gestures](https://github.com/bulletmark/libinput-gestures)
Three finger gesture or other type of gestures for desktop switching or other features within a Linux distro. More info here for quickly setting it up. Make sure you logoff after setting your user to access input. https://www.reddit.com/r/GalliumOS/comments/5lgrxe/psa_multitouch_gestures_on_galliumos/
[Interception](https://gitlab.com/interception/linux/tools)
Another low level key remapper, not as easily configurable as Xkeysnail, but does not rely on X11.
[Wincent](https://github.com/wincent/wincent) by Greg Hurrell
Dot files and configurations that may help those that want mac-style shortcut keys that work under Wayland, or w/o x11.
[Vim #102: macOS keyboard bindings on Linux](https://www.youtube.com/watch?v=TBqTHesnzkI)
[mac-precision-touchpad](https://github.com/imbushuo/mac-precision-touchpad) by imbushuo
Windows 10 touchpad to precision touchpad driver
[macOS-cursors-for-Windows](https://github.com/antiden/macOS-cursors-for-Windows) by antiden
macOS cursors for Windows
[QuickLook](https://github.com/QL-Win/QuickLook) for Windows by QL-Win
It allows users to peek into a file content in lightning speed by just pressing the Space key
[fusuma](https://github.com/iberianpig/fusuma) by iberianpig
Multitouch gestures with libinput driver on Linux
@@ -385,10 +535,11 @@ Multitouch gestures with libinput driver on Linux
Linux driver for Facetime HD on macbooks
[Fluent Terminal - Windows only](https://github.com/felixse/FluentTerminal) by felixse
[Windows Terminal Preview](https://aka.ms/terminal-preview) by Microsoft
The best Terminal app built for Windows hands down. I have tried countless, but this one actually seems to get everything right, despite the lack of a GUI to configure all aspects of the program. Custom configurations have to be done via a json file - but given the performance and feature set I feel like it is the a decent trade off.
A Terminal Emulator based on UWP and web technologies.
I will update Kinto to have custom configurations for this specific Terminal in the future. Will make seamless copy & paste, which already works, work even better (Cmd-C can still trigger sigint - but there is a fix for that that involves updating the json config).
[PowerToys - Windows only](https://github.com/microsoft/PowerToys) by microsoft
@@ -438,7 +589,7 @@ Dark & Light Theme w/ OSX controls for Elementary OS
Auto-detect the connected display hardware and load the appropriate X11 setup using xrandr
[Barrier](https://github.com/debauchee/barrier) by debauchee
[Barrier](https://github.com/debauchee/barrier) by debauchee (Note: Does not appear to work with Kinto v1.2+, may work w/ Kinto v1.1?)
Open-source KVM software
@@ -464,11 +615,9 @@ Vala rewrite of SimplePanel - GitHub mirror (Global Menu for XFCE)
## Contributing
I welcome any and all contributors who want to contribute something to this project.
I welcome any and all contributors who want to add something to this project.
If you are specifically wanting to contribute additional custom keymaps to help with aligning Kinto's behavior to that of a mac keyboard then I would strongly recommend that you read Glen Whitney's comment on Superuser (the link is below). You may also look at the .xkb directory, mac_wordwise.sh and xactive.sh files to better understand how Kinto operates so that you can test your own keymaps without having to use the systemd service or running the xactive.sh script.
https://superuser.com/questions/385748/binding-superc-superv-to-copy-and-paste
You can read the configuration files and the open issue tickets such as [#44 Shortcut Translation Tables](https://github.com/rbreaves/kinto/issues/44), [#115 Shortcut Creation (xkeysnail)](https://github.com/rbreaves/kinto/issues/115), and [#348 Missing Shortcuts: Post them here](https://github.com/rbreaves/kinto/issues/348) to best understand what's currently happening and how best to contribute.
## More information about Kinto

View File

@@ -1,86 +0,0 @@
{"defaultapps":[{
"name":"term",
"appnames":[ "Gnome-terminal","konsole","io.elementary.terminal","terminator","sakura","guake","tilda","xterm","eterm","kitty" ]
}],
"defaulttypes":["windows","mac","chromebook"],
"defaults":[{
"id": 1,
"name":"Windows",
"type":"windows",
"active": false,
"description":"Standard Windows 104 Keyboards",
"gui":"xkbcomp -w0 -I$HOME/.xkb ~/.xkb/keymap/kbd.mac.gui $DISPLAY 2>&1 | grep -v XF86FullScreen",
"term":"xkbcomp -w0 -I$HOME/.xkb ~/.xkb/keymap/kbd.mac.term $DISPLAY 2>&1 | grep -v XF86FullScreen",
"xkb_symbols_gui":"+altwin(ctrl_alt_win)+mac_gui(mac_levelssym)+mac_gui(mac_appcycle)",
"xkb_symbols_term":"+altwin(swap_alt_win)+mac_term(mac_win)+mac_term(mac_global)",
"xkb_types_gui":"+mac_gui(addmac_levels)",
"xkb_types_term":"+mac_term(addmac_levels)"
},
{
"id": 2,
"name":"Mac - hid driver (Recommended - Also supports Windows keyboards)",
"type":"mac",
"active": false,
"description":"Standard Mac Keyboards with Apple driver",
"gui":"xkbcomp -w0 -I$HOME/.xkb ~/.xkb/keymap/kbd.mac.gui $DISPLAY 2>&1 | grep -v XF86FullScreen",
"term":"xkbcomp -w0 -I$HOME/.xkb ~/.xkb/keymap/kbd.mac.term $DISPLAY 2>&1 | grep -v XF86FullScreen",
"xkb_symbols_gui":"+altwin(ctrl_alt_win)+mac_gui(mac_levelssym)+mac_gui(mac_appcycle)",
"xkb_symbols_term":"+altwin(swap_alt_win)+mac_term(mac_win)+mac_term(mac_global)",
"xkb_types_gui":"+mac_gui(addmac_levels)",
"xkb_types_term":"+mac_term(addmac_levels)",
"hack": "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"
},
{
"id": 3,
"name":"Mac Only (VMs & non-official Apple keyboards)",
"type":"mac",
"active": true,
"description":"Standard Mac Keyboards",
"gui":"xkbcomp -w0 -I$HOME/.xkb ~/.xkb/keymap/kbd.mac.gui $DISPLAY 2>&1 | grep -v XF86FullScreen",
"term":"xkbcomp -w0 -I$HOME/.xkb ~/.xkb/keymap/kbd.mac.term $DISPLAY 2>&1 | grep -v XF86FullScreen",
"xkb_symbols_gui":"+ctrl(swap_lwin_lctl)+ctrl(swap_rwin_rctl)+mac_gui(mac_levelssym)+mac_gui(mac_appcycle)",
"xkb_symbols_term":"+altwin(alt_super_win)+mac_term(mac_apple)+mac_term(mac_global)",
"xkb_types_gui":"+mac_gui(addmac_levels)",
"xkb_types_term":"+mac_term(addmac_levels)"
},
{
"id": 4,
"name":"Chromebook (xfce)",
"type":"chromebook",
"active": false,
"description":"Standard Chromebook Keyboards",
"gui":"xkbcomp -w0 -I$HOME/.xkb ~/.xkb/keymap/kbd.mac.gui $DISPLAY 2>&1 | grep -v XF86FullScreen",
"term":"xkbcomp -w0 -I$HOME/.xkb ~/.xkb/keymap/kbd.mac.term $DISPLAY 2>&1 | grep -v XF86FullScreen",
"xkb_symbols_gui":"+chromebook(swap_lalt_lctrl)+mac_gui(mac_levelssym)+mac_gui(mac_appcycle_chromebook)",
"xkb_symbols_term":"+altwin(swap_alt_win)+mac_term_chromebook(mac_levelssym)",
"xkb_types_gui":"+mac_gui(addmac_levels)",
"xkb_types_term":"+mac_term(addmac_levels)"
},
{
"id": 5,
"name":"Chromebook (xfce) - Windows",
"type":"chromebook",
"active": false,
"description":"Chromebook with Windows 104 Keyboard",
"gui":"xkbcomp -w0 -I$HOME/.xkb ~/.xkb/keymap/kbd.mac.gui $DISPLAY 2>&1 | grep -v XF86FullScreen; setxkbmap -device $usbid -option altwin:ctrl_alt_win",
"term":"xkbcomp -w0 -I$HOME/.xkb ~/.xkb/keymap/kbd.mac.term $DISPLAY 2>&1 | grep -v XF86FullScreen",
"fallbackgui":"xkbcomp -w0 -I$HOME/.xkb ~/.xkb/keymap/kbd.mac.gui $DISPLAY 2>&1 | grep -v XF86FullScreen",
"xkb_symbols_gui":"+chromebook(swap_lalt_lctrl)+mac_gui(mac_levelssym)+mac_gui(mac_appcycle_chromebook)",
"xkb_symbols_term":"+altwin(swap_alt_win)+mac_term_chromebook(mac_levelssym)",
"xkb_types_gui":"+mac_gui(addmac_levels)",
"xkb_types_term":"+mac_term(addmac_levels)"
},
{
"id": 6,
"name":"Chromebook (xfce) - Mac",
"type":"chromebook",
"active": false,
"description":"Chromebook with Mac Keyboard",
"gui":"setxkbmap -option;setxkbmap -option ctrl:swap_lwin_lctl; xkbcomp -w0 -i $internalid -I$HOME/.xkb ~/.xkb/keymap/kbd.mac.gui $DISPLAY 2>&1 | grep -v XF86FullScreen",
"term":"setxkbmap -option;xkbcomp -w0 -I$HOME/.xkb ~/.xkb/keymap/kbd.mac.term $DISPLAY 2>&1 | grep -v XF86FullScreen",
"xkb_symbols_gui":"+chromebook(swap_lalt_lctrl)+mac_gui(mac_levelssym)+mac_gui(mac_appcycle_chromebook)",
"xkb_symbols_term":"+altwin(swap_alt_win)+mac_term_chromebook(mac_levelssym)",
"xkb_types_gui":"+mac_gui(addmac_levels)",
"xkb_types_term":"+mac_term(addmac_levels)"
}]
}

21
install/linux.sh Executable file
View File

@@ -0,0 +1,21 @@
#!/usr/bin/env bash
# /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/rbreaves/kinto/master/install/linux.sh)"
wget https://github.com/rbreaves/kinto/archive/refs/heads/master.zip -O ~/Downloads/kinto.zip || curl https://github.com/rbreaves/kinto/archive/refs/heads/master.zip -J -L -o ~/Downloads/kinto.zip
unzip ~/Downloads/kinto.zip -d ~/Downloads/
cd ~/Downloads/kinto-master/
kintorelease=`wget -qO- https://api.github.com/repos/rbreaves/kinto/releases/latest | awk -F'tag_name": ' '{if ($2) print $2}' | tr -d \", || curl -s https://api.github.com/repos/rbreaves/kinto/releases/latest | awk -F'tag_name": ' '{if ($2) print $2}' | tr -d \",`
kintohash=`unzip -z ~/Downloads/kinto.zip | tail -n1`
kintoshort=${kintohash::7}
echo "$kintorelease" "build" "$kintoshort" > ./dl_version
if [ $# -eq 0 ];then
echo "Installing Kinto..."
./setup.py
elif [ $1 == "-r" ];then
echo "Uninstall Kinto..."
./setup.py -r
fi

7
install/windows.ps1 Normal file
View File

@@ -0,0 +1,7 @@
Invoke-WebRequest -Uri https://github.com/rbreaves/kinto/archive/refs/heads/master.zip -OutFile $env:USERPROFILE\Downloads\kinto.zip
Expand-Archive -LiteralPath "$env:USERPROFILE\Downloads\kinto.zip" -DestinationPath "$env:USERPROFILE\Downloads" -Force
Set-ExecutionPolicy Bypass -Scope Process -Force
iwr https://chocolatey.org/install.ps1 -UseBasicParsing | iex
choco install -y python3
cd "$env:USERPROFILE\Downloads\kinto-master"
py .\setup.py

View File

@@ -1,344 +0,0 @@
#!/usr/bin/env python3
# pip3 install pynput
# pip3 install --no-deps pynput
# from pynput.keyboard import Key, Listener
import sys, subprocess, time, os
from subprocess import PIPE, Popen
delay=3
def cmdline(command):
process = Popen(
args=command,
stdout=PIPE,
universal_newlines=True,
shell=True
)
return process.communicate()[0]
class color:
PURPLE = '\033[95m'
CYAN = '\033[96m'
DARKCYAN = '\033[36m'
BLUE = '\033[94m'
GREEN = '\033[92m'
YELLOW = '\033[93m'
RED = '\033[91m'
BOLD = '\033[1m'
UNDERLINE = '\033[4m'
END = '\033[0m'
def countdown(secs):
for i in range(0,secs):
print(secs-i, end="\r", flush=True)
time.sleep(1)
def on_press(key):
print('{0} pressed'.format(key))
def on_release(key):
# print('{0} release'.format(key))
if key == Key.esc:
# Stop listener
return False
def yn_choice(message, default='y'):
choices = 'Y/n' if default.lower() in ('y', 'yes') else 'y/N'
choice = input("%s (%s) " % (message, choices))
values = ('y', 'yes', '') if choices == 'Y/n' else ('y', 'yes')
return choice.strip().lower() in values
modifier_keys = {
"primary":"",
"secondary":"",
"rprimary":"",
"rsecondary":"",
"capslock":"",
"capswap":""
}
def set_key(key):
global modifier_keys
print("\nWhich key would you like to set?\n")
while True:
try:
keytype = int(input(
"1) Ctrl\n" +
"2) Alt\n" +
"3) Super/Win/Cmd/Chrome search key\n"))
if keytype < 4 and keytype > 0:
break
except:
print("That's not a valid option!")
print("")
if keytype == 1:
modifier_keys[key] = "Ctrl"
elif keytype == 2:
modifier_keys[key] = "Alt"
elif keytype == 3:
modifier_keys[key] = "Cmd"
def set_cap():
global modifier_keys
print("\nWhich key would you like to swap?\n")
while True:
try:
keytype = int(input(
"1) Ctrl (swap)\n" +
"2) Ctrl (duplicate)\n" +
"3) Esc (swap)\n"))
if keytype < 4 and keytype > 0:
break
except:
print("That's not a valid option!")
print("")
if keytype == 1:
modifier_keys["capslock"] = "Ctrl-swap"
elif keytype == 2:
modifier_keys["capslock"] = "Ctrl-dup"
elif keytype == 3:
modifier_keys["capswap"] = "Escape"
def is_primary(key):
global modifier_keys
if not (str(key).replace("Key.", "").title() == "Enter" or str(key).replace("Key.", "").title() == "Escape"):
print(str(key).replace("Key.", "").title() + " will be remapped to Ctrl, the Cmd ⌘ key position.")
# countdown(3)
modifier_keys["primary"] = str(key).replace("Key.", "").title()
elif str(key).replace("Key.", "").title() == "Escape":
modifier_keys["primary"] = "Escape"
# countdown(3)
else:
return True
return False
def is_secondary(key):
global modifier_keys
if not (str(key).replace("Key.", "").title() == "Enter" or str(key).replace("Key.", "").title() == "Escape"):
print(str(key).replace("Key.", "").title() + " will be remapped to Alt, the Option ⌥ key position.")
# countdown(3)
modifier_keys["secondary"] = str(key).replace("Key.", "").title()
return False
elif str(key).replace("Key.", "").title() == "Escape":
modifier_keys["secondary"] = "Escape"
# countdown(3)
return False
else:
return True
def is_rprimary(key):
global modifier_keys
if not (str(key).replace("Key.", "").title() == "Enter" or str(key).replace("Key.", "").title() == "Escape"):
print(str(key).replace("Key.", "").title() + " will be remapped to Ctrl, the Cmd ⌘ key position.")
# countdown(3)
modifier_keys["rprimary"] = str(key).replace("Key.", "").title()
return False
elif str(key).replace("Key.", "").title() == "Escape":
modifier_keys["rprimary"] = "Escape"
# countdown(3)
return False
else:
return True
def is_rsecondary(key):
global modifier_keys
if not (str(key).replace("Key.", "").title() == "Enter" or str(key).replace("Key.", "").title() == "Escape"):
print(str(key).replace("Key.", "").title() + " will be remapped to Alt, the Option ⌥ key position.")
# countdown(3)
modifier_keys["rsecondary"] = str(key).replace("Key.", "").title()
return False
elif str(key).replace("Key.", "").title() == "Escape":
modifier_keys["rsecondary"] = "Escape"
# countdown(3)
return False
else:
return True
print(color.UNDERLINE + color.YELLOW + "\n\nPlease ignore the FN key." + color.END + " FN cannot be remapped by software, some Thinkpads can swap it with Ctrl in the BIOS.\n")
input("Press Enter to continue...\n\n")
print(chr(27) + "[2J")
counter = 0
while True:
print(color.UNDERLINE + color.YELLOW + "\n\nPress the 1st key Left of the spacebar" + color.END + " (Press Esc to set manaully)\n")
print(" 👇")
print(" □ □ ▣ ░░░░░░░\n")
# listener = Listener(on_release=is_primary,suppress=True)
# listener.start()
# with Listener(
# on_release=is_primary,suppress=True) as listener:
# try:
# listener.join()
# except MyException as e:
# print('{0} was pressed'.format(e.args[0]))
modifier_keys["primary"] = cmdline("xbindkeys -k | awk 'END {print $NF}'").strip()
print(modifier_keys["primary"] + " will be remapped to Ctrl, the Cmd ⌘ key position.")
if modifier_keys["primary"] != "Escape":
choice = yn_choice("Is this correct?")
if(choice):
# print("Left Physical " + modifier_keys["primary"] + " = Ctrl/Cmd ⌘")
# listener.stop()
# input("Press Enter to continue...\n\n")
break
else:
set_key("primary")
print("Left Physical " + modifier_keys["primary"] + " = Ctrl/Cmd ⌘\n")
# listener.stop()
input("Press Enter to continue...\n\n")
break
counter += 1
print(str(counter)+"\n")
time.sleep(1)
print(chr(27) + "[2J")
while True:
print(color.UNDERLINE + color.YELLOW + "\n\nPress the 2nd key Left of the spacebar" + color.END + " (Press Esc to set manaully)\n")
print(" 👇")
print(" □ ▣ □ ░░░░░░░\n")
# with Listener(
# on_release=is_secondary,suppress=True) as listener:
# try:
# listener.join()
# except MyException as e:
# print('{0} was pressed'.format(e.args[0]))
modifier_keys["secondary"] = cmdline("xbindkeys -k | awk 'END {print $NF}'").strip()
print(modifier_keys["secondary"] + " will be remapped to Alt, the Option ⌥ key position.")
if modifier_keys["secondary"] != "Escape":
choice = yn_choice("Is this correct?")
if(choice):
# listener.stop()
# print("Left Physical " + modifier_keys["secondary"] + " = Alt/Option ⌥")
# input("Press Enter to continue...\n\n")
break
else:
set_key("secondary")
print("Left Physical " + modifier_keys["secondary"] + " = Alt/Option ⌥\n")
# listener.stop()
input("Press Enter to continue...\n\n")
break
print(chr(27) + "[2J")
while True:
print(color.UNDERLINE + color.YELLOW + "\n\nPress the 1st key Right of the spacebar" + color.END + " (Press Esc to set manaully)\n")
print(" 👇")
print(" ░░░░░░░ ▣ □")
# with Listener(
# on_release=is_rprimary,suppress=True) as listener:
# try:
# listener.join()
# except MyException as e:
# print('{0} was pressed'.format(e.args[0]))
modifier_keys["rprimary"] = cmdline("xbindkeys -k | awk 'END {print $NF}'").strip()
print(modifier_keys["rprimary"] + " will be remapped to Ctrl, the Cmd ⌘ key position.")
if modifier_keys["rprimary"] != "Escape":
choice = yn_choice("Is this correct?")
if(choice):
# listener.stop()
# print("Right Physical " + modifier_keys["rprimary"] + " = Ctrl/Cmd ⌘")
# input("Press Enter to continue...\n\n")
break
else:
set_key("rprimary")
print("Right Physical " + modifier_keys["rprimary"] + " = Ctrl/Cmd ⌘\n")
# listener.stop()
input("Press Enter to continue...\n\n")
break
print(chr(27) + "[2J")
while True:
print(color.UNDERLINE + color.YELLOW + "\n\nPress the 2nd key Right of the spacebar" + color.END + " (Press Esc to set manaully)\n")
print(" 👇")
print(" ░░░░░░░ □ ▣")
# with Listener(
# on_release=is_rsecondary,suppress=True) as listener:
# try:
# listener.join()
# except MyException as e:
# print('{0} was pressed'.format(e.args[0]))
modifier_keys["rsecondary"] = cmdline("xbindkeys -k | awk 'END {print $NF}'").strip()
print(modifier_keys["rsecondary"] + " will be remapped to Alt, the Option ⌥ key position.")
if modifier_keys["rsecondary"] != "Escape":
choice = yn_choice("Is this correct?")
if(choice):
# listener.stop()
# print("Right Physical " + modifier_keys["rsecondary"] + " = Alt/Option ⌥")
# modifier_keys["rsecondary"] = str(os.system("xbindkeys -k | awk 'END {print $NF}'"))
break
else:
set_key("rsecondary")
print("Right Physical " + modifier_keys["rsecondary"] + " = Alt/Option ⌥\n")
# listener.stop()
input("Press Enter to continue...\n\n")
break
print(chr(27) + "[2J")
if not (modifier_keys["secondary"] == "Ctrl" or modifier_keys["secondary"] == "Control_R"):
print(color.UNDERLINE + color.YELLOW + "GUI Usage (Physical Ctrl key)\n"+ color.END)
print("Ctrl key will be mapped to Super. (Search key on chromebooks)")
print("👇")
print(" ▣ □ □ ░░░░░░░\n")
print("Note: Super may still activate Ctrl based shortcuts\n")
print("at times depending on application or system level shortcuts.\n")
print("This will only be done to align shortcuts to their expected functionality.\n")
input("Press Enter to continue...\n\n")
# print(chr(27) + "[2J")
print(color.UNDERLINE + color.YELLOW + "Terminal Usage" + color.END + "\n")
print("Ctrl key will be the Ctrl key.")
print("👇")
print(" ▣ □ □ ░░░░░░░\n")
print("The Cmd ⌘ key position during terminal usage will usually be Ctrl+Shift.")
print(" 👇 ")
print(" □ □ ▣ ░░░░░░░\n")
input("Press Enter to continue...\n")
else:
print("Chromebook detected.")
print(color.UNDERLINE + color.YELLOW + "GUI Usage\n"+ color.END)
print("Search key (capslock position) on chromebooks will be Super\n")
print("Note: Super may still activate Ctrl based shortcuts")
print("at times depending on application or system level shortcuts.\n")
print("Efforts have been made though to use the physical Ctrl key")
print("when it makes sense to do so, and more often than standard")
print("keyboards. How it feels to type is more important than technical")
print("accuracy.\n")
print("If you believe an improvement can be made or an error was made")
print("please let me know on github or you can fork this project.\n")
input("Press Enter to continue...\n\n")
print(color.UNDERLINE + color.YELLOW + "Terminal Usage" + color.END + "\n")
print(" □ capslock/search key = Alt")
print(" shift")
print(" ▣ □ ░░░░░░░")
print("☝️\n")
input("Press Enter to continue...\n\n")
print(chr(27) + "[2J")
choice = yn_choice(color.UNDERLINE + color.YELLOW + "Do you want to swap Capslock with another key?" + color.END + "\n","n")
if(choice):
set_cap()

View File

@@ -1,26 +0,0 @@
#!/bin/bash
systemctl --user stop keyswap >/dev/null 2>&1
systemctl --user disable keyswap >/dev/null 2>&1
systemctl --user stop keyswap.timer >/dev/null 2>&1
systemctl --user disable keyswap.timer >/dev/null 2>&1
mkdir -p ~/.config/systemd/user
mkdir -p ~/.config/autostart
cp ./system-config/keyswap.service ~/.config/systemd/user/keyswap.service
cp ./system-config/kinto.desktop ~/.config/autostart/kinto.desktop
cp ./system-config/keyswap.timer ~/.config/systemd/user/keyswap.timer
cp ./kintox11/binary/kintox11 ~/.config/kinto/kintox11
cp ./system-config/xactive.sh ~/.config/kinto/xactive.sh
cp ./system-config/caret_status.sh ~/.config/kinto/caret_status.sh
cp ./system-config/cleanup.sh ~/.config/kinto/cleanup.sh
cp ./system-config/.firefox-nw ~/.config/kinto/.firefox-nw
sed -i "s/{username}/`whoami`/g" ~/.config/systemd/user/keyswap.service
sed -i "s/{displayid}/`echo "$DISPLAY"`/g" ~/.config/systemd/user/keyswap.service
# if [ "${#DISPLAY}" -gt 2 ]
# then
sed -i "s/#Environment/Environment/g" ~/.config/systemd/user/keyswap.service
# fi
systemctl --user daemon-reload
sed -i "s/ExecStart=/ExecStart=${swapcmd}/g" ~/.config/systemd/user/keyswap.service
systemctl --user enable keyswap.timer
systemctl --user start keyswap

Binary file not shown.

Before

Width:  |  Height:  |  Size: 116 KiB

Binary file not shown.

View File

@@ -1,5 +0,0 @@
CFLAGS=-g $(shell pkg-config --cflags json-c xmu)
LDFLAGS=-g $(shell pkg-config --libs json-c xmu)
all:
$(CC) kintox11.c $(CFLAGS) $(LDFLAGS) -lm -lpthread -o kintox11

View File

@@ -1,694 +0,0 @@
// -*- coding:utf-8-unix; mode:c; -*-
// Kinto x11 command line
/*
Reference material
get the active window on X window system
http://k-ui.jp/blog/2012/05/07/get-active-window-on-x-window-system/
*/
// To compile without static libraries
// gcc kintox11.c -lX11 -lXmu -ljson-c
//
// To compile with static library json-c
// Make sure archive with object files exist ar -t /usr/local/lib/libjson-c.a
// gcc -L/usr/local/lib/ kintox11.c -ljson-c -lXmu -lXt -lX11 -O2 -o kintox11
//
#define _GNU_SOURCE 1
#include <pthread.h>
#include <stdlib.h>
#include <stdio.h>
#include <stdbool.h>
#include <locale.h>
#include <string.h>
#include <ctype.h>
#include <unistd.h>
#include <X11/Xlib.h> // `apt-get install libx11-dev`
#include <X11/Xmu/WinUtil.h> // `apt-get install libxmu-dev`
#include <json-c/json.h> // `apt install libjson-c-dev`
#include <sys/select.h>
#include <math.h>
#include <sys/time.h>
#ifdef WIN32
#include <windows.h>
#elif _POSIX_C_SOURCE >= 199309L
#include <time.h> // for nanosleep
#else
#include <unistd.h> // for usleep
#endif
const char *eventNames[34] = {"None","KeyPress","KeyRelease","ButtonPress","ButtonRelease","MotionNotify","EnterNotify","LeaveNotify","FocusIn","FocusOut","KeymapNotify","Expose","GraphicsExpose","NoExpose","VisibilityNotify","CreateNotify","DestroyNotify","UnmapNotify","MapNotify","MapRequest","ReparentNotify","ConfigureNotify","ConfigureRequest","ResizeRequest","CirculateNotify","CirculateRequest","PropertyNotify","SelectionClear","SelectionRequest","SelectionNotify","ColormapNotify","ClientMessage","MappingNotify"};
#define NUM_THREADS 2
typedef struct threadArgs * ThreadArgs;
struct threadArgs{
char *run_onInput;
char *run_offInput;
};
long long timeInMilliseconds(void) {
struct timeval tv;
gettimeofday(&tv,NULL);
return (((long long)tv.tv_sec)*1000)+(tv.tv_usec/1000);
}
bool debug;
bool input_check = 0;
long long int event_ts;
int last_event;
Display* d;
Window w;
XEvent e;
// cross-platform sleep function
void sleep_ms(int milliseconds) {
#ifdef WIN32
Sleep(milliseconds);
#elif _POSIX_C_SOURCE >= 199309L
struct timespec ts;
ts.tv_sec = milliseconds / 1000;
ts.tv_nsec = (milliseconds % 1000) * 1000000;
nanosleep(&ts, NULL);
#else
usleep(milliseconds * 1000);
#endif
}
char *trimwhitespace(char *str){
char *end;
// Trim leading space
while(isspace((unsigned char)*str)) str++;
if(*str == 0) // All spaces?
return str;
// Trim trailing space
end = str + strlen(str) - 1;
while(end > str && isspace((unsigned char)*end)) end--;
// Write new null terminator character
end[1] = '\0';
return str;
}
int check_caret(){
int caretint;
char * fpname;
fpname = malloc(sizeof(char)*20);
strcpy(fpname,"/tmp/kinto/caret");
if( access( fpname, F_OK ) != -1 ) {
char *buffer = NULL;
size_t size = 0;
FILE *fp = fopen(fpname, "r");
if (fp == NULL){
return (0);
}
fseek(fp, 0, SEEK_END);
size = ftell(fp);
rewind(fp);
buffer = malloc((size + 1) * sizeof(*buffer));
fread(buffer, size, 1, fp);
buffer[size] = '\0';
trimwhitespace(buffer);
caretint = atoi(buffer);
fclose(fp);
if(caretint == 1){
// printf("caret: %s\n", buffer);
return 1;
}
// printf("found nothing\n");
return 0;
}
else{
// printf("file %s does not exist\n",fpname);
return 0;
}
}
void *inputToggle(void *argStruct) {
ThreadArgs args = argStruct;
char * onInput;
char * offInput;
onInput = malloc(sizeof(char)*400);
offInput = malloc(sizeof(char)*400);
onInput = args->run_onInput;
offInput = args->run_offInput;
Bool ran_onInput = 0;
while(input_check){
if(check_caret() && ran_onInput == 0){
if(debug == true){
printf("run_onInput: %s\n",onInput);
}
system(onInput);
ran_onInput = 1;
}
else if(!check_caret() && ran_onInput == 1){
if(debug == true){
printf("run_offInput: %s\n",offInput);
}
system(offInput);
ran_onInput = 0;
}
sleep_ms(100);
}
pthread_exit(NULL);
}
void *nextPlease(void *threadid) {
long tid;
tid = (long)threadid;
// printf("Next Please Thread ID, %ld\n", tid);
// Reference http://www.rahul.net/kenton/xproto/xevents_errors.html
// event type 17 - DestroyNotify
// event type 18 - UnmapNotify
// event type 22 - ConfigureNotify
// Dismiss the following events by initiating another XNextEvent
XNextEvent(d, &e);
while(e.type != ConfigureNotify || (e.type == ConfigureNotify && last_event == ConfigureNotify && timeInMilliseconds()-event_ts < 419)){
XNextEvent(d, &e);
}
// Unset input thread
input_check = 0;
last_event = e.type;
if(debug == true){
printf(" event: %s %d\n",eventNames[e.type-1],e.type);
printf(" duration: %lldms\n",timeInMilliseconds()-event_ts);
}
event_ts = timeInMilliseconds();
pthread_exit(NULL);
}
char * append(char * string1, char * string2){
char * result = NULL;
asprintf(&result, "%s,%s", string1, string2);
return result;
}
static int wait_fd(int fd, double seconds){
struct timeval tv;
fd_set in_fds;
FD_ZERO(&in_fds);
FD_SET(fd, &in_fds);
tv.tv_sec = trunc(seconds);
tv.tv_usec = (seconds - trunc(seconds))*1000000;
return select(fd+1, &in_fds, 0, 0, &tv);
}
Bool xerror = False;
int in_int(int a[],int size,int item){
int i,pos=-1;
for(i=0;i< size;i++)
{
if(a[i]==item)
{
pos=i;
break;
}
}
return pos;
}
int in(const char **arr, int len, char *target) {
int i;
for(i = 0; i < len; i++) {
if(strncmp(arr[i], target, strlen(target)) == 0) {
return i;
}
}
return -1;
}
int strcicmp(char const *a, char const *b){
for (;; a++, b++) {
int d = tolower((unsigned char)*a) - tolower((unsigned char)*b);
if (d != 0 || !*a)
return d;
}
}
Display* open_display(){
int i;
Display* d = XOpenDisplay(NULL);
for (i = 0; i < 60; i++) {
if(d == NULL){
printf("fail to open X server display...\n");
}
else{
break;
}
sleep(1);
}
if(d == NULL){
printf("fail to open X server display for 1 minute...\n");
printf("Kintox11 is now exiting...\n");
exit(1);
}
return d;
}
int handle_error(Display* display, XErrorEvent* error){
printf("X11 error: type=%d, serial=%lu, code=%d\n",
error->type, error->serial, (int)error->error_code);
xerror = True;
return 1;
}
Window get_focus_window(Display* d, int etype, char const *eventName, char const *current_app, bool debug){
Window w;
int revert_to;
if(debug == true){
printf("\n get focus window\n");
}
if(!(etype == DestroyNotify || etype == UnmapNotify)) {
XGetInputFocus(d, &w, &revert_to); // see man
if(debug == true){
printf(" -%s: event: %d, window_id: %ld\n",current_app,etype,w);
}
}
if(xerror){
printf("*Error getting focused window, e.type: %d, current_app: %s\n",etype,current_app);
exit(1);
}else if(w == None){
printf("*no focus window, e.type: %d, current_app: %s\n",etype,current_app);
exit(1);
}
return w;
}
// get the top window.
// a top window have the following specifications.
// * the start window is contained the descendent windows.
// * the parent window is the root window.
Window get_top_window(Display* d, Window start, int etype, char const *eventName, char const *current_app, bool debug){
Window w = start;
Window parent = start;
Window root = None;
Window *children;
unsigned int nchildren;
Status s;
char * ws;
char * wstr;
ws = malloc(sizeof(char)*4096);
wstr = malloc(sizeof(char)*100);
// strcpy(wstr,"test,");
if(debug == true){
printf("\n get top window\n");
}
// Checking for Destroy and Unmap Notify events here too
// Sometimes they still get passed through and if so need
// to be ignored or XQueryTree will cause a segmentation fault
while (parent != root && parent != 0 && !(etype == DestroyNotify || etype == UnmapNotify)) {
w = parent;
s = XQueryTree(d, w, &root, &parent, &children, &nchildren); // see man
sprintf(wstr, "%ld", w);
if ((ws != NULL) && (ws[0] == '\0')) {
strcpy(ws,wstr);
}
else{
ws = append(ws, wstr);
}
if (s)
XFree(children);
if(xerror){
printf("*fail to get top window: %ld, e.type: %d, current_app: %s\n",w,etype,current_app);
break;
}
}
if(debug == true){
printf(" -%s: event: %d, window_id: %s\n",current_app,etype,ws);
}
return w;
}
// search a named window (that has a WM_STATE prop)
// on the descendent windows of the argment Window.
Window get_named_window(Display* d, Window start, int etype, char const *eventName, char const *current_app, bool debug){
Window w;
if(debug == true){
printf("\n get named window\n");
}
// printf("getting named window ... ");
w = XmuClientWindow(d, start); // see man
if(debug == true){
printf(" -%s: event: %d, window_id: %ld\n\n",current_app,etype,w);
}
// if(w == start)
// printf("fail\n");
// printf("success (window: %d)\n", (int) w);
return w;
}
const char * str_window_class(Display* d, Window w, char *prior_app ){
Status s;
XClassHint* class;
class = XAllocClassHint(); // see man
if(xerror){
// printf("ERROR: XAllocClassHint\n");
}
s = XGetClassHint(d, w, class); // see man
if(xerror || s){
char * app_class;
app_class = malloc(sizeof(char)*100);
strcpy(app_class,class->res_class);
// printf("\tname: %s\n\tclass: %s\n", class->res_name, class->res_class);
return app_class;
}else{
// char * error_msg;
// error_msg = malloc(sizeof(char)*50);
// strcpy(error_msg, "ERROR: XGetClassHint");
return prior_app;
}
}
int main(int argc, char *argv[]){
XInitThreads();
if(argc < 2){
debug = false;
}
if(argc > 1 && (strcmp(argv[1], "-d") == 0 || strcmp(argv[1], "--debug") == 0 )){
debug = true;
printf("Running in debug mode\n");
}
FILE *fp;
char buffer[10240];
struct json_object *parsed_json, *config, *config_obj,
*config_obj_name, *config_obj_run, *config_obj_run_oninput,
*config_obj_run_offinput, *config_obj_de, *config_obj_appnames,
*appnames_obj, *init, *de, *de_obj, *de_obj_id, *de_obj_active,
*de_obj_run, *de_obj_runterm,*de_obj_rungui;
int arraylen;
int appnames_len, init_len, de_len, config_de_len;
int system(const char *command);
size_t i,n,r;
printf("Importing user_config.json...\n");
fp = fopen("user_config.json","r");
fread(buffer, 10240, 1, fp);
fclose(fp);
parsed_json = json_tokener_parse(buffer);
config = json_object_object_get(parsed_json, "config");
init = json_object_object_get(parsed_json, "init");
de = json_object_object_get(parsed_json, "de");
arraylen = json_object_array_length(config);
init_len = json_object_array_length(init);
de_len = json_object_array_length(de);
const char *name_array[arraylen];
const char *run_array[arraylen];
const char *run_oninput_array[arraylen];
const char *run_offinput_array[arraylen];
int init_array[init_len];
int de_id_array[de_len];
Bool de_active_array[de_len];
const char *de_run_array[de_len];
const char *de_runterm_array[de_len];
const char *de_rungui_array[de_len];
// Grab all de variable info needed
for (i = 0; i < de_len; i++) {
de_obj = json_object_array_get_idx(de, i);
de_obj_id = json_object_object_get(de_obj, "id");
de_id_array[i] = json_object_get_int(de_obj_id);
de_obj_active = json_object_object_get(de_obj, "active");
de_active_array[i] = json_object_get_int(de_obj_active);
de_obj_run = json_object_object_get(de_obj, "run");
de_run_array[i] = json_object_get_string(de_obj_run);
de_obj_runterm = json_object_object_get(de_obj, "run_term");
de_runterm_array[i] = json_object_get_string(de_obj_runterm);
de_obj_rungui = json_object_object_get(de_obj, "run_gui");
de_rungui_array[i] = json_object_get_string(de_obj_rungui);
// printf("de_run_array[%ld]: %s\n",i,de_run_array[i]);
}
// de ends
int appnames_max = 0;
int config_de_max = 0;
for (i = 0; i < arraylen; i++) {
config_obj = json_object_array_get_idx(config, i);
config_obj_appnames = json_object_object_get(config_obj, "appnames");
config_obj_de = json_object_object_get(config_obj, "de");
appnames_len = json_object_array_length(config_obj_appnames);
if (appnames_len > appnames_max){
appnames_max = appnames_len;
}
config_de_len = json_object_array_length(config_obj_de);
if(config_de_len > config_de_max){
config_de_max = config_de_len;
}
}
const char *appnames_array[arraylen][appnames_max];
int config_de_array[arraylen][config_de_max];
for (i = 0; i < arraylen; i++) {
config_obj = json_object_array_get_idx(config, i);
config_obj_name = json_object_object_get(config_obj, "name");
config_obj_run = json_object_object_get(config_obj, "run");
config_obj_run_oninput = json_object_object_get(config_obj, "run_onInput");
config_obj_run_offinput = json_object_object_get(config_obj, "run_offInput");
name_array[i] = json_object_get_string(config_obj_name);
run_array[i] = json_object_get_string(config_obj_run);
run_oninput_array[i] = json_object_get_string(config_obj_run_oninput);
run_offinput_array[i] = json_object_get_string(config_obj_run_offinput);
// printf("%s\n%s\n", json_object_get_string(config_obj_name), json_object_get_string(config_obj_run));
config_obj_appnames = json_object_object_get(config_obj, "appnames");
appnames_len = json_object_array_length(config_obj_appnames);
for (n = 0; n < appnames_len; n++) {
// printf("name_array[i]: %s\n",name_array[i]);
if(!strcicmp(name_array[i], "gui")){
appnames_array[i][n] = NULL;
// printf("%s i:%ld n:%ld %s\n",name_array[i],i,n,appnames_array[i][n]);
}
else{
appnames_array[i][n] = json_object_get_string(json_object_array_get_idx(config_obj_appnames, n));
//printf("%s i:%ld n:%ld %s\n",name_array[i],i,n,appnames_array[i][n]);
}
}
if(appnames_max > appnames_len){
for (n = appnames_len; n < appnames_max; n++){
appnames_array[i][n] = NULL;
//printf("%s i:%ld n:%ld %s\n",name_array[i],i,n,appnames_array[i][n]);
}
}
config_obj_de = json_object_object_get(config_obj, "de");
config_de_len = json_object_array_length(config_obj_de);
for (n = 0; n < config_de_max; n++) {
if(n < config_de_len){
// printf("de value: %d\n",json_object_get_int(json_object_array_get_idx(config_obj_de, n)));
config_de_array[i][n] = json_object_get_int(json_object_array_get_idx(config_obj_de, n));
}
else{
// printf("de -1 value: %d\n",json_object_get_int(json_object_array_get_idx(config_obj_de, n)));
config_de_array[i][n] = -1;
}
}
}
printf("Data from user_config.json imported successfully.\n");
for (i = 0; i < init_len; i++) {
init_array[i] = json_object_get_int(json_object_array_get_idx(init, i));
int de_id_idx = in_int(de_id_array, de_len, init_array[i]);
printf("Running init command: %s\n",de_run_array[de_id_idx]);
system(de_run_array[de_id_idx]);
}
char *name;
// for XmbTextPropertyToTextList
setlocale(LC_ALL, ""); // see man locale
d = open_display();
XSelectInput(d, DefaultRootWindow(d), SubstructureNotifyMask);
XSetErrorHandler(handle_error);
char * run_normal;
char * run_onInput;
char * run_offInput;
char * prior_app;
char * current_app;
char * prior_category;
char * current_category;
run_onInput = malloc(sizeof(char)*400);
run_offInput = malloc(sizeof(char)*400);
run_normal = malloc(sizeof(char)*400);
prior_app = malloc(sizeof(char)*100);
current_app = malloc(sizeof(char)*100);
prior_category = malloc(sizeof(char)*100);
current_category = malloc(sizeof(char)*100);
strcpy(prior_app,"none");
strcpy(prior_category,"none");
int remap_bool = 2;
printf("Starting keyswap...\n");
// get active window
w = get_focus_window(d, 0, eventNames[0], current_app, debug);
w = get_top_window(d, w, 0, eventNames[0], current_app, debug);
w = get_named_window(d, w, 0, eventNames[0], current_app, debug);
// XFetchName(d, w, &name);
// printf("window:%#x name:%s\n", w, name);
printf("First window name: %s \n\n",str_window_class(d, w,prior_app));
int breakouter;
last_event=0;
event_ts = timeInMilliseconds();
for (;;)
{
strcpy(current_app,str_window_class(d, w,prior_app));
int category_idx;
// printf("current: %s\n",current_app);
breakouter = 0;
// Cycle through category name array
// printf("%d\n",arraylen);
for(i = 0; i < arraylen; ++i){
// Cycle through the maximum App name array in each category
for(n = 0; n < appnames_max; ++n){
if (appnames_array[i][n] != NULL){
// printf("%s\n",appnames_array[i][n]);
if(strcicmp(appnames_array[i][n], current_app) == 0){
strcpy(current_category,name_array[i]);
category_idx = i;
// printf("Match found: %s: %s\n",current_category,current_app);
breakouter = 1;
break;
}
}
else if(i == arraylen-1 && breakouter==0){
// printf("No match found, default to gui");
strcpy(current_category,"gui");
category_idx = in(name_array, arraylen, current_category);
// printf("Match found: %s: %s\n",current_category,current_app);
break;
}
else if(appnames_array[i][n] == NULL){
break;
}
if(breakouter==1){
break;
}
}
}
if(strcicmp(prior_category, current_category) != 0){
// printf("prior: %s, current: %s\n",prior_category,current_category);
// printf("%d,%d,%d,%d\n",strcicmp(prior_category, "gui"),strcicmp(current_category, "firefox"),strcicmp(current_category, "gui"),strcicmp(prior_category, "firefox"));
// printf("%d,%d\n",(strcicmp(prior_category, "gui") != 0 && strcicmp(prior_category, "firefox") != 0),(strcicmp(current_category, "gui") != 0 && strcicmp(current_category, "firefox") != 0));
printf("%s: %s\n",current_category,current_app);
// Make sure we're not switching between 2 GUI keymaps
// Firefox & Standard GUI apps
// strcicmp returns 0 for matches, <>0 for non-match
if((strcicmp(prior_category, "gui") != 0 && strcicmp(prior_category, "firefox") != 0) || (strcicmp(current_category, "gui") != 0 && strcicmp(current_category, "firefox") != 0)){
if(debug == true){
printf("run: %s\n",run_array[category_idx]);
}
system(run_array[category_idx]);
}
strcpy(run_normal,run_array[category_idx]);
strcpy(run_onInput,run_oninput_array[category_idx]);
strcpy(run_offInput,run_offinput_array[category_idx]);
system(run_offInput);
for(r = 0; r < config_de_max; r++){
if(config_de_array[category_idx][r] != -1){
int de_id_idx = in_int(de_id_array, de_len, config_de_array[category_idx][r]);
if(strcicmp(current_category, "term") == 0){
if(debug == true){
printf("Running de term command: %s\n",de_runterm_array[de_id_idx]);
}
system(de_runterm_array[de_id_idx]);
}
else{
if(debug == true){
printf("Running de gui command: %s\n",de_rungui_array[de_id_idx]);
}
system(de_rungui_array[de_id_idx]);
}
}
}
}
else if(strcicmp(prior_app, current_app) != 0){
int indent = strlen(current_category)+2;
printf("%*c%s\n", indent, ' ',current_app);
}
fflush(stdout);
strcpy(prior_app,current_app);
strcpy(prior_category,current_category);
if(strlen(run_onInput) > 0){
input_check = 1;
}
else{
input_check = 0;
}
pthread_t threads[NUM_THREADS];
int rc;
int i;
ThreadArgs args = (ThreadArgs)malloc(sizeof(struct threadArgs));
args->run_onInput = run_onInput;
args->run_offInput = run_offInput;
for( i = 0; i < NUM_THREADS; i++ ) {
if(i==0){
rc = pthread_create(&threads[i], NULL, inputToggle, args);
}
else{
rc = pthread_create(&threads[i], NULL, nextPlease, (void *)&i);
}
if (rc) {
printf("Error:unable to create thread, %d\n", rc);
exit(-1);
}
}
// wait for threads to close before continuing
for (int i = 0; i < NUM_THREADS; i++) {
pthread_join(threads[i], NULL);
}
w = get_focus_window(d, e.type, eventNames[e.type-1], current_app, debug);
w = get_top_window(d, w, e.type, eventNames[e.type-1], current_app, debug);
w = get_named_window(d, w, e.type, eventNames[e.type-1], current_app, debug);
}
}

7
linux/gnome_logoff.sh Executable file
View File

@@ -0,0 +1,7 @@
#!/bin/bash
dbus-monitor --session "type='signal',interface='org.gnome.SessionManager.Logout'" | grep '1' |
while read x; do
# echo "$x"
sudo systemctl stop xkeysnail
exit 0
done

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.0 KiB

BIN
linux/gui/keys_1200x720.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.4 KiB

1484
linux/gui/kinto-gui.py Executable file

File diff suppressed because it is too large Load Diff

11
linux/gui/kinto.desktop Executable file
View File

@@ -0,0 +1,11 @@
[Desktop Entry]
# /.local/share/applications
Name=Kinto.sh
GenericName=Kinto.sh
Categories=Utility;
Type=Application
Exec=/usr/bin/python3 {homedir}/.config/kinto/gui/kinto-gui.py
Icon={homedir}/.config/kinto/kinto-color-48.svg
# Icon=/usr/share/icons/Pocillo/kinto-color.svg
Terminal=false
NoDisplay=false

BIN
linux/gui/tuxbg.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 111 KiB

BIN
linux/gui/tuxcry4.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 65 KiB

BIN
linux/gui/tuxerror.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 172 KiB

BIN
linux/gui/tuxuninstall.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 94 KiB

40
linux/initkb Normal file
View File

@@ -0,0 +1,40 @@
kbtype = ask
rightmod = true
vsc2st3 = false
capslock = default
systray = true
autostart = true
#
# kbtype - ask|win|mac|ibm|cbk|wmk
#
# What physical keyboard type does the user have?
# ask - Prompt the user
# win - Standard layout Ctrl, Win, Alt, Spacebar
# mac - Mac layout Ctrl, Alt, Cmd, Spacebar
# ibm - Model M layout Ctrl, Alt, Spacebar (Capslock is Capslock)
# cbk - Chromebook layout Ctrl, Alt, Spacebar (Capslock is Search (Win))
# wmk - WinMac layout
# wmk - Uses Apple driver to swap Cmd & Alt so
# swapping between Win & Mac keyboards is seamless.
#
# rightmod - Remap modifiers on right
# true (default)
#
# ^ Note: Useful to set to false for multi-language users (aka AltGr)
#
# vsc2st3 - Remap VS Code to use Sublime Text keymap
# false (default)
#
# capslock - esc_cmd|cmd|default
# esc_cmd - escape if tapped, cmd if held
# cmd - remaps to cmd
# default - no remap
#
# systray - Sets whether the system tray will show
# true - default
# false - only defaults on gnome3 and kde
#
# autostart - Sets whether or not kinto will automatically start
# true - deefault
#

20
linux/killdups.sh Executable file
View File

@@ -0,0 +1,20 @@
#!/bin/bash
xkeycount=$(pgrep 'xkeysnail' | wc -l)
if [[ $xkeycount -le 1 ]]; then
# No dups found
exit 0
fi
while ! zenity --entry --title="Kinto Duplicates" --text="Type Password to end duplicates:" --hide-text| sudo -S cat /dev/null >/dev/null; do
if ! $(zenity --question --text="Wrong password, try again?"); then
# Dups still exist
exit 1
fi
done
# pgrep 'xkeysnail' | head -n -1 | xargs -r -n1 sudo kill
pgrep 'xkeysnail' | xargs -r -n1 sudo kill
sudo -K # remove privilege
# No dups should exist
exit 0

57
linux/kinto-service.sh Executable file
View File

@@ -0,0 +1,57 @@
#!/bin/bash
#
# chkconfig: 35 90 12
# description: Kinto service
#
# Get function from functions library
# . /etc/init.d/functions
# Start the service
start() {
echo -n "Starting Kinto (xkeynsail)" | logger
xkeycount=$(pgrep 'xkeysnail' | wc -l)
if [[ $xkeycount -eq 0 ]]; then
/usr/bin/xhost +SI:localuser:root && script -q -c "xkeysnail --quiet --watch `echo $HOME`/.config/kinto/kinto.py" /dev/null | tee -a /tmp/kinto.log &
### Create the lock file ###
touch /var/lock/subsys/kinto
success $"Kinto (xkeynsail) started"
else
echo "Kinto (xkeynsail) service is already running."
fi
echo
}
# Restart the service
stop() {
echo -n "Stopping Kinto (xkeynsail)" | logger
sudo pkill -f bin/xkeysnail >/dev/null 2>&1
### Now, delete the lock file ###
rm -f /var/lock/subsys/kinto
echo
}
### main logic ###
case "$1" in
start)
start
;;
stop)
stop
;;
status)
status
;;
restart|reload|condrestart)
stop
sleep 5
start
;;
*)
echo $"Usage: $0 {start|stop|restart|reload|status}"
exit 1
esac
exit 0

797
linux/kinto.py Executable file
View File

@@ -0,0 +1,797 @@
# -*- coding: utf-8 -*-
# autostart = true
import re
from xkeysnail.transform import *
# Use the following for testing terminal keymaps
# terminals = [ "", ... ]
# xbindkeys -mk
terminals = [
"alacritty",
"cutefish-terminal",
"deepin-terminal",
"eterm",
"gnome-terminal",
"guake",
"hyper",
"io.elementary.terminal",
"kinto-gui.py",
"kitty",
"konsole",
"lxterminal",
"mate-terminal",
"qterminal",
"st",
"sakura",
"station",
"tabby",
"terminator",
"termite",
"tilda",
"tilix",
"urxvt",
"xfce4-terminal",
"xterm",
]
terminals = [term.casefold() for term in terminals]
termStr = "|".join(str('^'+x+'$') for x in terminals)
mscodes = ["code","vscodium"]
codeStr = "|".join(str('^'+x+'$') for x in mscodes)
# Add remote desktop clients & VM software here
# Ideally we'd only exclude the client window,
# but that may not be easily done.
remotes = [
"Gnome-boxes",
"org.remmina.Remmina",
"remmina",
"qemu-system-.*",
"qemu",
"Spicy",
"Virt-manager",
"VirtualBox",
"VirtualBox Machine",
"xfreerdp",
]
remotes = [client.casefold() for client in remotes]
# Add remote desktop clients & VMs for no remapping
terminals.extend(remotes)
mscodes.extend(remotes)
# Use for browser specific hotkeys
browsers = [
"Chromium",
"Chromium-browser",
"Discord",
"Epiphany",
"Firefox",
"Firefox Developer Edition",
"Navigator",
"firefoxdeveloperedition",
"Waterfox",
"Google-chrome",
"microsoft-edge",
"microsoft-edge-dev",
]
browsers = [browser.casefold() for browser in browsers]
browserStr = "|".join(str('^'+x+'$') for x in browsers)
chromes = [
"Chromium",
"Chromium-browser",
"Google-chrome",
"microsoft-edge",
"microsoft-edge-dev",
]
chromes = [chrome.casefold() for chrome in chromes]
chromeStr = "|".join(str('^'+x+'$') for x in chromes)
# edges = ["microsoft-edge-dev","microsoft-edge"]
# edges = [edge.casefold() for edge in edges]
# edgeStr = "|".join(str('^'+x+'$') for x in edges)
define_multipurpose_modmap(
# {Key.ENTER: [Key.ENTER, Key.RIGHT_CTRL] # Enter2Cmd
# {Key.CAPSLOCK: [Key.ESC, Key.RIGHT_CTRL] # Caps2Esc
# {Key.LEFT_META: [Key.ESC, Key.RIGHT_CTRL] # Caps2Esc - Chromebook
{ # Placeholder
})
# Fix for avoiding modmapping when using Synergy keyboard/mouse sharing.
# Synergy doesn't set a wm_class, so this may cause issues with other
# applications that also don't set the wm_class.
# Enable only if you use Synergy.
# define_conditional_modmap(lambda wm_class: wm_class == '', {})
# [Global modemap] Change modifier keys as in xmodmap
define_conditional_modmap(lambda wm_class: wm_class.casefold() not in terminals,{
# Key.CAPSLOCK: Key.RIGHT_CTRL, # Caps2Cmd
# Key.LEFT_META: Key.RIGHT_CTRL, # Caps2Cmd - Chromebook
# - IBM
# Key.LEFT_ALT: Key.RIGHT_CTRL, # IBM
# Key.LEFT_CTRL: Key.LEFT_ALT, # IBM
# Key.CAPSLOCK: Key.LEFT_META, # IBM
# Key.RIGHT_ALT: Key.RIGHT_CTRL, # IBM - Multi-language (Remove)
# Key.RIGHT_CTRL: Key.RIGHT_ALT, # IBM - Multi-language (Remove)
# - Chromebook
# Key.LEFT_ALT: Key.RIGHT_CTRL, # Chromebook
# Key.LEFT_CTRL: Key.LEFT_ALT, # Chromebook
# Key.RIGHT_ALT: Key.RIGHT_CTRL, # Chromebook - Multi-language (Remove)
# Key.RIGHT_CTRL: Key.RIGHT_ALT, # Chromebook - Multi-language (Remove)
# - Default Mac/Win
# - Default Win
# Key.LEFT_ALT: Key.RIGHT_CTRL, # WinMac
# Key.LEFT_META: Key.LEFT_ALT, # WinMac
# Key.LEFT_CTRL: Key.LEFT_META, # WinMac
# Key.RIGHT_ALT: Key.RIGHT_CTRL, # WinMac - Multi-language (Remove)
# Key.RIGHT_META: Key.RIGHT_ALT, # WinMac - Multi-language (Remove)
# Key.RIGHT_CTRL: Key.RIGHT_META, # WinMac - Multi-language (Remove)
# - Mac Only
# Key.LEFT_META: Key.RIGHT_CTRL, # Mac
# Key.LEFT_CTRL: Key.LEFT_META, # Mac
# Key.RIGHT_META: Key.RIGHT_CTRL, # Mac - Multi-language (Remove)
# Key.RIGHT_CTRL: Key.RIGHT_META, # Mac - Multi-language (Remove)
})
# [Conditional modmap] Change modifier keys in certain applications
define_conditional_modmap(re.compile(termStr, re.IGNORECASE), {
# - IBM
# Key.LEFT_ALT: Key.RIGHT_CTRL, # IBM
# # Left Ctrl Stays Left Ctrl
# Key.CAPSLOCK: Key.LEFT_ALT, # IBM
# Key.RIGHT_ALT: Key.RIGHT_CTRL, # IBM - Multi-language (Remove)
# Key.RIGHT_CTRL: Key.RIGHT_ALT, # IBM
# # Right Meta does not exist on chromebooks
# Key.RIGHT_ALT: Key.RIGHT_CTRL, # IBM - Multi-language (Remove)
# Key.RIGHT_CTRL: Key.RIGHT_ALT, # IBM - Multi-language (Remove)
# - Chromebook
# Key.LEFT_ALT: Key.RIGHT_CTRL, # Chromebook
# # Left Ctrl Stays Left Ctrl
# Key.LEFT_META: Key.LEFT_ALT, # Chromebook
# Key.RIGHT_ALT: Key.RIGHT_CTRL, # Chromebook - Multi-language (Remove)
# Key.RIGHT_CTRL: Key.RIGHT_ALT, # Chromebook
# # Right Meta does not exist on chromebooks
# - Default Mac/Win
# - Default Win
# Key.LEFT_ALT: Key.RIGHT_CTRL, # WinMac
# Key.LEFT_META: Key.LEFT_ALT, # WinMac
# Key.LEFT_CTRL: Key.LEFT_CTRL, # WinMac
# Key.RIGHT_ALT: Key.RIGHT_CTRL, # WinMac - Multi-language (Remove)
# Key.RIGHT_META: Key.RIGHT_ALT, # WinMac - Multi-language (Remove)
# Key.RIGHT_CTRL: Key.LEFT_CTRL, # WinMac - Multi-language (Remove)
# - Mac Only
# Key.LEFT_META: Key.RIGHT_CTRL, # Mac
# # Left Ctrl Stays Left Ctrl
# Key.RIGHT_META: Key.RIGHT_CTRL, # Mac - Multi-language (Remove)
# Key.RIGHT_CTRL: Key.LEFT_CTRL, # Mac - Multi-language (Remove)
})
# Keybindings for IntelliJ
define_keymap(re.compile("^jetbrains-(?!.*toolbox).*$", re.IGNORECASE),{
# General
K("C-Key_0"): K("M-Key_0"), # Open corresponding tool window
K("C-Key_1"): K("M-Key_1"), # Open corresponding tool window
K("C-Key_2"): K("M-Key_2"), # Open corresponding tool window
K("C-Key_3"): K("M-Key_3"), # Open corresponding tool window
K("C-Key_4"): K("M-Key_4"), # Open corresponding tool window
K("C-Key_5"): K("M-Key_5"), # Open corresponding tool window
K("C-Key_6"): K("M-Key_6"), # Open corresponding tool window
K("C-Key_7"): K("M-Key_7"), # Open corresponding tool window
K("C-Key_8"): K("M-Key_8"), # Open corresponding tool window
K("C-Key_9"): K("M-Key_9"), # Open corresponding tool window
K("Super-Grave"): K("C-Grave"), # Quick switch current scheme
K("C-Comma"): K("C-M-s"), # Open Settings dialog
K("C-Semicolon"): K("C-M-Shift-s"), # Open Project Structure dialog
# Debugging
K("C-M-r"): K("F9"), # Resume program
# Search/Replace
K("C-g"): K("F3"), # Find next
K("C-Shift-F3"): K("Shift-F3"), # Find previous
K("Super-g"): K("M-j"), # Select next occurrence
K("C-Super-g"): K("C-M-Shift-j"), # Select all occurrences
K("Super-Shift-g"): K("M-Shift-j"), # Unselect occurrence
# Editing
K("Super-Space"): K("LC-Space"), # Basic code completion
K("Super-Shift-Space"): K("LC-Shift-Space"),# Smart code completion
K("Super-j"): K("C-q"), # Quick documentation lookup
K("C-n"): K("M-Insert"), # Generate code...
K("Super-o"): K("C-o"), # Override methods
K("Super-i"): K("C-i"), # Implement methods
K("M-Up"): K("C-w"), # Extend selection
K("M-Down"): K("C-Shift-w"), # Shrink selection
K("Super-Shift-q"): K("M-q"), # Context info
K("Super-M-o"): K("C-M-o"), # Optimize imports
K("Super-M-i"): K("C-M-i"), # Auto-indent line(s)
K("C-Backspace"): K("C-y"), # Delete line at caret
K("Super-Shift-j"): K("C-Shift-j"), # Smart line join
K("M-Delete"): K("C-Delete"), # Delete to word end
K("M-Backspace"): K("C-Backspace"), # Delete to word start
K("C-Shift-Equal"): K("C-KPPLUS"), # Expand code block
K("C-Minus"): K("C-KPMINUS"), # Collapse code block
K("C-Shift-Equal"): K("C-Shift-KPPLUS"), # Expand all
K("C-Shift-Minus"): K("C-Shift-KPMINUS"), # Collapse all
K("C-w"): K("C-F4"), # Close active editor tab
# Refactoring
K("C-Delete"): K("M-Delete"), # Safe Delete
K("C-T"): K("C-M-Shift-t"), # Refactor this
# Navigation
K("C-o"): K("C-n"), # Go to class
K("C-Shift-o"): K("C-Shift-n"), # Go to file
K("C-M-o"): K("C-M-Shift-n"), # Go to symbol
K("Super-Right"): K("M-Right"), # Go to next editor tab
K("Super-Left"): K("M-Left"), # Go to previous editor tab
K("C-l"): K("C-g"), # Go to line
K("M-Space"): K("C-Shift-i"), # Open quick definition lookup
K("C-Y"): K("C-Shift-i"), # Open quick definition lookup
K("Super-Shift-b"): K("C-Shift-b"), # Go to type declaration
K("Super-Up"): K("M-Up"), # Go to previous
K("Super-Down"): K("M-Down"), # Go to next method
K("Super-h"): K("C-h"), # Type hierarchy
K("Super-M-h"): K("C-M-h"), # Call hierarchy
K("C-Down"): K("C-Enter"), # Edit source/View source
K("M-Home"): K("M-Home"), # Show navigation bar
K("F2"): K("F11"), # Toggle bookmark
K("Super-F3"): K("C-F11"), # Toggle bookmark with mnemonic
K("Super-Key_0"): K("C-Key_0"), # Go to numbered bookmark
K("Super-Key_1"): K("C-Key_1"), # Go to numbered bookmark
K("Super-Key_2"): K("C-Key_2"), # Go to numbered bookmark
K("Super-Key_3"): K("C-Key_3"), # Go to numbered bookmark
K("Super-Key_4"): K("C-Key_4"), # Go to numbered bookmark
K("Super-Key_5"): K("C-Key_5"), # Go to numbered bookmark
K("Super-Key_6"): K("C-Key_6"), # Go to numbered bookmark
K("Super-Key_7"): K("C-Key_7"), # Go to numbered bookmark
K("Super-Key_8"): K("C-Key_8"), # Go to numbered bookmark
K("Super-Key_9"): K("C-Key_9"), # Go to numbered bookmark
K("C-F3"): K("Shift-F11"), # Show bookmarks
# Compile and Run
K("Super-M-r"): K("M-Shift-F10"), # Select configuration and run
K("Super-M-d"): K("M-Shift-F9"), # Select configuration and debug
K("Super-r"): K("Shift-F10"), # Run
K("Super-d"): K("Shift-F9"), # Debug
K("Super-Shift-r"): K("C-Shift-F10"), # Run context configuration from editor
K("Super-Shift-d"): K("C-Shift-F9"), # Debug context configuration from editor
# VCS/Local History
K("Super-v"): K("M-Grave"), # VCS quick popup
K("Super-c"): K("LC-c"), # Sigints - interrupt
},"Jetbrains")
##############################################
### START OF FILE MANAGER GROUP OF KEYMAPS ###
##############################################
# Keybindings overrides for Caja
# (overrides some bindings from general file manager code block below)
define_keymap(re.compile("caja", re.IGNORECASE),{
# K("RC-Super-o"): K("RC-Shift-Enter"), # Open in new tab
K("RC-Super-o"): K("RC-Shift-W"), # Open in new window
},"Overrides for Caja - Finder Mods")
# Keybindings overrides for DDE (Deepin) File Manager
# (overrides some bindings from general file manager code block below)
define_keymap(re.compile("dde-file-manager", re.IGNORECASE),{
K("RC-i"): K("RC-i"), # File properties dialog (Get Info)
K("RC-comma"): None, # Disable preferences shortcut (no shortcut available)
K("RC-Up"): K("RC-Up"), # Go Up dir
K("RC-Shift-Left_Brace"): K("C-Shift-Tab"), # Go to prior tab
K("RC-Shift-Right_Brace"): K("C-Tab"), # Go to next tab
K("RC-Shift-Left"): K("C-Shift-Tab"), # Go to prior tab
K("RC-Shift-Right"): K("C-Tab"), # Go to next tab
},"Overrides for DDE File Manager - Finder Mods")
# Keybindings overrides for Dolphin
# (overrides some bindings from general file manager code block below)
define_keymap(re.compile("dolphin", re.IGNORECASE),{
K("RC-KEY_2"): K("C-KEY_3"), # View as List (Detailed)
K("RC-KEY_3"): K("C-KEY_2"), # View as List (Compact)
##########################################################################################
### "Open in new window" requires manually setting custom shortcut of Ctrl+Shift+o
### in Dolphin's keyboard shortcuts. There is no default shortcut set for this function.
##########################################################################################
### "Open in new tab" requires manually setting custom shortcut of Ctrl+Shift+o in
### Dolphin's keyboard shortcuts. There is no default shortcut set for this function.
##########################################################################################
K("RC-Super-o"): K("RC-Shift-o"), # Open in new window (or new tab, user's choice, see above)
K("RC-Shift-N"): K("F10"), # Create new folder
K("RC-comma"): K("RC-Shift-comma"), # Open preferences dialog
},"Overrides for Dolphin - Finder Mods")
# Keybindings overrides for elementary OS Files (Pantheon)
# (overrides some bindings from general file manager code block below)
define_keymap(re.compile("io.elementary.files", re.IGNORECASE),{
# K("RC-Super-o"): K("Shift-Enter"), # Open folder in new tab
K("RC-comma"): None, # Disable preferences shortcut since none available
},"Overrides for Pantheon - Finder Mods")
# Keybindings overrides for Nautilus
# (overrides some bindings from general file manager code block below)
define_keymap(re.compile("org.gnome.nautilus|nautilus", re.IGNORECASE),{
# K("RC-N"): K("C-M-Space"), # macOS Finder search window shortcut Cmd+Option+Space
# For this ^^^^^^^^^^^ to work, a custom shortcut must be set up in the Settings app in GNOME
# to run command: "nautilus --new-window /home/USER" [ replace "USER" ]
K("RC-KEY_1"): K("C-KEY_2"), # View as Icons
K("RC-KEY_2"): K("C-KEY_1"), # View as List (Detailed)
K("RC-Super-o"): K("Shift-Enter"), # Open in new window
# K("RC-Super-o"): K("RC-Enter"), # Open in new tab
K("RC-comma"): K("RC-comma"), # Overrides "Open preferences dialog" shortcut below
},"Overrides for Nautilus - Finder Mods")
# Keybindings overrides for PCManFM and PCManFM-Qt
# (overrides some bindings from general file manager code block below)
define_keymap(re.compile("pcmanfm|pcmanfm-qt", re.IGNORECASE),{
K("RC-KEY_2"): K("C-KEY_4"), # View as List (Detailed) [Not in PCManFM-Qt]
K("RC-Backspace"): [K("Delete"),K("Enter")], # Move to Trash (delete, bypass dialog)
},"Overrides for PCManFM - Finder Mods")
# Keybindings overrides for SpaceFM
# (overrides some bindings from general file manager code block below)
define_keymap(re.compile("spacefm", re.IGNORECASE),{
K("RC-Page_Up"): K("C-Shift-Tab"), # Go to prior tab
K("RC-Page_Down"): K("C-Tab"), # Go to next tab
K("RC-Shift-Left_Brace"): K("C-Shift-Tab"), # Go to prior tab
K("RC-Shift-Right_Brace"): K("C-Tab"), # Go to next tab
K("RC-Shift-Left"): K("C-Shift-Tab"), # Go to prior tab
K("RC-Shift-Right"): K("C-Tab"), # Go to next tab
K("RC-Shift-N"): K("RC-F"), # Create new folder is Ctrl+F by default
K("RC-Backspace"): [K("Delete"),K("Enter")], # Move to Trash (delete, bypass dialog)
K("RC-comma"): [K("M-V"),K("p")], # Overrides "Open preferences dialog" shortcut below
# This shortcut ^^^^^^^^^^^^^^^ is not fully working in SpaceFM. Opens "View" menu but not Preferences.
# SpaceFM seems to be doing some nasty binding that blocks things like Alt+Tab while the menu is open.
},"Overrides for SpaceFM - Finder Mods")
# Keybindings overrides for Thunar
# (overrides some bindings from general file manager code block below)
define_keymap(re.compile("thunar", re.IGNORECASE),{
K("RC-Super-o"): K("RC-Shift-P"), # Open in new tab
K("RC-comma"): [K("M-E"),K("E")], # Overrides "Open preferences dialog" shortcut below
},"Overrides for Thunar - Finder Mods")
filemanagers = [
"caja",
"cutefish-filemanager",
"dde-file-manager",
"dolphin",
"io.elementary.files",
"nautilus",
"nemo",
"org.gnome.nautilus",
"pcmanfm",
"pcmanfm-qt",
"spacefm",
"thunar",
]
filemanagers = [filemanager.casefold() for filemanager in filemanagers]
filemanagerStr = "|".join(str('^'+x+'$') for x in filemanagers)
# Currently supported Linux file managers (file browsers):
#
# Caja File Browser (MATE file manager, fork of Nautilus)
# DDE File Manager (Deepin Linux file manager)
# Dolphin (KDE file manager)
# Nautilus (GNOME file manager, may be named "Files")
# Nemo (Cinnamon file manager, fork of Nautilus, may be named "Files")
# Pantheon Files (elementary OS file manager, may be named "Files")
# PCManFM (LXDE file manager)
# PCManFM-Qt (LXQt file manager)
# SpaceFM (Fork of PCManFM file manager)
# Thunar File Manager (Xfce file manager)
#
# Keybindings for general Linux file managers group:
define_keymap(re.compile(filemanagerStr, re.IGNORECASE),{
###########################################################################################################
### Show Properties (Get Info) | Open Settings/Preferences | Show/Hide hidden files ###
###########################################################################################################
K("RC-i"): K("M-Enter"), # File properties dialog (Get Info)
K("RC-comma"): [K("M-E"),K("N")], # Open preferences dialog
K("RC-Shift-dot"): K("RC-H"), # Show/hide hidden files ("dot" files)
###########################################################################################################
### Navigation ###
###########################################################################################################
K("RC-Left_Brace"): K("M-Left"), # Go Back
K("RC-Right_Brace"): K("M-Right"), # Go Forward
K("RC-Left"): K("M-Left"), # Go Back
K("RC-Right"): K("M-Right"), # Go Forward
K("RC-Up"): K("M-Up"), # Go Up dir
# K("RC-Down"): K("M-Down"), # Go Down dir (only works on folders) [not universal]
# K("RC-Down"): K("RC-O"), # Go Down dir (open folder/file) [not universal]
K("RC-Down"): K("Enter"), # Go Down dir (open folder/file) [universal]
K("RC-Shift-Left_Brace"): K("C-Page_Up"), # Go to prior tab
K("RC-Shift-Right_Brace"): K("C-Page_Down"), # Go to next tab
K("RC-Shift-Left"): K("C-Page_Up"), # Go to prior tab
K("RC-Shift-Right"): K("C-Page_Down"), # Go to next tab
###########################################################################################################
### Open in New Window | Move to Trash | Duplicate file/folder ###
###########################################################################################################
K("RC-Super-o"): K("RC-Shift-o"), # Open in new window (or tab, depends on FM setup) [not universal]
K("RC-Backspace"): K("Delete"), # Move to Trash (delete)
# K("RC-D"): [K("RC-C"),K("RC-V")], # Duplicate file/folder (Copy, then Paste) [conflicts with "Add Bookmark"]
###########################################################################################################
### To enable renaming files with the Enter key, uncomment the two keymapping lines just below this. ###
### Use Ctrl+Shift+Enter to escape or activate text fields such as "[F]ind" and "[L]ocation" fields. ###
###########################################################################################################
# K("Enter"): K("F2"), # Rename with Enter key
# K("RC-Shift-Enter"): K("Enter"), # Remap alternative "Enter" key to easily activate/exit text fields
# K("RC-Shift-Enter"): K("F2"), # Rename with Cmd+Shift+Enter
},"General File Managers - Finder Mods")
############################################
### END OF FILE MANAGER GROUP OF KEYMAPS ###
############################################
# Open preferences in browsers
define_keymap(re.compile("Firefox", re.IGNORECASE),{
K("C-comma"): [
K("C-T"),K("a"),K("b"),K("o"),K("u"),K("t"),
K("Shift-SEMICOLON"),K("p"),K("r"),K("e"),K("f"),
K("e"),K("r"),K("e"),K("n"),K("c"),K("e"),K("s"),K("Enter")
],
K("RC-Shift-N"): K("RC-Shift-P"), # Open private window with Ctrl+Shift+N like other browsers
})
define_keymap(re.compile(chromeStr, re.IGNORECASE),{
K("C-comma"): [K("M-e"), K("s"),K("Enter")], # Open preferences
K("RC-q"): K("M-F4"), # Quit Chrome(s) browsers with Cmd+Q
# K("RC-Left"): K("M-Left"), # Page nav: Back to prior page in history (conflict with wordwise)
# K("RC-Right"): K("M-Right"), # Page nav: Forward to next page in history (conflict with wordwise)
K("RC-Left_Brace"): K("M-Left"), # Page nav: Back to prior page in history
K("RC-Right_Brace"): K("M-Right"), # Page nav: Forward to next page in history
}, "Chrome Browsers")
# Opera C-F12
# Keybindings for General Web Browsers
define_keymap(re.compile(browserStr, re.IGNORECASE),{
K("RC-Q"): K("RC-Q"), # Close all browsers Instances
K("M-RC-I"): K("RC-Shift-I"), # Dev tools
K("M-RC-J"): K("RC-Shift-J"), # Dev tools
K("RC-Key_1"): K("M-Key_1"), # Jump to Tab #1-#8
K("RC-Key_2"): K("M-Key_2"),
K("RC-Key_3"): K("M-Key_3"),
K("RC-Key_4"): K("M-Key_4"),
K("RC-Key_5"): K("M-Key_5"),
K("RC-Key_6"): K("M-Key_6"),
K("RC-Key_7"): K("M-Key_7"),
K("RC-Key_8"): K("M-Key_8"),
K("RC-Key_9"): K("M-Key_9"), # Jump to last tab
# Enable Cmd+Shift+Braces for tab navigation
K("RC-Shift-Left_Brace"): K("C-Page_Up"), # Go to prior tab
K("RC-Shift-Right_Brace"): K("C-Page_Down"), # Go to next tab
# Enable Cmd+Option+Left/Right for tab navigation
K("RC-M-Left"): K("C-Page_Up"), # Go to prior tab
K("RC-M-Right"): K("C-Page_Down"), # Go to next tab
# Enable Ctrl+PgUp/PgDn for tab navigation
K("Super-Page_Up"): K("C-Page_Up"), # Go to prior tab
K("Super-Page_Down"): K("C-Page_Down"), # Go to next tab
# Use Cmd+Braces keys for tab navigation instead of page navigation
# K("C-Left_Brace"): K("C-Page_Up"),
# K("C-Right_Brace"): K("C-Page_Down"),
}, "General Web Browsers")
define_keymap(re.compile("ulauncher", re.IGNORECASE),{
K("RC-Key_1"): K("M-Key_1"), # Remap Ctrl+[1-9] and Ctrl+[a-z] to Alt+[1-9] and Alt+[a-z]
K("RC-Key_2"): K("M-Key_2"),
K("RC-Key_3"): K("M-Key_3"),
K("RC-Key_4"): K("M-Key_4"),
K("RC-Key_5"): K("M-Key_5"),
K("RC-Key_6"): K("M-Key_6"),
K("RC-Key_7"): K("M-Key_7"),
K("RC-Key_8"): K("M-Key_8"),
K("RC-Key_9"): K("M-Key_9"),
K("RC-Key_0"): K("M-Key_0"),
# K("RC-a"): K("M-a"),
K("RC-b"): K("M-b"),
# K("RC-c"): K("M-c"),
K("RC-d"): K("M-d"),
K("RC-e"): K("M-e"),
K("RC-f"): K("M-f"),
K("RC-g"): K("M-g"),
K("RC-h"): K("M-h"),
}, "Ulauncher")
# Note: terminals extends to remotes as well
define_keymap(lambda wm_class: wm_class.casefold() not in terminals,{
K("RC-Dot"): K("Esc"), # Mimic macOS Cmd+dot = Escape key (not in terminals)
})
# None referenced here originally
# - but remote clients and VM software ought to be set here
# These are the typical remaps for ALL GUI based apps
define_keymap(lambda wm_class: wm_class.casefold() not in remotes,{
K("RC-Space"): K("Alt-F1"), # Default SL - Launch Application Menu (gnome/kde)
K("RC-F3"):K("Super-d"), # Default SL - Show Desktop (gnome/kde,eos)
K("RC-Super-f"):K("M-F10"), # Default SL - Maximize app (gnome/kde)
# K("RC-Super-f"): K("Super-Page_Up"), # SL - Toggle maximized window state (kde_neon)
# K("Super-Right"):K("C-M-Right"), # Default SL - Change workspace (budgie)
# K("Super-Left"):K("C-M-Left"), # Default SL - Change workspace (budgie)
K("RC-Q"): K("M-F4"), # Default SL - not-popos
K("RC-H"):K("Super-h"), # Default SL - Minimize app (gnome/budgie/popos/fedora)
K("M-Tab"): pass_through_key, # Default - Cmd Tab - App Switching Default
K("RC-Tab"): K("M-Tab"), # Default - Cmd Tab - App Switching Default
K("RC-Shift-Tab"): K("M-Shift-Tab"), # Default - Cmd Tab - App Switching Default
K("RC-Grave"): K("M-Grave"), # Default not-xfce4 - Cmd ` - Same App Switching
K("RC-Shift-Grave"): K("M-Shift-Grave"), # Default not-xfce4 - Cmd ` - Same App Switching
# K("RC-Grave"): K("Super-Tab"), # xfce4 Switch within app group
# K("RC-Shift-Grave"): K("Super-Shift-Tab"), # xfce4 Switch within app group
# K("Super-Right"):K("Super-Page_Up"), # SL - Change workspace (ubuntu/fedora)
# K("Super-Left"):K("Super-Page_Down"), # SL - Change workspace (ubuntu/fedora)
# K("Super-Right"):K("Super-C-Up"), # SL - Change workspace (popos)
# K("Super-Left"):K("Super-C-Down"), # SL - Change workspace (popos)
# K("RC-Q"):K("Super-q"), # SL - Close Apps (popos)
# K("RC-Space"): K("Super-Space"), # SL - Launch Application Menu (eos)
# K("RC-H"): K("Super-Page_Down"), # SL - Minimize app (kde_neon)
# SL - Default SL - Change workspace (kde_neon)
# K("RC-Space"): K("LC-Esc"), # SL- Launch Application Menu xfce4
# K("RC-F3"):K("C-M-d"), # SL- Show Desktop xfce4
# K("RC-LC-f"):K("Super-Up"), # SL- Maximize app eos
# K("RC-LC-f"):K("Super-PAGE_UP"), # SL- Maximize app manjaro
# Basic App hotkey functions
# K("RC-H"):K("M-F9"), # SL - Minimize app xfce4
# K("RC-LC-f"):K("Super-PAGE_DOWN"), # SL - Minimize app manjaro
# In-App Tab switching
# K("M-Tab"): K("C-Tab"), # Chromebook/IBM - In-App Tab switching
# K("M-Shift-Tab"): K("C-Shift-Tab"), # Chromebook/IBM - In-App Tab switching
# K("M-Grave") : K("C-Shift-Tab"), # Chromebook/IBM - In-App Tab switching
K("Super-Tab"): K("LC-Tab"), # Default not-chromebook
K("Super-Shift-Tab"): K("LC-Shift-Tab"), # Default not-chromebook
# Fn to Alt style remaps
K("RM-Enter"): K("insert"), # Insert
# emacs style
K("Super-a"): K("Home"), # Beginning of Line
K("Super-e"): K("End"), # End of Line
K("Super-b"): K("Left"),
K("Super-f"): K("Right"),
K("Super-n"): K("Down"),
K("Super-p"): K("Up"),
K("Super-k"): [K("Shift-End"), K("Backspace")],
K("Super-d"): K("Delete"),
# K("M-RC-Space"): K(""), # Open Finder - Placeholder
# Wordwise
K("RC-Left"): K("Home"), # 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-Shift-Right"): K("Shift-End"), # Select all to End of Line
# K("RC-Left"): K("C-LEFT_BRACE"), # Firefox-nw - Back
# K("RC-Right"): K("C-RIGHT_BRACE"), # Firefox-nw - Forward
# K("RC-Left"): K("M-LEFT"), # Chrome-nw - Back
# K("RC-Right"): K("M-RIGHT"), # Chrome-nw - Forward
K("RC-Up"): K("C-Home"), # 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-Shift-Down"): K("C-Shift-End"), # Select all to End of File
# K("RM-Backspace"): K("Delete"), # Chromebook/IBM - Delete
K("Super-Backspace"): K("C-Backspace"), # Delete Left Word of Cursor
K("Super-Delete"): K("C-Delete"), # Delete Right Word of Cursor
# K("LM-Backspace"): K("C-Backspace"), # Chromebook/IBM - Delete Left Word of Cursor
K("M-Backspace"): K("C-Backspace"), # Default not-chromebook
K("RC-Backspace"): K("C-Shift-Backspace"), # Delete Entire Line Left of Cursor
K("Alt-Delete"): K("C-Delete"), # Delete Right Word of Cursor
# K(""): pass_through_key, # cancel
# K(""): K(""), #
}, "General GUI")
define_keymap(lambda wm_class: wm_class.casefold() not in mscodes,{
# Wordwise remaining - for Everything but VS Code
K("M-Left"): K("C-Left"), # Left of Word
K("M-Shift-Left"): K("C-Shift-Left"), # Select Left of Word
K("M-Right"): K("C-Right"), # Right of Word
K("M-Shift-Right"): K("C-Shift-Right"), # Select Right of Word
K("M-Shift-g"): K("C-Shift-g"), # View source control
# ** VS Code fix **
# Electron issue precludes normal keybinding fix.
# Alt menu auto-focus/toggle gets in the way.
#
# refer to ./xkeysnail-config/vscode_keybindings.json
# **
#
# ** Firefox fix **
# User will need to set "ui.key.menuAccessKeyFocuses"
# under about:config to false.
#
# https://superuser.com/questions/770301/pentadactyl-how-to-disable-menu-bar-toggle-by-alt
# **
#
}, "Wordwise - not vscode")
# Keybindings for VS Code
define_keymap(re.compile(codeStr, re.IGNORECASE),{
K("Super-Space"): K("LC-Space"), # Basic code completion
# Wordwise remaining - for VS Code
# Alt-F19 hack fixes Alt menu activation
K("M-Left"): [K("M-F19"),K("C-Left")], # Left of Word
K("M-Right"): [K("M-F19"),K("C-Right")], # Right 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("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
K("RC-Shift-Left_Brace"): K("C-PAGE_UP"), # next_view
K("RC-Shift-Right_Brace"): K("C-PAGE_DOWN"), # prev_view
# VS Code Shortcuts
K("C-g"): pass_through_key, # cancel Go to Line...
K("Super-g"): K("C-g"), # Go to Line...
K("F3"): pass_through_key, # cancel Find next
K("C-h"): pass_through_key, # cancel replace
K("C-M-f"): K("C-h"), # replace
K("C-Shift-h"): pass_through_key, # cancel replace_next
K("C-M-e"): K("C-Shift-h"), # replace_next
K("f3"): pass_through_key, # cancel find_next
K("C-g"): K("f3"), # find_next
K("Shift-f3"): pass_through_key, # cancel find_prev
K("C-Shift-g"): K("Shift-f3"), # find_prev
# K("Super-c"): K("LC-c"), # Default - Terminal - Sigint
# K("Super-x"): K("LC-x"), # Default - Terminal - Exit nano
# K("M-c"): K("LC-c"), # Chromebook/IBM - Terminal - Sigint
# K("M-x"): K("LC-x"), # Chromebook/IBM - Terminal - Exit nano
# K("Super-C-g"): K("C-f2"), # Default - Sublime - find_all_under
# K("C-M-g"): K("C-f2"), # Chromebook/IBM - Sublime - find_all_under
# 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(""): K(""), #
}, "Code")
# Keybindings for Sublime Text
define_keymap(re.compile("Sublime_text", re.IGNORECASE),{
# K("Super-c"): K("LC-c"), # Default - Terminal - Sigint
# K("Super-x"): K("LC-x"), # Default - Terminal - Exit nano
# K("M-c"): K("LC-c"), # Chromebook/IBM - Terminal - Sigint
# K("M-x"): K("LC-x"), # Chromebook/IBM - Terminal - Exit nano
K("Super-Space"): K("C-Space"), # Basic code completion
K("C-Super-up"): K("M-o"), # Switch file
K("Super-RC-f"): K("f11"), # toggle_full_screen
K("C-M-v"): [K("C-k"), K("C-v")], # paste_from_history
K("C-up"): pass_through_key, # cancel scroll_lines up
K("C-M-up"): K("C-up"), # scroll_lines up
K("C-down"): pass_through_key, # cancel scroll_lines down
K("C-M-down"): K("C-down"), # scroll_lines down
K("Super-Shift-up"): K("M-Shift-up"), # multi-cursor up
K("Super-Shift-down"): K("M-Shift-down"), # multi-cursor down
K("C-PAGE_DOWN"): pass_through_key, # cancel next_view
K("C-PAGE_UP"): pass_through_key, # cancel prev_view
K("C-Shift-left_brace"): K("C-PAGE_DOWN"), # next_view
K("C-Shift-right_brace"): K("C-PAGE_UP"), # prev_view
K("C-M-right"): K("C-PAGE_DOWN"), # next_view
K("C-M-left"): K("C-PAGE_UP"), # prev_view
K("insert"): pass_through_key, # cancel toggle_overwrite
K("C-M-o"): K("insert"), # toggle_overwrite
K("M-c"): pass_through_key, # cancel toggle_case_sensitive
K("C-M-c"): K("M-c"), # toggle_case_sensitive
K("C-h"): pass_through_key, # cancel replace
K("C-M-f"): K("C-h"), # replace
K("C-Shift-h"): pass_through_key, # cancel replace_next
K("C-M-e"): K("C-Shift-h"), # replace_next
K("f3"): pass_through_key, # cancel find_next
K("C-g"): K("f3"), # find_next
K("Shift-f3"): pass_through_key, # cancel find_prev
K("C-Shift-g"): K("Shift-f3"), # find_prev
K("C-f3"): pass_through_key, # cancel find_under
K("Super-M-g"): K("C-f3"), # find_under
K("C-Shift-f3"): pass_through_key, # cancel find_under_prev
K("Super-M-Shift-g"): K("C-Shift-f3"), # find_under_prev
K("M-f3"): pass_through_key, # Default - cancel find_all_under
# K("M-Refresh"): pass_through_key, # Chromebook/IBM - cancel find_all_under
# K("M-C-g"): K("M-Refresh"), # Chromebook/IBM - find_all_under
K("Super-C-g"): K("M-f3"), # Default - find_all_under
K("C-Shift-up"): pass_through_key, # cancel swap_line_up
K("Super-M-up"): K("C-Shift-up"), # swap_line_up
K("C-Shift-down"): pass_through_key, # cancel swap_line_down
K("Super-M-down"): K("C-Shift-down"), # swap_line_down
K("C-Pause"): pass_through_key, # cancel cancel_build
K("Super-c"): K("C-Pause"), # cancel_build
K("f9"): pass_through_key, # cancel sort_lines case_s false
K("f5"): K("f9"), # sort_lines case_s false
K("Super-f9"): pass_through_key, # cancel sort_lines case_s true
K("Super-f5"): K("Super-f9"), # sort_lines case_s true
K("M-Shift-Key_1"): pass_through_key, # cancel set_layout
K("C-M-Key_1"): K("M-Shift-Key_1"), # set_layout
K("M-Shift-Key_2"): pass_through_key, # cancel set_layout
K("C-M-Key_2"): K("M-Shift-Key_2"), # set_layout
K("M-Shift-Key_3"): pass_through_key, # cancel set_layout
K("C-M-Key_3"): K("M-Shift-Key_3"), # set_layout
K("M-Shift-Key_4"): pass_through_key, # cancel set_layout
K("C-M-Key_4"): K("M-Shift-Key_4"), # set_layout
K("M-Shift-Key_8"): pass_through_key, # cancel set_layout
K("C-M-Shift-Key_2"): K("M-Shift-Key_8"), # set_layout
K("M-Shift-Key_9"): pass_through_key, # cancel set_layout
K("C-M-Shift-Key_3"): K("M-Shift-Key_9"), # set_layout
K("M-Shift-Key_5"): pass_through_key, # cancel set_layout
K("C-M-Shift-Key_5"): K("M-Shift-Key_5"), # set_layout
# K(""): pass_through_key, # cancel
# K(""): K(""), #
}, "Sublime Text")
define_keymap(re.compile("konsole", re.IGNORECASE),{
# Ctrl Tab - In App Tab Switching
K("LC-Tab") : K("Shift-Right"),
K("LC-Shift-Tab") : K("Shift-Left"),
K("LC-Grave") : K("Shift-Left"),
}, "Konsole tab switching")
define_keymap(re.compile("Io.elementary.terminal|kitty", re.IGNORECASE),{
# Ctrl Tab - In App Tab Switching
K("LC-Tab") : K("LC-Shift-Right"),
K("LC-Shift-Tab") : K("LC-Shift-Left"),
K("LC-Grave") : K("LC-Shift-Left"),
}, "Elementary Terminal tab switching")
define_keymap(re.compile(termStr, re.IGNORECASE),{
K("LC-RC-f"): K("M-F10"), # Toggle window maximized state
# K("RC-Grave"): K("Super-Tab"), # xfce4 Switch within app group
# K("RC-Shift-Grave"): K("Super-Shift-Tab"), # xfce4 Switch within app group
# K("LC-Right"):K("C-M-Right"), # Default SL - Change workspace (budgie)
# K("LC-Left"):K("C-M-Left"), # Default SL - Change workspace (budgie)
# K("LC-Left"):K("C-M-End"), # SL - Change workspace xfce4
# K("LC-Left"):K("Super-Left"), # SL - Change workspace eos
# K("LC-Right"):K("C-M-Home"), # SL - Change workspace xfce4
# K("LC-Right"):K("Super-Right"), # SL - Change workspace eos
# K("LC-Right"):K("Super-Page_Up"), # SL - Change workspace (ubuntu/fedora)
# K("LC-Left"):K("Super-Page_Down"), # SL - Change workspace (ubuntu/fedora)
# K("LC-Right"):K("Super-C-Up"), # SL - Change workspace (popos)
# K("LC-Left"):K("Super-C-Down"), # SL - Change workspace (popos)
# Ctrl Tab - In App Tab Switching
K("LC-Tab") : K("LC-PAGE_DOWN"),
K("LC-Shift-Tab") : K("LC-PAGE_UP"),
K("LC-Grave") : K("LC-PAGE_UP"),
# K("M-Tab"): pass_through_key, # Default - Cmd Tab - App Switching Default
# K("RC-Tab"): K("M-Tab"), # Default - Cmd Tab - App Switching Default
# K("RC-Shift-Tab"): K("M-Shift-Tab"), # Default - Cmd Tab - App Switching Default
# Converts Cmd to use Ctrl-Shift
K("RC-MINUS"): K("C-MINUS"),
K("RC-EQUAL"): K("C-Shift-EQUAL"),
K("RC-BACKSPACE"): K("C-Shift-BACKSPACE"),
K("RC-W"): K("C-Shift-W"),
K("RC-E"): K("C-Shift-E"),
K("RC-R"): K("C-Shift-R"),
K("RC-T"): K("C-Shift-t"),
K("RC-Y"): K("C-Shift-Y"),
K("RC-U"): K("C-Shift-U"),
K("RC-I"): K("C-Shift-I"),
K("RC-O"): K("C-Shift-O"),
K("RC-P"): K("C-Shift-P"),
K("RC-LEFT_BRACE"): K("C-Shift-LEFT_BRACE"),
K("RC-RIGHT_BRACE"): K("C-Shift-RIGHT_BRACE"),
K("RC-Shift-Left_Brace"): K("C-Page_Up"), # Go to prior tab (Left)
K("RC-Shift-Right_Brace"): K("C-Page_Down"), # Go to next tab (Right)
K("RC-A"): K("C-Shift-A"),
K("RC-S"): K("C-Shift-S"),
K("RC-D"): K("C-Shift-D"),
K("RC-F"): K("C-Shift-F"),
K("RC-G"): K("C-Shift-G"),
K("RC-H"): K("C-Shift-H"),
K("RC-J"): K("C-Shift-J"),
K("RC-K"): K("C-Shift-K"),
K("RC-L"): K("C-Shift-L"),
K("RC-SEMICOLON"): K("C-Shift-SEMICOLON"),
K("RC-APOSTROPHE"): K("C-Shift-APOSTROPHE"),
K("RC-GRAVE"): K("C-Shift-GRAVE"),
K("RC-Z"): K("C-Shift-Z"),
K("RC-X"): K("C-Shift-X"),
K("RC-C"): K("C-Shift-C"),
K("RC-V"): K("C-Shift-V"),
K("RC-B"): K("C-Shift-B"),
K("RC-N"): K("C-Shift-N"),
K("RC-M"): K("C-Shift-M"),
K("RC-COMMA"): K("C-Shift-COMMA"),
K("RC-Dot"): K("LC-c"),
K("RC-SLASH"): K("C-Shift-SLASH"),
K("RC-KPASTERISK"): K("C-Shift-KPASTERISK"),
}, "terminals")

14
linux/limitedadmins Normal file
View File

@@ -0,0 +1,14 @@
# /etc/sudoers.d/limitedadmins
Defaults secure_path="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/X11/bin"
Defaults!/etc/init.d/kinto setenv,env_reset,env_delete+=PATH,env_delete+=LD_PRELOAD,env_delete+=LD_LIBRARY_PATH,env_delete+=SSH_AUTH_SOCK,env_delete+=PYTHONPATH,env_delete+=PERL5LIB
%{username} ALL=NOPASSWD: /etc/init.d/kinto *
%{username} ALL=NOPASSWD: {systemctl} restart xkeysnail
%{username} ALL=NOPASSWD: {systemctl} start xkeysnail
%{username} ALL=NOPASSWD: {systemctl} stop xkeysnail
%{username} ALL=NOPASSWD: {systemctl} status xkeysnail
%{username} ALL=(root) NOPASSWD: /usr/local/bin/logoff.sh
%{username} ALL=NOPASSWD: {pkill} -f logoff
%{username} ALL=NOPASSWD: {pkill} -f bin/xkeysnail
%{username} ALL=NOPASSWD: {xkeysnail} *
%{username} ALL=NOPASSWD: {systemctl} is-active --quiet xkeysnail
%{username} ALL=NOPASSWD: /usr/lib/systemd/system/xkeysnail.service

6
linux/root_logoff.sh Executable file
View File

@@ -0,0 +1,6 @@
#!/bin/bash
# /usr/local/bin/logoff.sh
while true; do
w | grep -E "$1.*$2" > /dev/null 2>&1 || (sudo systemctl stop xkeysnail && sudo pkill -f logoff)
sleep 5
done

View File

@@ -0,0 +1,41 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- Generator: Adobe Illustrator 23.0.1, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
<svg version="1.1"
id="svg5082" inkscape:version="0.92.2 5c3e80d, 2017-08-06" sodipodi:docname="budgie-restart2.svg" xmlns:cc="http://creativecommons.org/ns#" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd" xmlns:svg="http://www.w3.org/2000/svg"
xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" viewBox="0 0 18.3 19.8"
style="enable-background:new 0 0 18.3 19.8;" xml:space="preserve">
<style type="text/css">
.st0{fill:#61BB46;}
.st1{fill:#FDB827;}
.st2{fill:#F5821F;}
.st3{fill:#E03A3E;}
.st4{fill:#963D97;}
.st5{fill:#009DDC;}
.st6{fill:#FFFFFF;}
</style>
<title id="title5087">Symbolic Icons</title>
<sodipodi:namedview bordercolor="#000000" borderopacity="0.34509804" fit-margin-bottom="0" fit-margin-left="0" fit-margin-right="0" fit-margin-top="0" id="base" inkscape:current-layer="layer2" inkscape:cx="3.6222888" inkscape:cy="4.1549938" inkscape:document-units="px" inkscape:grid-bbox="true" inkscape:object-nodes="true" inkscape:pageopacity="0" inkscape:pageshadow="2" inkscape:window-height="740" inkscape:window-maximized="1" inkscape:window-width="1360" inkscape:window-x="0" inkscape:window-y="0" inkscape:zoom="33.811791" pagecolor="#37474f" showborder="false" showgrid="false">
<inkscape:grid empspacing="4" id="grid5636" originx="-0.28935368" originy="-119.88235" type="xygrid"></inkscape:grid>
</sodipodi:namedview>
<g id="layer4" transform="translate(-0.28935366,-60.349598)" inkscape:groupmode="layer" inkscape:label="status">
</g>
<g id="layer3" transform="translate(-0.28935366,-60.349598)" inkscape:groupmode="layer" inkscape:label="actions">
</g>
<g id="layer2">
<title>kinto-final</title>
<path id="Green" class="st0" d="M13.5,3.6H4.7c-1,0-1.9,0.9-1.9,1.9v0.2h12.6V5.5C15.4,4.5,14.5,3.6,13.5,3.6z"/>
<rect id="Yellow" x="2.8" y="5.7" class="st1" width="12.6" height="2.2"/>
<rect id="Orange" x="2.8" y="7.8" class="st2" width="12.6" height="2.2"/>
<rect id="Red" x="2.8" y="10" class="st3" width="12.6" height="2.2"/>
<path id="Purple" class="st4" d="M2.8,14.3L2.8,14.3h12.6l0,0v-2.1H2.8V14.3z"/>
<path id="Blue" class="st5" d="M4.7,16.2h9c1-0.1,1.7-1,1.7-1.9H2.8C2.8,15.3,3.7,16.2,4.7,16.2z"/>
<g id="Border">
<path class="st6" d="M16.2,2.8c-0.6-0.6-1.4-1-2.2-0.9H4.3c-0.9,0-1.7,0.3-2.2,0.9c-0.6,0.6-1,1.4-1,2.2v9.7c0,0.9,0.3,1.7,1,2.2
c0.5,0.6,1.3,1,2.2,1h2.1l0,0h2.3l0,0h3.5l0,0l0,0H14c1.7,0,3.1-1.4,3.1-3.1V5C17.2,4.2,16.8,3.4,16.2,2.8z M15.4,14.3
c0,1-0.7,1.8-1.7,1.9L11,11.6l2.8-2.9h-2.5l-2.5,3V5.9H6.7v10.3H4.7c-1,0-1.9-0.9-1.9-1.9V5.5c0-1,0.9-1.9,1.9-1.9h8.7
c1,0,1.9,0.9,1.9,1.9L15.4,14.3z M8.7,16.2V14l0.9-0.9l1.7,3.1L8.7,16.2z"/>
</g>
</g>
<g id="layer1">
</g>
</svg>

After

Width:  |  Height:  |  Size: 3.0 KiB

View File

@@ -0,0 +1,41 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- Generator: Adobe Illustrator 23.0.1, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
<svg version="1.1"
id="svg5082" inkscape:version="0.92.2 5c3e80d, 2017-08-06" sodipodi:docname="budgie-restart2.svg" xmlns:cc="http://creativecommons.org/ns#" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd" xmlns:svg="http://www.w3.org/2000/svg"
xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" viewBox="0 0 18.3 19.8"
style="enable-background:new 0 0 18.3 19.8;" xml:space="preserve">
<style type="text/css">
.st0{fill:#61BB46;}
.st1{fill:#FDB827;}
.st2{fill:#F5821F;}
.st3{fill:#E03A3E;}
.st4{fill:#963D97;}
.st5{fill:#009DDC;}
.st6{fill:#FFFFFF;}
</style>
<title id="title5087">Symbolic Icons</title>
<sodipodi:namedview bordercolor="#000000" borderopacity="0.34509804" fit-margin-bottom="0" fit-margin-left="0" fit-margin-right="0" fit-margin-top="0" id="base" inkscape:current-layer="layer2" inkscape:cx="3.6222888" inkscape:cy="4.1549938" inkscape:document-units="px" inkscape:grid-bbox="true" inkscape:object-nodes="true" inkscape:pageopacity="0" inkscape:pageshadow="2" inkscape:window-height="740" inkscape:window-maximized="1" inkscape:window-width="1360" inkscape:window-x="0" inkscape:window-y="0" inkscape:zoom="33.811791" pagecolor="#37474f" showborder="false" showgrid="false">
<inkscape:grid empspacing="4" id="grid5636" originx="-0.28935368" originy="-119.88235" type="xygrid"></inkscape:grid>
</sodipodi:namedview>
<g id="layer4" transform="translate(-0.28935366,-60.349598)" inkscape:groupmode="layer" inkscape:label="status">
</g>
<g id="layer3" transform="translate(-0.28935366,-60.349598)" inkscape:groupmode="layer" inkscape:label="actions">
</g>
<g id="layer2">
<title>kinto-final</title>
<path id="Green" class="st0" d="M14.1,2.7h-10c-1.2,0-2.2,1-2.2,2.2v0.2h14.4V4.9C16.3,3.7,15.3,2.7,14.1,2.7z"/>
<rect id="Yellow" x="1.9" y="5.1" class="st1" width="14.4" height="2.5"/>
<rect id="Orange" x="1.9" y="7.5" class="st2" width="14.4" height="2.5"/>
<rect id="Red" x="1.9" y="10" class="st3" width="14.4" height="2.5"/>
<path id="Purple" class="st4" d="M1.9,14.9C1.9,14.9,1.9,14.9,1.9,14.9l14.4,0c0,0,0,0,0,0v-2.4H1.9V14.9z"/>
<path id="Blue" class="st5" d="M4.1,17.1l10.3,0c1.1-0.1,1.9-1.1,1.9-2.2H1.9C1.9,16.1,2.9,17.1,4.1,17.1z"/>
<g id="Border">
<path class="st6" d="M17.2,1.8c-0.7-0.7-1.6-1.1-2.5-1H3.6c-1,0-1.9,0.4-2.5,1C0.4,2.5,0,3.4,0,4.3v11.1c0,1,0.4,1.9,1.1,2.5
C1.7,18.6,2.6,19,3.6,19H6v0h2.6v0h4l0,0l0,0h2.1c2,0,3.6-1.6,3.6-3.6V4.3C18.3,3.4,17.9,2.5,17.2,1.8z M16.3,14.9
c0,1.1-0.8,2.1-1.9,2.2l-3.1-5.3l3.2-3.3h-2.9l-2.9,3.4V5.3H6.3v11.8H4.1c-1.2,0-2.2-1-2.2-2.2v-10c0-1.2,1-2.2,2.2-2.2h10
c1.2,0,2.2,1,2.2,2.2L16.3,14.9z M8.6,17.1v-2.5l1-1l2,3.6L8.6,17.1z"/>
</g>
</g>
<g id="layer1">
</g>
</svg>

After

Width:  |  Height:  |  Size: 3.0 KiB

View File

@@ -0,0 +1,28 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- Generator: Adobe Illustrator 23.0.1, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
<svg version="1.1"
id="svg5082" inkscape:version="0.92.2 5c3e80d, 2017-08-06" sodipodi:docname="budgie-restart2.svg" xmlns:cc="http://creativecommons.org/ns#" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd" xmlns:svg="http://www.w3.org/2000/svg"
xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" viewBox="0 0 18.3 19.8"
style="enable-background:new 0 0 18.3 19.8;" xml:space="preserve">
<style type="text/css">
.st0{fill:#FFFFFF;}
</style>
<title id="title5087">Symbolic Icons</title>
<sodipodi:namedview bordercolor="#000000" borderopacity="0.34509804" fit-margin-bottom="0" fit-margin-left="0" fit-margin-right="0" fit-margin-top="0" id="base" inkscape:current-layer="layer2" inkscape:cx="3.6222888" inkscape:cy="4.1549938" inkscape:document-units="px" inkscape:grid-bbox="true" inkscape:object-nodes="true" inkscape:pageopacity="0" inkscape:pageshadow="2" inkscape:window-height="740" inkscape:window-maximized="1" inkscape:window-width="1360" inkscape:window-x="0" inkscape:window-y="0" inkscape:zoom="33.811791" pagecolor="#37474f" showborder="false" showgrid="false">
<inkscape:grid empspacing="4" id="grid5636" originx="-0.28935368" originy="-119.88235" type="xygrid"></inkscape:grid>
</sodipodi:namedview>
<g id="layer4" transform="translate(-0.28935366,-60.349598)" inkscape:groupmode="layer" inkscape:label="status">
</g>
<g id="layer3" transform="translate(-0.28935366,-60.349598)" inkscape:groupmode="layer" inkscape:label="actions">
</g>
<g id="layer2">
<g id="White_K">
<path class="st0" d="M16.1,2.9c-0.6-0.6-1.4-1-2.2-1H4.2C3.3,2,2.5,2.3,2,2.9S1,4.3,1,5.1v9.7c0,0.9,0.4,1.7,1,2.2
c0.5,0.7,1.3,1,2.2,1h2.1V5.6h2.3V12l2.9-3.3h2.8l-3.2,3.2l3.6,6c0.5-0.2,1.1-0.4,1.4-0.8c0.6-0.6,1-1.4,1-2.2V5.1
C17,4.3,16.7,3.6,16.1,2.9z"/>
<polygon class="st0" points="8.5,14.6 8.5,18 11.9,18 9.4,13.6 "/>
</g>
</g>
<g id="layer1">
</g>
</svg>

After

Width:  |  Height:  |  Size: 2.2 KiB

View File

@@ -0,0 +1,28 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- Generator: Adobe Illustrator 23.0.1, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
<svg version="1.1"
id="svg5082" inkscape:version="0.92.2 5c3e80d, 2017-08-06" sodipodi:docname="budgie-restart2.svg" xmlns:cc="http://creativecommons.org/ns#" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd" xmlns:svg="http://www.w3.org/2000/svg"
xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" viewBox="0 0 18.3 19.8"
style="enable-background:new 0 0 18.3 19.8;" xml:space="preserve">
<style type="text/css">
.st0{fill:#FFFFFF;}
</style>
<title id="title5087">Symbolic Icons</title>
<sodipodi:namedview bordercolor="#000000" borderopacity="0.34509804" fit-margin-bottom="0" fit-margin-left="0" fit-margin-right="0" fit-margin-top="0" id="base" inkscape:current-layer="layer2" inkscape:cx="3.6222888" inkscape:cy="4.1549938" inkscape:document-units="px" inkscape:grid-bbox="true" inkscape:object-nodes="true" inkscape:pageopacity="0" inkscape:pageshadow="2" inkscape:window-height="740" inkscape:window-maximized="1" inkscape:window-width="1360" inkscape:window-x="0" inkscape:window-y="0" inkscape:zoom="33.811791" pagecolor="#37474f" showborder="false" showgrid="false">
<inkscape:grid empspacing="4" id="grid5636" originx="-0.28935368" originy="-119.88235" type="xygrid"></inkscape:grid>
</sodipodi:namedview>
<g id="layer4" transform="translate(-0.28935366,-60.349598)" inkscape:groupmode="layer" inkscape:label="status">
</g>
<g id="layer3" transform="translate(-0.28935366,-60.349598)" inkscape:groupmode="layer" inkscape:label="actions">
</g>
<g id="layer2">
<g id="White_K">
<path class="st0" d="M17.2,1.8c-0.7-0.7-1.6-1.1-2.5-1.1H3.6c-1,0-1.9,0.4-2.5,1.1S0,3.4,0,4.3v11.1c0,1,0.4,1.9,1.1,2.5
C1.7,18.7,2.6,19,3.6,19H6V4.8h2.6v7.3l3.3-3.8h3.2L11.5,12l4.1,6.9c0.6-0.2,1.2-0.5,1.6-0.9c0.7-0.7,1.1-1.6,1.1-2.5V4.3
C18.3,3.4,17.9,2.5,17.2,1.8z"/>
<polygon class="st0" points="8.6,15.1 8.6,19 12.5,19 9.6,14 "/>
</g>
</g>
<g id="layer1">
</g>
</svg>

After

Width:  |  Height:  |  Size: 2.2 KiB

View File

@@ -0,0 +1,24 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- Generator: Adobe Illustrator 23.0.1, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
<svg version="1.1"
id="svg5082" inkscape:version="0.92.2 5c3e80d, 2017-08-06" sodipodi:docname="budgie-restart2.svg" xmlns:cc="http://creativecommons.org/ns#" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd" xmlns:svg="http://www.w3.org/2000/svg"
xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" viewBox="0 0 18.3 19.8"
style="enable-background:new 0 0 18.3 19.8;" xml:space="preserve">
<title id="title5087">Symbolic Icons</title>
<sodipodi:namedview bordercolor="#000000" borderopacity="0.34509804" fit-margin-bottom="0" fit-margin-left="0" fit-margin-right="0" fit-margin-top="0" id="base" inkscape:current-layer="layer2" inkscape:cx="3.6222888" inkscape:cy="4.1549938" inkscape:document-units="px" inkscape:grid-bbox="true" inkscape:object-nodes="true" inkscape:pageopacity="0" inkscape:pageshadow="2" inkscape:window-height="740" inkscape:window-maximized="1" inkscape:window-width="1360" inkscape:window-x="0" inkscape:window-y="0" inkscape:zoom="33.811791" pagecolor="#37474f" showborder="false" showgrid="false">
<inkscape:grid empspacing="4" id="grid5636" originx="-0.28935368" originy="-119.88235" type="xygrid"></inkscape:grid>
</sodipodi:namedview>
<g id="layer4" transform="translate(-0.28935366,-60.349598)" inkscape:groupmode="layer" inkscape:label="status">
</g>
<g id="layer3" transform="translate(-0.28935366,-60.349598)" inkscape:groupmode="layer" inkscape:label="actions">
</g>
<g id="layer2">
<g id="White_K">
<path d="M16.1,2.9c-0.6-0.6-1.4-1-2.2-1H4.2C3.3,2,2.5,2.3,2,2.9S1,4.3,1,5.1v9.7c0,0.9,0.4,1.7,1,2.2c0.5,0.7,1.3,1,2.2,1h2.1
V5.6h2.3V12l2.9-3.3h2.8l-3.2,3.2l3.6,6c0.5-0.2,1.1-0.4,1.4-0.8c0.6-0.6,1-1.4,1-2.2V5.1C17,4.3,16.7,3.6,16.1,2.9z"/>
<polygon points="8.5,14.6 8.5,18 11.9,18 9.4,13.6 "/>
</g>
</g>
<g id="layer1">
</g>
</svg>

After

Width:  |  Height:  |  Size: 2.1 KiB

View File

@@ -0,0 +1,25 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- Generator: Adobe Illustrator 23.0.1, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
<svg version="1.1"
id="svg5082" inkscape:version="0.92.2 5c3e80d, 2017-08-06" sodipodi:docname="budgie-restart2.svg" xmlns:cc="http://creativecommons.org/ns#" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd" xmlns:svg="http://www.w3.org/2000/svg"
xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" viewBox="0 0 18.3 19.8"
style="enable-background:new 0 0 18.3 19.8;" xml:space="preserve">
<title id="title5087">Symbolic Icons</title>
<sodipodi:namedview bordercolor="#000000" borderopacity="0.34509804" fit-margin-bottom="0" fit-margin-left="0" fit-margin-right="0" fit-margin-top="0" id="base" inkscape:current-layer="layer2" inkscape:cx="3.6222888" inkscape:cy="4.1549938" inkscape:document-units="px" inkscape:grid-bbox="true" inkscape:object-nodes="true" inkscape:pageopacity="0" inkscape:pageshadow="2" inkscape:window-height="740" inkscape:window-maximized="1" inkscape:window-width="1360" inkscape:window-x="0" inkscape:window-y="0" inkscape:zoom="33.811791" pagecolor="#37474f" showborder="false" showgrid="false">
<inkscape:grid empspacing="4" id="grid5636" originx="-0.28935368" originy="-119.88235" type="xygrid"></inkscape:grid>
</sodipodi:namedview>
<g id="layer4" transform="translate(-0.28935366,-60.349598)" inkscape:groupmode="layer" inkscape:label="status">
</g>
<g id="layer3" transform="translate(-0.28935366,-60.349598)" inkscape:groupmode="layer" inkscape:label="actions">
</g>
<g id="layer2">
<g id="White_K">
<path d="M17.2,1.8c-0.7-0.7-1.6-1.1-2.5-1.1H3.6c-1,0-1.9,0.4-2.5,1.1S0,3.4,0,4.3v11.1c0,1,0.4,1.9,1.1,2.5
C1.7,18.7,2.6,19,3.6,19H6V4.8h2.6v7.3l3.3-3.8h3.2L11.5,12l4.1,6.9c0.6-0.2,1.2-0.5,1.6-0.9c0.7-0.7,1.1-1.6,1.1-2.5V4.3
C18.3,3.4,17.9,2.5,17.2,1.8z"/>
<polygon points="8.6,15.1 8.6,19 12.5,19 9.6,14 "/>
</g>
</g>
<g id="layer1">
</g>
</svg>

After

Width:  |  Height:  |  Size: 2.1 KiB

View File

@@ -0,0 +1,27 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- Generator: Adobe Illustrator 23.0.1, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
<svg version="1.1"
id="svg5082" inkscape:version="0.92.2 5c3e80d, 2017-08-06" sodipodi:docname="budgie-restart2.svg" xmlns:cc="http://creativecommons.org/ns#" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd" xmlns:svg="http://www.w3.org/2000/svg"
xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" viewBox="0 0 18.3 19.8"
style="enable-background:new 0 0 18.3 19.8;" xml:space="preserve">
<style type="text/css">
.st0{fill:#FFFFFF;}
</style>
<title id="title5087">Symbolic Icons</title>
<sodipodi:namedview bordercolor="#000000" borderopacity="0.34509804" fit-margin-bottom="0" fit-margin-left="0" fit-margin-right="0" fit-margin-top="0" id="base" inkscape:current-layer="layer2" inkscape:cx="3.6222888" inkscape:cy="4.1549938" inkscape:document-units="px" inkscape:grid-bbox="true" inkscape:object-nodes="true" inkscape:pageopacity="0" inkscape:pageshadow="2" inkscape:window-height="740" inkscape:window-maximized="1" inkscape:window-width="1360" inkscape:window-x="0" inkscape:window-y="0" inkscape:zoom="33.811791" pagecolor="#37474f" showborder="false" showgrid="false">
<inkscape:grid empspacing="4" id="grid5636" originx="-0.28935368" originy="-119.88235" type="xygrid"></inkscape:grid>
</sodipodi:namedview>
<g id="layer4" transform="translate(-0.28935366,-60.349598)" inkscape:groupmode="layer" inkscape:label="status">
</g>
<g id="layer3" transform="translate(-0.28935366,-60.349598)" inkscape:groupmode="layer" inkscape:label="actions">
</g>
<g id="layer2">
<path class="st0" d="M17.3,1.8c-0.7-0.7-1.6-1.1-2.5-1.1H3.6C1.6,0.7,0,2.3,0,4.3v11.1c0,2,1.6,3.6,3.6,3.6H6v0h2.6v0h4l0,0l0,0
h2.1c2,0,3.6-1.6,3.6-3.6V4.3C18.3,3.4,17.9,2.5,17.3,1.8z M17.2,15.4C17.2,15.5,17.2,15.5,17.2,15.4c0,1.3-1,2.3-2.2,2.5l-1.4-2.4
L12,12.8L11.5,12l1.9-2l1.6-1.7h-3.2L10.4,10l-1.8,2v-2V7.3V4.8H6v2.5V10v2.8v2.7v2.4H3.6c-1.4,0-2.5-1.1-2.5-2.4c0,0,0,0,0-0.1
v-2.7V10V7.3V4.5V4.3c0-1.4,1.1-2.5,2.5-2.5h11.1c1.4,0,2.5,1.1,2.5,2.5v0.2v2.7V10v2.8V15.4z M8.6,15.5v-0.4L9.6,14l0.9,1.5
l1.4,2.4H8.6V15.5z"/>
</g>
<g id="layer1">
</g>
</svg>

After

Width:  |  Height:  |  Size: 2.4 KiB

View File

@@ -1,8 +1,8 @@
[Desktop Entry]
Name=Kinto
GenericName=Kinto
Name=Kinto Tray
GenericName=Kintotray
Comment=Make Linux Type Like it's a Mac
Exec=/bin/bash -c "/bin/sleep 5 && /usr/bin/systemctl --user start keyswap"
Exec=/bin/bash -c "{homedir}/.config/kinto/kintotray.py"
Terminal=false
Type=Application
X-GNOME-Autostart-enabled=true

View File

@@ -0,0 +1,758 @@
#!/usr/bin/env python3
import gi
gi.require_version('Gtk', '3.0')
gi.require_version('Notify', '0.7')
import signal,time,os,fcntl,datetime,re
from subprocess import Popen, PIPE, CalledProcessError
from shutil import which
from gi.repository import Gtk,GLib,GdkPixbuf
from gi.repository import Notify as notify
try:
gi.require_version('AyatanaAppIndicator3', '0.1')
from gi.repository import AyatanaAppIndicator3 as appindicator
except ValueError:
gi.require_version('AppIndicator3', '0.1')
from gi.repository import AppIndicator3 as appindicator
import signal
def kill_child():
if child_pid is None:
pass
else:
os.kill(child_pid, signal.SIGTERM)
import atexit
atexit.register(kill_child)
APPINDICATOR_ID = 'Kinto'
class Indicator():
global child_pid
global sysv
try:
sysv = int(Popen("pidof systemd >/dev/null 2>&1 && echo '0' || echo '1'", stdout=PIPE, shell=True).communicate()[0].strip().decode('UTF-8'))
except:
sysv = 2
if sysv:
kinto_status = Popen("export TERM=xterm-color;while :; do clear; pgrep 'xkeysnail' && echo 'active'; sleep 2; done", stdout=PIPE, shell=True)
else:
kinto_status = Popen("export TERM=xterm-color;while :; do clear; systemctl is-active xkeysnail; sleep 2; done", stdout=PIPE, shell=True)
child_pid = kinto_status.pid
homedir = os.path.expanduser("~")
kconfig = homedir+"/.config/kinto/kinto.py"
ostype = os.environ.get('XDG_CURRENT_DESKTOP')
enable_id = 0
winmac_id = 0
chkautostart_id = 0
autostart_bool = False
menu = Gtk.Menu()
menukb = Gtk.Menu()
checkbox_autostart = Gtk.CheckMenuItem(label='Autostart')
restart = Gtk.MenuItem(label='Restart')
stop = Gtk.MenuItem(label='Stop')
keyboards = Gtk.MenuItem(label='Keyboard Types')
keyboards.set_submenu(menukb)
winkb = Gtk.RadioMenuItem(label='Windows')
mackb = Gtk.RadioMenuItem(label='Apple',group=winkb)
chromekb = Gtk.RadioMenuItem(label='Chromebook',group=winkb)
ibmkb = Gtk.RadioMenuItem(label='IBM (No Super/Win key)',group=winkb)
winmackb = Gtk.RadioMenuItem(label='Windows & Apple*',group=winkb)
edit = Gtk.MenuItem(label='Customize')
edit_submenu = Gtk.Menu()
edit.set_submenu(edit_submenu)
tweaks = Gtk.MenuItem(label='Tweaks')
rightmod = Gtk.CheckButton(label='AltGr on Right Cmd')
vsc2st3 = Gtk.CheckButton(label='ST3 hotkeys for VS Code')
caps2esc = Gtk.CheckButton(label='Capslock is Escape when tapped, Cmd when held')
caps2cmd = Gtk.CheckButton(label='Capslock is Cmd')
button_config = Gtk.MenuItem(label='Kinto Config (shortcuts)')
service = Gtk.MenuItem(label='Kinto Service')
# Keyboard type set below
button_syskb = Gtk.MenuItem(label='System Shortcuts')
button_region = Gtk.MenuItem(label='Change Language')
systray = Gtk.CheckMenuItem(label='Tray Enabled')
helpm = Gtk.MenuItem(label='Help')
help_submenu = Gtk.Menu()
helpm.set_submenu(help_submenu)
debug = Gtk.MenuItem(label='Debug')
opengui = Gtk.MenuItem(label='Open Kinto')
support = Gtk.MenuItem(label='Support')
about = Gtk.MenuItem(label='About')
global restartsvc
restartsvc = False
unixts = int(time.time())
last_status = ''
def __init__(self):
global sysv
try:
sysv = int(Popen("pidof systemd >/dev/null 2>&1 && echo '0' || echo '1'", stdout=PIPE, shell=True).communicate()[0].strip().decode('UTF-8'))
except:
sysv = 1
if sysv:
res = Popen(['pgrep','xkeysnail'])
else:
res = Popen(['sudo', 'systemctl','is-active','--quiet','xkeysnail'])
res.wait()
if res.returncode == 0:
self.last_status = 'active'
self.indicator = appindicator.Indicator.new(APPINDICATOR_ID, os.environ['HOME']+'/.config/kinto/kinto-invert.svg', appindicator.IndicatorCategory.SYSTEM_SERVICES)
else:
self.last_status = 'inactive'
self.indicator = appindicator.Indicator.new(APPINDICATOR_ID, os.environ['HOME']+'/.config/kinto/kinto.svg', appindicator.IndicatorCategory.SYSTEM_SERVICES)
self.indicator.set_status(appindicator.IndicatorStatus.ACTIVE)
self.indicator.set_menu(self.build_menu(res))
notify.init(APPINDICATOR_ID)
GLib.timeout_add(2000, self.update_terminal)
def build_menu(self,res):
with open(self.kconfig) as configfile:
autostart_line = configfile.read().split('\n')[1]
autostart_bool = False
# Autostart
if "autostart = true" in autostart_line.casefold():
autostart_bool = True
if autostart_bool:
# Popen(['sudo', 'systemctl','restart','xkeysnail'])
self.checkbox_autostart.set_active(True)
self.chkautostart_id = self.checkbox_autostart.connect('activate',self.setAutostart,False)
else:
self.checkbox_autostart.set_active(False)
self.chkautostart_id = self.checkbox_autostart.connect('activate',self.setAutostart,True)
self.restart.connect('activate',self.runRestart)
self.menu.append(self.restart)
self.stop.connect('activate',self.runStop)
self.menu.append(self.stop)
self.refreshKB()
self.mackb.signal_id = self.mackb.connect('activate',self.setKB,"mac")
self.winkb.signal_id = self.winkb.connect('activate',self.setKB,"win")
self.chromekb.signal_id = self.chromekb.connect('activate',self.setKB,"chrome")
self.ibmkb.signal_id = self.ibmkb.connect('activate',self.setKB,"ibm")
self.winmackb.signal_id = self.winmackb.connect('activate',self.setKB,"winmac")
self.menukb.append(self.winkb)
self.menukb.append(self.mackb)
self.menukb.append(self.chromekb)
self.menukb.append(self.ibmkb)
self.menukb.append(self.winmackb)
self.menu.append(self.keyboards)
self.tweaks.connect('activate',self.setTweaks)
self.edit_submenu.append(self.tweaks)
self.button_config.connect('activate',self.setConfig)
self.edit_submenu.append(self.button_config)
self.service.connect('activate',self.setService)
self.edit_submenu.append(self.service)
# Set System Keyboard Shortcuts
self.button_syskb.connect('activate',self.setSysKB)
self.edit_submenu.append(self.button_syskb)
# Set Language
self.button_region.connect('activate',self.setRegion)
self.edit_submenu.append(self.button_region)
self.edit_submenu.append(self.checkbox_autostart)
if os.path.exists(os.environ['HOME']+'/.config/autostart/kintotray.desktop'):
self.systray.set_active(True)
self.systray.signal_id = self.systray.connect('activate',self.checkTray,False)
else:
self.systray.signal_id = self.systray.connect('activate',self.checkTray,True)
self.edit_submenu.append(self.systray)
self.menu.append(self.edit)
self.debug.connect('activate',self.runDebug,1)
self.help_submenu.append(self.debug)
self.opengui.connect('activate',self.runDebug,0)
self.help_submenu.append(self.opengui)
self.support.connect('activate',self.openSupport)
self.help_submenu.append(self.support)
self.about.connect('activate',self.runAbout)
self.help_submenu.append(self.about)
self.menu.append(self.helpm)
self.keyboards.connect('activate',self.refresh)
# self.debug.connect('activate',self.runDebug)
# self.menu.append(self.debug)
# self.tweaks.connect('activate',self.setTweaks)
# self.menu.append(self.tweaks)
# Edit Config
# self.button_config.connect('activate',self.setConfig)
# self.menu.append(self.button_config)
# # Set System Keyboard Shortcuts
# self.button_syskb.connect('activate',self.setSysKB)
# self.menu.append(self.button_syskb)
# # Set Language
# self.button_region.connect('activate',self.setRegion)
# self.menu.append(self.button_region)
item_quit = Gtk.MenuItem(label='Close')
item_quit.connect('activate', quit)
self.menu.append(item_quit)
self.menu.show_all()
return self.menu
# def refresh(self, widget, event):
# print('refresh!!!')
# if event.button != 1:
# return False #only intercept left mouse button
# md = gtk.MessageDialog(self, gtk.DIALOG_DESTROY_WITH_PARENT, gtk.MESSAGE_INFO, gtk.BUTTONS_CLOSE, "herp derp, I only needed one click")
# md.run()
# md.destroy()
# return True
def checkTray(self,button,tray_bool):
# path.exists('.config/autostart/kintotray.py')
if tray_bool:
Popen(['cp',os.environ['HOME']+'/.config/kinto/kintotray.desktop',os.environ['HOME']+'/.config/autostart/kintotray.desktop'])
self.systray.disconnect(self.systray.signal_id)
self.systray.set_active(True)
self.systray.signal_id = self.systray.connect('activate',self.checkTray,False)
else:
Popen(['rm',os.environ['HOME']+'/.config/autostart/kintotray.desktop'])
Gtk.main_quit()
self.systray.disconnect(self.systray.signal_id)
self.systray.set_active(False)
self.systray.signal_id = self.systray.connect('activate',self.checkTray,True)
return
def refresh(self,button):
self.refreshKB()
def refreshKB(self):
# Keyboard Types
ismac = "perl -ne 'print if /^(\s{4})((?!#).*)(# Mac\n)/' ~/.config/kinto/kinto.py | wc -l"
iswin = "perl -ne 'print if /^(\s{4})(# -- Default Win)/' ~/.config/kinto/kinto.py | wc -l"
ischrome = "perl -ne 'print if /^(\s{4})((?!#).*)(# Chromebook\n)/' ~/.config/kinto/kinto.py | wc -l"
iswinmac = "perl -ne 'print if /^(\s{4})(# -- Default Mac)/' ~/.config/kinto/kinto.py | wc -l"
isibm = "perl -ne 'print if /^(\s{4})((?!#).*)(# IBM\n)/' ~/.config/kinto/kinto.py | wc -l"
mac_result = int(self.queryConfig(ismac))
win_result = int(self.queryConfig(iswin))
chrome_result = int(self.queryConfig(ischrome))
ibm_result = int(self.queryConfig(isibm))
winmac_result = int(self.queryConfig(iswinmac))
countkb = 0
if mac_result:
self.mackb.set_active(True)
countkb += 1
if win_result:
self.winkb.set_active(True)
countkb += 1
if chrome_result:
self.chromekb.set_active(True)
countkb += 1
if winmac_result:
self.winmackb.set_active(True)
countkb += 1
if ibm_result:
ibmkb.set_active(True)
countkb += 1
if countkb > 1:
Popen(['notify-send','Kinto: Remove ' + str(countkb-1) + ' kb type(s)'])
return
def non_block_read(self):
''' even in a thread, a normal read with block until the buffer is full '''
output = self.kinto_status.stdout
# with open('goodlines.txt') as f:
# mylist = list(f)
# output = '\n'.join(self.kinto_status.stdout.splitlines()[-1:])
# '\n'.join(stderr.splitlines()[-N:])
# .splitlines()[-1:]
fd = output.fileno()
fl = fcntl.fcntl(fd, fcntl.F_GETFL)
fcntl.fcntl(fd, fcntl.F_SETFL, fl | os.O_NONBLOCK)
op = output.read()
if op == None:
return ''
status = op.decode('utf-8').rstrip()
if "inactive" in status or "failed" in status or "deactivating" in status or "activating" in status:
stats = "inactive"
elif "active" in status:
stats = "active"
else:
stats = "inactive"
return stats
def update_terminal(self):
status = self.non_block_read().strip()
nowts = int(time.time())
if (nowts - self.unixts) > 5 and (status=='active' and self.indicator.get_icon() != os.environ['HOME']+'/.config/kinto/kinto-invert.svg'):
self.indicator.set_icon(os.environ['HOME']+'/.config/kinto/kinto-invert.svg')
elif (nowts - self.unixts) > 5 and (status == 'inactive' and self.indicator.get_icon() != os.environ['HOME']+'/.config/kinto/kinto.svg'):
self.indicator.set_icon(os.environ['HOME']+'/.config/kinto/kinto.svg')
self.last_status = status
return self.kinto_status.poll() is None
def openSupport(self,button):
Gtk.show_uri_on_window(None, "https://github.com/rbreaves/kinto#table-of-contents", Gtk.get_current_event_time())
return
def runAbout(self,button):
win = Gtk.Window()
path = os.environ['HOME']+'/.config/kinto/kinto-color.svg'
width = -1
height = 128
preserve_aspect_ratio = True
pixbuf = GdkPixbuf.Pixbuf.new_from_file_at_scale(path, width, height, preserve_aspect_ratio)
win.set_default_icon_list([pixbuf])
win.set_title("About")
win.set_default_size(350, 200)
win.set_position(Gtk.WindowPosition.CENTER)
context = win.get_style_context()
default_background = str(context.get_background_color(Gtk.StateType.NORMAL))
tokenValue = re.search('red=(\d.\d+), green=(\d.\d+), blue=(\d.\d+), alpha=(\d.\d+)', default_background)
red = float(tokenValue.group(1))
green = float(tokenValue.group(2))
blue = float(tokenValue.group(3))
alpha = float(tokenValue.group(4))
bgAvg = (red + green + blue)/3
if(bgAvg > 0.5):
theme = "light"
else:
theme = "dark"
vbox = Gtk.VBox()
# innervbox = Gtk.VBox()
if theme == "dark":
path = os.environ['HOME']+'/.config/kinto/kinto-invert.svg'
else:
path = os.environ['HOME']+'/.config/kinto/kinto-color.svg'
width = -1
height = 128
preserve_aspect_ratio = True
pixbuf = GdkPixbuf.Pixbuf.new_from_file_at_scale(path, width, height, preserve_aspect_ratio)
image = Gtk.Image()
image.set_from_pixbuf(pixbuf)
with open(os.environ['HOME']+'/.config/kinto/version', 'r') as file:
verdata = file.read().replace('\n', '')
version = Gtk.Label('Kinto v' + verdata)
credits = Gtk.Label("Author: Ben Reaves")
spacer = Gtk.Label(" ")
copy = Gtk.Label("© 2019, 2020 - GPLv2")
url = Gtk.LinkButton("http://kinto.sh", label="kinto.sh")
vbox.add(image)
vbox.add(version)
vbox.add(spacer)
vbox.add(credits)
vbox.add(copy)
vbox.add(url)
win.add(vbox)
win.show_all()
version.set_selectable(True)
win.connect('delete-event', self.on_delete_event)
return
def setTweaks(self,button):
win = Gtk.Window()
path = os.environ['HOME']+'/.config/kinto/kinto-color.svg'
width = -1
height = 128
preserve_aspect_ratio = True
pixbuf = GdkPixbuf.Pixbuf.new_from_file_at_scale(path, width, height, preserve_aspect_ratio)
win.set_default_icon_list([pixbuf])
win.set_title("Kinto Tweaks")
win.set_default_size(350, 200)
win.set_position(Gtk.WindowPosition.CENTER)
# Check AltGr - commented out is enabled
is_rightmod = "perl -ne 'print if /^(\s{4})(Key.*)(Multi-language)/' ~/.config/kinto/kinto.py | wc -l"
rightmod_result = int(self.queryConfig(is_rightmod))
# Sublime enabled for vscode
is_vsc2st3 = "perl -ne 'print if /^(\s{4}\w.*)(- Sublime)/' ~/.config/kinto/kinto.py | wc -l"
vsc2st3_result = int(self.queryConfig(is_vsc2st3))
# Caps2Esc enabled
is_caps2esc = "perl -ne 'print if /^(\s{4}{\w.*)(# Caps2Esc)/' ~/.config/kinto/kinto.py | wc -l"
caps2esc_result = int(self.queryConfig(is_caps2esc))
# Caps2Cmd enabled
is_caps2cmd = "perl -ne 'print if /^(\s{4}\w.*)(# Caps2Cmd)/' ~/.config/kinto/kinto.py | wc -l"
caps2cmd_result = int(self.queryConfig(is_caps2cmd))
# Enter2Cmd enabled
# (\s{4}{\w.*)(# Enter2Cmd)
vbox = Gtk.VBox()
self.lbl = Gtk.Label()
global restartsvc
restartsvc = False
self.rightmod = Gtk.CheckButton(label='AltGr on Right Cmd')
self.vsc2st3 = Gtk.CheckButton(label='ST3 hotkeys for VS Code')
self.caps2esc = Gtk.CheckButton(label='Capslock is Escape when tapped, Cmd when held')
self.caps2cmd = Gtk.CheckButton(label='Capslock is Cmd')
if rightmod_result == 0:
self.rightmod.set_active(True)
if vsc2st3_result > 0:
self.vsc2st3.set_active(True)
if caps2esc_result > 0:
self.caps2esc.set_active(True)
self.caps2cmd.set_sensitive(False)
if caps2cmd_result > 0:
self.caps2cmd.set_active(True)
self.caps2esc.set_sensitive(False)
self.rightmod.signal_id = self.rightmod.connect('toggled',self.setRightMod)
self.vsc2st3.signal_id = self.vsc2st3.connect('toggled',self.setVSC2ST3)
self.caps2esc.signal_id = self.caps2esc.connect('toggled',self.setCaps2Esc)
self.caps2cmd.signal_id = self.caps2cmd.connect('toggled',self.setCaps2Cmd)
vbox.add(self.rightmod)
vbox.add(self.vsc2st3)
vbox.add(self.caps2esc)
vbox.add(self.caps2cmd)
vbox.add(self.lbl)
win.add(vbox)
win.show_all()
win.connect('delete-event', self.on_delete_event)
return
__gsignals__ = {
"delete-event" : "override"
}
def on_delete_event(event, self, widget):
global restartsvc
if restartsvc == True:
try:
if sysv:
restartcmd = ['sudo', '-E','/etc/init.d/kinto','restart']
else:
restartcmd = ['sudo', 'systemctl','restart','xkeysnail']
Popen(restartcmd)
restartsvc = False
except CalledProcessError:
Popen(['notify-send','Kinto: Error restarting Kinto after setting tweaks!'])
self.hide()
self.destroy()
return True
def setRightMod(self,button):
global restartsvc
try:
if self.winkb.get_active() or self.winmackb.get_active():
# print('winkb true')
setkb = 's/^(\s{4})((# )(.*)(# )(WinMac - Multi-language.*)|(K)(.*)(# )(WinMac - Multi-language.*))/ $4$5$6$9$7$8$9$10/g'
if self.mackb.get_active():
# print('mackb true')
setkb = 's/^(\s{4})((# )(.*)(# )(Mac - Multi-language.*)|(K)(.*)(# )(Mac - Multi-language.*))/ $4$5$6$9$7$8$9$10/g'
if self.chromekb.get_active():
# print('chromekb true')
setkb = 's/^(\s{4})((# )(.*)(# )(Chromebook - Multi-language.*)|(K)(.*)(# )(Chromebook - Multi-language.*))/ $4$5$6$9$7$8$9$10/g'
if self.ibmkb.get_active():
# print('ibmkb true')
setkb = 's/^(\s{4})((# )(.*)(# )(IBM - Multi-language.*)|(K)(.*)(# )(IBM - Multi-language.*))/ $4$5$6$9$7$8$9$10/g'
cmds = ['perl','-pi','-e',setkb,self.kconfig]
cmdsTerm = Popen(cmds)
restartsvc = True
except CalledProcessError:
Popen(['notify-send','Kinto: Error Resetting AltGr!'])
return
def setVSC2ST3(self,button):
global restartsvc
try:
if self.chromekb.get_active() or self.ibmkb.get_active():
setkb = 's/^(\s{4})(\w.*)(# )(Chromebook/IBM - Sublime)|^(\s{4})(# )(\w.*)(# Chromebook/IBM - Sublime)/$5$7$8$1$3$2$3$4/g'
else:
setkb = 's/^(\s{4})(\w.*)(# )(Default - Sublime)|^(\s{4})(# )(\w.*)(# Default - Sublime)/$5$7$8$1$3$2$3$4/g'
cmds = ['perl','-pi','-e',setkb,self.kconfig]
cmdsTerm = Popen(cmds)
restartsvc = True
except CalledProcessError:
Popen(['notify-send','Kinto: Error Resetting SublimeText remaps for VSCode!'])
return
def setCaps2Esc(self,button):
global restartsvc
try:
if self.winkb.get_active() or self.winmackb.get_active() or self.ibmkb.get_active() or self.mackb.get_active():
setkb = 's/^(\s{4})((# )(\{\w.*)(# Caps2Esc\n)|(\{\w.*)(# )(Caps2Esc - Chrome.*)|(\{.*)(# )(Caps2Esc\n|Placeholder)|(\w.*)(# )(Caps2Cmd.*)|(# )(\{.*)(# )(Placeholder))/ $4$5$7$6$7$8$10$9$10$11$13$12$13$14$16$17$18/g'
if self.chromekb.get_active():
setkb = 's/^(\s{4})((# )(\{\w.*)(# Caps2Esc - Chrome.*)|(\{\w.*)(# )(Caps2Esc\n)|(\{.*)(# )(Caps2Esc - Chrome.*|Placeholder)|(\w.*)(# )(Caps2Cmd.*)|(# )(\{.*)(# )(Placeholder))/ $4$5$7$6$7$8$10$9$10$11$13$12$13$14$16$17$18/g'
cmds = ['perl','-pi','-e',setkb,self.kconfig]
if self.caps2esc.get_active():
self.caps2cmd.set_sensitive(False)
else:
self.caps2cmd.set_sensitive(True)
cmdsTerm = Popen(cmds)
restartsvc = True
except CalledProcessError:
Popen(['notify-send','Kinto: Error resetting caps2esc!'])
return
def setCaps2Cmd(self,button):
global restartsvc
try:
if self.winkb.get_active() or self.winmackb.get_active() or self.ibmkb.get_active() or self.mackb.get_active():
setkb = 's/^(\s{4})((\w.*)(# )(Caps2Cmd\n)|(\w.*)(# )(Caps2Cmd - Chrome.*)|(# )(\w.*)(# )(Caps2Cmd\n)|(\{\w.*)(# )(Caps2Esc.*)|(# )(\{.*)(# )(Placeholder))/ $4$3$4$5$7$6$7$8$10$11$12$14$13$14$15$17$18$19/g'
if self.chromekb.get_active():
setkb = 's/^(\s{4})((\w.*)(# )(Caps2Cmd - Chrome.*)|(\w.*)(# )(Caps2Cmd\n)|(# )(\w.*)(# )(Caps2Cmd - Chrome.*)|(\{\w.*)(# )(Caps2Esc.*)|(# )(\{.*)(# )(Placeholder))/ $4$3$4$5$7$6$7$8$10$11$12$14$13$14$15$17$18$19/g'
cmds = ['perl','-pi','-e',setkb,self.kconfig]
if self.caps2cmd.get_active():
self.caps2esc.set_sensitive(False)
else:
self.caps2esc.set_sensitive(True)
cmdsTerm = Popen(cmds)
restartsvc = True
except CalledProcessError:
Popen(['notify-send','Kinto: Error resetting caps2cmd!'])
return
def runRestart(self,button):
global sysv
try:
if sysv:
stop = Popen(['sudo', '-E','/etc/init.d/kinto','stop'])
else:
stop = Popen(['sudo', 'systemctl','stop','xkeysnail'])
stop.wait()
time.sleep(1)
res = Popen(['pgrep','xkeysnail'])
res.wait()
if res.returncode == 0:
# Popen(['notify-send','Kinto: Ending Debug'])
pkillxkey = Popen(['sudo', 'pkill','-f','bin/xkeysnail'])
pkillxkey.wait()
if sysv:
Popen(['sudo', '-E','/etc/init.d/kinto','start'])
else:
Popen(['sudo', 'systemctl','start','xkeysnail'])
except:
Popen(['notify-send','Kinto: Error restarting Kinto!'])
def runStop(self,button):
global sysv
try:
if sysv:
stop = Popen(['sudo', '-E','/etc/init.d/kinto','stop'])
else:
stop = Popen(['sudo', 'systemctl','stop','xkeysnail'])
stop.wait()
time.sleep(1)
res = Popen(['pgrep','xkeysnail'])
res.wait()
if res.returncode == 0:
# Popen(['notify-send','Kinto: Ending Debug'])
pkillxkey = Popen(['sudo', 'pkill','-f','bin/xkeysnail'])
pkillxkey.wait()
except:
Popen(['notify-send','Kinto: Error stopping Kinto!'])
def runDebug(self,button,opendebug):
try:
if opendebug:
Popen(['/usr/bin/python3',os.environ['HOME']+'/.config/kinto/gui/kinto-gui.py','-d'])
else:
Popen(['/usr/bin/python3',os.environ['HOME']+'/.config/kinto/gui/kinto-gui.py'])
except:
Popen(['notify-send','Kinto: Error opening Kinto!'])
def queryConfig(self,query):
res = Popen(query, stdout=PIPE, stderr=None, shell=True)
res.wait()
return res.communicate()[0].strip().decode('UTF-8')
def setAutostart(self,button,autostart):
try:
if autostart == False:
Popen(['perl','-pi','-e','s/autostart = true/autostart = false/g',os.environ['HOME']+'/.config/kinto/kinto.py'])
self.checkbox_autostart.set_active(False)
self.checkbox_autostart.disconnect(self.chkautostart_id)
self.chkautostart_id = self.checkbox_autostart.connect('activate',self.setAutostart,True)
else:
Popen(['perl','-pi','-e','s/autostart = false/autostart = true/g',os.environ['HOME']+'/.config/kinto/kinto.py'])
self.checkbox_autostart.set_active(True)
self.checkbox_autostart.disconnect(self.chkautostart_id)
self.chkautostart_id = self.checkbox_autostart.connect('activate',self.setAutostart,False)
except CalledProcessError:
Popen(['notify-send','Kinto: Error setting autostart!'])
def setConfig(self,button):
try:
if os.path.exists('/opt/sublime_text/sublime_text'):
Popen(['/opt/sublime_text/sublime_text',os.environ['HOME']+'/.config/kinto/kinto.py'])
elif which('gedit') is not None:
Popen(['gedit',os.environ['HOME']+'/.config/kinto/kinto.py'])
elif which('mousepad') is not None:
Popen(['mousepad',os.environ['HOME']+'/.config/kinto/kinto.py'])
elif which('kate') is not None:
Popen(['kate',os.environ['HOME']+'/.config/kinto/kinto.py'])
elif which('kwrite') is not None:
Popen(['kwrite',os.environ['HOME']+'/.config/kinto/kinto.py'])
except CalledProcessError: # Notify user about error on running restart commands.
Popen(['notify-send','Kinto: Error could not open config file!'])
def setService(self,button):
try:
if os.path.exists('/opt/sublime_text/sublime_text'):
Popen(['/opt/sublime_text/sublime_text','/lib/systemd/system/xkeysnail.service'])
elif which('gedit') is not None:
Popen(['gedit','/lib/systemd/system/xkeysnail.service'])
elif which('mousepad') is not None:
Popen(['mousepad','/lib/systemd/system/xkeysnail.service'])
elif which('kate') is not None:
Popen(['kate','/lib/systemd/system/xkeysnail.service'])
elif which('kwrite') is not None:
Popen(['kwrite','/lib/systemd/system/xkeysnail.service'])
except CalledProcessError: # Notify user about error on running restart commands.
Popen(['notify-send','Kinto: Error could not open config file!'])
def setKB(self,button,kbtype):
try:
if kbtype == "win":
setkb = 's/^(\s{3})(\s{1}#)(.*# WinMac.*)|^(?!\s{4}#)(\s{3})(\s{1})(.*)( # )(Mac.*)|^(?!\s{4}#)(\s{3})(\s{1})(.*)( # )(IBM.*)|^(?!\s{4}#)(\s{3})(\s{1})(.*)( # )(Chromebook.*)|^(\s{3})(\s{1}# )(-)( Default Win)|^(\s{3})(\s{1}# )(-)(- Default Mac*)/ $3$7$6$7$8$12$11$12$13$17$16$17$18$20$21$21$22$24$26/g'
elif kbtype == "winmac":
setkb = 's/^(\s{3})(\s{1}#)(.*# WinMac.*)|^(?!\s{4}#)(\s{3})(\s{1})(.*)( # )(Mac.*)|^(?!\s{4}#)(\s{3})(\s{1})(.*)( # )(IBM.*)|^(?!\s{4}#)(\s{3})(\s{1})(.*)( # )(Chromebook.*)|^(\s{3})(\s{1}# )(-)( Default Mac.*)|^(\s{3})(\s{1}# )(-)(- Default Win)/ $3$7$6$7$8$12$11$12$13$17$16$17$18$20$21$21$22$24$26/g'
if os.path.isfile('/sys/module/hid_apple/parameters/swap_opt_cmd'):
with open('/sys/module/applespi/parameters/swap_opt_cmd', 'r') as ocval:
optcmd = ocval.read().replace('\n', '')
if optcmd == '0':
# print("found hid_apple")
self.queryConfig("echo '1' | sudo tee /sys/module/hid_apple/parameters/swap_opt_cmd;echo 'options hid_apple swap_opt_cmd=1' | sudo tee /etc/modprobe.d/hid_apple.conf;sudo update-initramfs -u -k all")
if os.path.isfile('/sys/module/applespi/parameters/swap_opt_cmd'):
with open('/sys/module/applespi/parameters/swap_opt_cmd', 'r') as ocval:
optcmd = ocval.read().replace('\n', '')
if optcmd == '0':
# print("found applespi")
self.queryConfig("echo '1' | sudo tee /sys/module/applespi/parameters/swap_opt_cmd;echo 'options applespi swap_opt_cmd=1' | sudo tee /etc/modprobe.d/applespi.conf;sudo update-initramfs -u -k all")
elif kbtype == "mac":
if os.path.isfile('/sys/module/hid_apple/parameters/swap_opt_cmd'):
with open('/sys/module/hid_apple/parameters/swap_opt_cmd', 'r') as ocval:
optcmd = ocval.read().replace('\n', '')
if optcmd == '1':
# print("found hid_apple - remove")
self.queryConfig("echo '0' | sudo tee /sys/module/hid_apple/parameters/swap_opt_cmd;echo 'options hid_apple swap_opt_cmd=0' | sudo tee /etc/modprobe.d/hid_apple.conf;sudo update-initramfs -u -k all")
if os.path.isfile('/sys/module/applespi/parameters/swap_opt_cmd'):
with open('/sys/module/applespi/parameters/swap_opt_cmd', 'r') as ocval:
optcmd = ocval.read().replace('\n', '')
if optcmd == '1':
# print("found applespi - remove")
self.queryConfig("echo '0' | sudo tee /sys/module/applespi/parameters/swap_opt_cmd;echo 'options applespi swap_opt_cmd=0' | sudo tee /etc/modprobe.d/applespi.conf;sudo update-initramfs -u -k all")
setkb = 's/^(\s{3})(\s{1}#)(.*# Mac\n|.*# Mac -)|^(?!\s{4}#)(\s{3})(\s{1})(.*)( # )(WinMac.*)|^(?!\s{4}#)(\s{3})(\s{1})(.*)( # )(IBM.*)|^(?!\s{4}#)(\s{3})(\s{1})(.*)( # )(Chromebook.*)|^(\s{3})(\s{1}# )(-)(- Default (Win|Mac.*))/ $3$7$6$7$8$12$11$12$13$17$16$17$18$20$22/g'
elif kbtype == "chrome":
setkb = 's/^(\s{3})(\s{1}#)(.*# Chromebook.*)|^(?!\s{4}#)(\s{3})(\s{1})(.*)( # )(WinMac.*)|^(?!\s{4}#)(\s{3})(\s{1})(.*)( # )(Mac.*)|^(?!\s{4}#)(\s{3})(\s{1})(.*)( # )(IBM.*)|^(\s{3})(\s{1}# )(-)(- Default (Win|Mac.*))/ $3$7$6$7$8$12$11$12$13$17$16$17$18$20$22/g'
elif kbtype == "ibm":
setkb ='s/^(\s{3})(\s{1}#)(.*# IBM.*)|^(?!\s{4}#)(\s{3})(\s{1})(.*)( # )(WinMac.*)|^(?!\s{4}#)(\s{3})(\s{1})(.*)( # )(Mac.*)|^(?!\s{4}#)(\s{3})(\s{1})(.*)( # )(Chromebook.*)|^(\s{3})(\s{1}# )(-)(- Default (Win|Mac.*))/ $3$7$6$7$8$12$11$12$13$17$16$17$18$20$22/g'
cmds = ['perl','-pi','-e',setkb,self.kconfig]
cmdsTerm = Popen(cmds)
cmdsTerm.wait()
if sysv:
restart = ['sudo', '-E','/etc/init.d/kinto','restart']
else:
restart = ['sudo', 'systemctl','restart','xkeysnail']
Popen(restart)
except CalledProcessError:
Popen(['notify-send','Kinto: Error Resetting KB Type!'])
def setSysKB(self,button):
if self.ostype == "XFCE":
Popen(['xfce4-keyboard-settings'])
elif self.ostype == "KDE":
self.queryConfig('systemsettings >/dev/null 2>&1 || systemsettings5 >/dev/null 2>&1')
else:
Popen(['gnome-control-center','keyboard'])
def setRegion(self,button):
if self.ostype == "XFCE":
Popen(['gnome-language-selector'])
elif self.ostype == "KDE":
self.queryConfig('kcmshell4 kcm_translations >/dev/null 2>&1 || kcmshell5 kcm_translations >/dev/null 2>&1')
else:
Popen(['gnome-control-center','region'])
def quit(source):
Gtk.main_quit()
Indicator()
signal.signal(signal.SIGINT, signal.SIG_DFL)
Gtk.main()

11
linux/xkeysnail.desktop Executable file
View File

@@ -0,0 +1,11 @@
[Desktop Entry]
Name=Kinto_xkey
GenericName=Kinto_xkey
Comment=Make Linux Type Like it's a Mac
Exec=/bin/bash -c "grep -q 'autostart = true' {homedir}/.config/kinto/kinto.py && {xhost} +SI:localuser:root && sudo {systemctl} restart xkeysnail"
# Budgie logoff fix to avoid key input loss
# ;{homedir}/.config/kinto/logoff.sh
# ;sudo /usr/local/bin/logoff.sh $USER $DISPLAY
Terminal=false
Type=Application
X-GNOME-Autostart-enabled=true

14
linux/xkeysnail.service Executable file
View File

@@ -0,0 +1,14 @@
[Unit]
Description=xkeysnail
[Service]
Type=simple
KillMode=process
ExecStart={sudo}/bin/bash -c '/usr/bin/xhost +SI:localuser:root && {homedir}/.config/kinto/killdups.sh && {xkeysnail} --quiet --watch {homedir}/.config/kinto/kinto.py'
ExecStop={sudo}/bin/bash -c '{sudo}pkill -f bin/xkeysnail && exit 0'
Restart=on-failure
RestartSec=3
Environment=DISPLAY={displayid}
[Install]
WantedBy=graphical.target

View File

@@ -2,7 +2,7 @@
Name=Kinto_xkey
GenericName=Kinto_xkey
Comment=Make Linux Type Like it's a Mac
Exec=/bin/bash -c "{xhost} +SI:localuser:root && sudo {systemctl} restart xkeysnail"
Exec=/bin/bash -c "grep -q 'autostart = true' {homedir}/.config/kinto/kinto.py && sudo -E /etc/init.d/kinto restart"
Terminal=false
Type=Application
X-GNOME-Autostart-enabled=true

View File

@@ -1,705 +0,0 @@
[
/*
Custom macOS keymap for Kinto keymap
*/
{ "keys": ["ctrl+shift+n"], "command": "new_window" },
{ "keys": ["ctrl+shift+w"], "command": "close_window" },
{ "keys": ["ctrl+o"], "command": "prompt_open" },
{ "keys": ["ctrl+shift+t"], "command": "reopen_last_file" },
{ "keys": ["ctrl+super+up"], "command": "switch_file", "args": {"extensions": ["cpp", "cxx", "cc", "c", "hpp", "hxx", "hh", "h", "ipp", "inl", "m", "mm"]} },
{ "keys": ["ctrl+n"], "command": "new_file" },
{ "keys": ["ctrl+s"], "command": "save" },
{ "keys": ["ctrl+shift+s"], "command": "prompt_save_as" },
{ "keys": ["ctrl+super+s"], "command": "save_all" },
{ "keys": ["ctrl+w"], "command": "close" },
{ "keys": ["ctrl+k", "ctrl+b"], "command": "toggle_side_bar" },
{ "keys": ["ctrl+alt+f"], "command": "toggle_full_screen" },
{ "keys": ["ctrl+alt+shift+f"], "command": "toggle_distraction_free" },
{ "keys": ["ctrl+z"], "command": "undo" },
{ "keys": ["ctrl+shift+z"], "command": "redo" },
{ "keys": ["ctrl+y"], "command": "redo_or_repeat" },
{ "keys": ["ctrl+u"], "command": "soft_undo" },
{ "keys": ["ctrl+shift+u"], "command": "soft_redo" },
{ "keys": ["ctrl+x"], "command": "cut" },
{ "keys": ["ctrl+c"], "command": "copy" },
{ "keys": ["ctrl+v"], "command": "paste" },
{ "keys": ["ctrl+shift+v"], "command": "paste_and_indent" },
{ "keys": ["ctrl+k", "ctrl+v"], "command": "paste_from_history" },
{ "keys": ["ctrl+option+v"], "command": "paste_from_history" },
{ "keys": ["alt+super+left"], "command": "move", "args": {"by": "subwords", "forward": false} },
{ "keys": ["alt+super+right"], "command": "move", "args": {"by": "subword_ends", "forward": true} },
{ "keys": ["alt+super+shift+left"], "command": "move", "args": {"by": "subwords", "forward": false, "extend": true} },
{ "keys": ["alt+super+shift+right"], "command": "move", "args": {"by": "subword_ends", "forward": true, "extend": true} },
{ "keys": ["alt+left"], "command": "move", "args": {"by": "subwords", "forward": false} },
{ "keys": ["alt+right"], "command": "move", "args": {"by": "subword_ends", "forward": true} },
{ "keys": ["alt+shift+left"], "command": "move", "args": {"by": "subwords", "forward": false, "extend": true} },
{ "keys": ["alt+shift+right"], "command": "move", "args": {"by": "subword_ends", "forward": true, "extend": true} },
{ "keys": ["alt+super+up"], "command": "scroll_lines", "args": {"amount": 1.0} },
{ "keys": ["alt+super+down"], "command": "scroll_lines", "args": {"amount": -1.0} },
{ "keys": ["alt+shift+up"], "command": "select_lines", "args": {"forward": false} },
{ "keys": ["alt+shift+down"], "command": "select_lines", "args": {"forward": true} },
{ "keys": ["ctrl+shift+["], "command": "prev_view" },
{ "keys": ["ctrl+shift+]"], "command": "next_view" },
{ "keys": ["ctrl+super+left"], "command": "prev_view" },
{ "keys": ["ctrl+super+right"], "command": "next_view" },
{ "keys": ["alt+tab"], "command": "next_view_in_stack" },
{ "keys": ["alt+shift+tab"], "command": "prev_view_in_stack" },
{ "keys": ["ctrl+a"], "command": "select_all" },
{ "keys": ["ctrl+shift+l"], "command": "split_selection_into_lines" },
{ "keys": ["escape"], "command": "single_selection", "context":
[
{ "key": "num_selections", "operator": "not_equal", "operand": 1 }
]
},
{ "keys": ["escape"], "command": "clear_fields", "context":
[
{ "key": "has_next_field", "operator": "equal", "operand": true }
]
},
{ "keys": ["escape"], "command": "clear_fields", "context":
[
{ "key": "has_prev_field", "operator": "equal", "operand": true }
]
},
{ "keys": ["escape"], "command": "hide_panel", "args": {"cancel": true},
"context":
[
{ "key": "panel_visible", "operator": "equal", "operand": true }
]
},
{ "keys": ["escape"], "command": "hide_overlay", "context":
[
{ "key": "overlay_visible", "operator": "equal", "operand": true }
]
},
{ "keys": ["escape"], "command": "hide_popup", "context":
[
{ "key": "popup_visible", "operator": "equal", "operand": true }
]
},
{ "keys": ["escape"], "command": "hide_auto_complete", "context":
[
{ "key": "auto_complete_visible", "operator": "equal", "operand": true }
]
},
{ "keys": ["ctrl+]"], "command": "indent" },
{ "keys": ["ctrl+["], "command": "unindent" },
{ "keys": ["tab"], "command": "insert_best_completion", "args": {"default": "\t", "exact": true} },
{ "keys": ["tab"], "command": "insert_best_completion", "args": {"default": "\t", "exact": false},
"context":
[
{ "key": "setting.tab_completion", "operator": "equal", "operand": true },
{ "key": "preceding_text", "operator": "not_regex_match", "operand": ".*\\b[0-9]+$", "match_all": true },
]
},
{ "keys": ["tab"], "command": "replace_completion_with_next_completion", "context":
[
{ "key": "last_command", "operator": "equal", "operand": "insert_best_completion" },
{ "key": "setting.tab_completion", "operator": "equal", "operand": true }
]
},
{ "keys": ["tab"], "command": "reindent", "context":
[
{ "key": "setting.auto_indent", "operator": "equal", "operand": true },
{ "key": "selection_empty", "operator": "equal", "operand": true, "match_all": true },
{ "key": "preceding_text", "operator": "regex_match", "operand": "^$", "match_all": true },
{ "key": "following_text", "operator": "regex_match", "operand": "^$", "match_all": true }
]
},
{ "keys": ["tab"], "command": "indent", "context":
[
{ "key": "text", "operator": "regex_contains", "operand": "\n" }
]
},
{ "keys": ["tab"], "command": "next_field", "context":
[
{ "key": "has_next_field", "operator": "equal", "operand": true }
]
},
{ "keys": ["tab"], "command": "commit_completion", "context":
[
{ "key": "auto_complete_visible" },
{ "key": "setting.auto_complete_commit_on_tab" }
]
},
{ "keys": ["shift+tab"], "command": "insert", "args": {"characters": "\t"} },
{ "keys": ["shift+tab"], "command": "unindent", "context":
[
{ "key": "setting.shift_tab_unindent", "operator": "equal", "operand": true }
]
},
{ "keys": ["shift+tab"], "command": "unindent", "context":
[
{ "key": "preceding_text", "operator": "regex_match", "operand": "^[\t ]*" }
]
},
{ "keys": ["shift+tab"], "command": "unindent", "context":
[
{ "key": "text", "operator": "regex_contains", "operand": "\n" }
]
},
{ "keys": ["shift+tab"], "command": "prev_field", "context":
[
{ "key": "has_prev_field", "operator": "equal", "operand": true }
]
},
{ "keys": ["ctrl+l"], "command": "expand_selection", "args": {"to": "line"} },
{ "keys": ["ctrl+d"], "command": "find_under_expand" },
{ "keys": ["ctrl+k", "ctrl+d"], "command": "find_under_expand_skip" },
{ "keys": ["ctrl+shift+space"], "command": "expand_selection", "args": {"to": "scope"} },
{ "keys": ["alt+shift+m"], "command": "expand_selection", "args": {"to": "brackets"} },
{ "keys": ["alt+m"], "command": "move_to", "args": {"to": "brackets"} },
{ "keys": ["ctrl+shift+j"], "command": "expand_selection", "args": {"to": "indentation"} },
{ "keys": ["ctrl+shift+a"], "command": "expand_selection", "args": {"to": "tag"} },
{ "keys": ["ctrl+super+."], "command": "close_tag" },
{ "keys": ["alt+q"], "command": "toggle_record_macro" },
{ "keys": ["alt+shift+q"], "command": "run_macro" },
{ "keys": ["ctrl+enter"], "command": "run_macro_file", "args": {"file": "res://Packages/Default/Add Line.sublime-macro"} },
{ "keys": ["ctrl+shift+enter"], "command": "run_macro_file", "args": {"file": "res://Packages/Default/Add Line Before.sublime-macro"} },
{ "keys": ["enter"], "command": "commit_completion", "context":
[
{ "key": "auto_complete_visible" },
{ "key": "setting.auto_complete_commit_on_tab", "operand": false }
]
},
{ "keys": ["ctrl+t"], "command": "show_overlay", "args": {"overlay": "goto", "show_files": true} },
{ "keys": ["ctrl+p"], "command": "show_overlay", "args": {"overlay": "goto", "show_files": true} },
{ "keys": ["ctrl+shift+p"], "command": "show_overlay", "args": {"overlay": "command_palette"} },
{ "keys": ["ctrl+alt+p"], "command": "prompt_select_workspace" },
{ "keys": ["ctrl+r"], "command": "show_overlay", "args": {"overlay": "goto", "text": "@"} },
{ "keys": ["alt+g"], "command": "show_overlay", "args": {"overlay": "goto", "text": ":"} },
{ "keys": ["f12"], "command": "goto_definition" },
{ "keys": ["ctrl+super+down"], "command": "goto_definition" },
{ "keys": ["ctrl+shift+r"], "command": "goto_symbol_in_project" },
{ "keys": ["alt+minus"], "command": "jump_back" },
{ "keys": ["alt+shift+minus"], "command": "jump_forward" },
{ "keys": ["ctrl+i"], "command": "show_panel", "args": {"panel": "incremental_find", "reverse": false} },
{ "keys": ["ctrl+shift+i"], "command": "show_panel", "args": {"panel": "incremental_find", "reverse": true} },
{ "keys": ["ctrl+f"], "command": "show_panel", "args": {"panel": "find", "reverse": false} },
{ "keys": ["ctrl+super+f"], "command": "show_panel", "args": {"panel": "replace", "reverse": false} },
{ "keys": ["ctrl+super+e"], "command": "replace_next" },
{ "keys": ["ctrl+g"], "command": "find_next" },
{ "keys": ["ctrl+shift+g"], "command": "find_prev" },
{ "keys": ["ctrl+e"], "command": "slurp_find_string" },
{ "keys": ["ctrl+shift+e"], "command": "slurp_replace_string" },
{ "keys": ["super+ctrl+g"], "command": "find_under" },
{ "keys": ["shift+super+ctrl+g"], "command": "find_under_prev" },
{ "keys": ["alt+ctrl+g"], "command": "find_all_under" },
{ "keys": ["ctrl+shift+f"], "command": "show_panel", "args": {"panel": "find_in_files"} },
{ "keys": ["f4"], "command": "next_result" },
{ "keys": ["shift+f4"], "command": "prev_result" },
{ "keys": ["f6"], "command": "toggle_setting", "args": {"setting": "spell_check"} },
{ "keys": ["alt+f6"], "command": "next_misspelling" },
{ "keys": ["alt+shift+f6"], "command": "prev_misspelling" },
{ "keys": ["alt+ctrl+up"], "command": "swap_line_up" },
{ "keys": ["alt+ctrl+down"], "command": "swap_line_down" },
{ "keys": ["alt+backspace"], "command": "delete_word", "args": { "forward": false, "sub_words": true } },
{ "keys": ["alt+delete"], "command": "delete_word", "args": { "forward": true, "sub_words": true } },
{ "keys": ["ctrl+forward_slash"], "command": "toggle_comment", "args": { "block": false } },
{ "keys": ["ctrl+super+forward_slash"], "command": "toggle_comment", "args": { "block": true } },
{ "keys": ["ctrl+j"], "command": "join_lines" },
{ "keys": ["ctrl+shift+d"], "command": "duplicate_line" },
{ "keys": ["alt+backquote"], "command": "show_panel", "args": {"panel": "console", "toggle": true} },
{ "keys": ["alt+space"], "command": "auto_complete" },
{ "keys": ["alt+space"], "command": "replace_completion_with_auto_complete", "context":
[
{ "key": "last_command", "operator": "equal", "operand": "insert_best_completion" },
{ "key": "auto_complete_visible", "operator": "equal", "operand": false },
{ "key": "setting.tab_completion", "operator": "equal", "operand": true }
]
},
{ "keys": ["ctrl+super+p"], "command": "show_scope_name" },
{ "keys": ["alt+shift+p"], "command": "show_scope_name" },
{ "keys": ["f7"], "command": "build" },
{ "keys": ["ctrl+b"], "command": "build" },
{ "keys": ["ctrl+shift+b"], "command": "build", "args": {"select": true} },
{ "keys": ["alt+c"], "command": "cancel_build" },
{ "keys": ["alt+t"], "command": "transpose" },
{ "keys": ["f5"], "command": "sort_lines", "args": {"case_sensitive": false} },
{ "keys": ["alt+f5"], "command": "sort_lines", "args": {"case_sensitive": true} },
// Auto-pair quotes
{ "keys": ["\""], "command": "insert_snippet", "args": {"contents": "\"$0\""}, "context":
[
{ "key": "setting.auto_match_enabled", "operator": "equal", "operand": true },
{ "key": "selection_empty", "operator": "equal", "operand": true, "match_all": true },
{ "key": "following_text", "operator": "regex_contains", "operand": "^(?:\t| |\\)|]|\\}|>|$)", "match_all": true },
{ "key": "preceding_text", "operator": "not_regex_contains", "operand": "[\"a-zA-Z0-9_]$", "match_all": true },
{ "key": "eol_selector", "operator": "not_equal", "operand": "string.quoted.double - punctuation.definition.string.end", "match_all": true }
]
},
{ "keys": ["\""], "command": "insert_snippet", "args": {"contents": "\"${0:$SELECTION}\""}, "context":
[
{ "key": "setting.auto_match_enabled", "operator": "equal", "operand": true },
{ "key": "selection_empty", "operator": "equal", "operand": false, "match_all": true }
]
},
{ "keys": ["\""], "command": "move", "args": {"by": "characters", "forward": true}, "context":
[
{ "key": "setting.auto_match_enabled", "operator": "equal", "operand": true },
{ "key": "selection_empty", "operator": "equal", "operand": true, "match_all": true },
{ "key": "following_text", "operator": "regex_contains", "operand": "^\"", "match_all": true },
{ "key": "selector", "operator": "not_equal", "operand": "punctuation.definition.string.begin", "match_all": true },
{ "key": "eol_selector", "operator": "not_equal", "operand": "string.quoted.double - punctuation.definition.string.end", "match_all": true },
]
},
{ "keys": ["backspace"], "command": "run_macro_file", "args": {"file": "res://Packages/Default/Delete Left Right.sublime-macro"}, "context":
[
{ "key": "setting.auto_match_enabled", "operator": "equal", "operand": true },
{ "key": "selection_empty", "operator": "equal", "operand": true, "match_all": true },
{ "key": "preceding_text", "operator": "regex_contains", "operand": "\"$", "match_all": true },
{ "key": "following_text", "operator": "regex_contains", "operand": "^\"", "match_all": true },
{ "key": "selector", "operator": "not_equal", "operand": "punctuation.definition.string.begin", "match_all": true },
{ "key": "eol_selector", "operator": "not_equal", "operand": "string.quoted.double - punctuation.definition.string.end", "match_all": true },
]
},
// Auto-pair single quotes
{ "keys": ["'"], "command": "insert_snippet", "args": {"contents": "'$0'"}, "context":
[
{ "key": "setting.auto_match_enabled", "operator": "equal", "operand": true },
{ "key": "selection_empty", "operator": "equal", "operand": true, "match_all": true },
{ "key": "following_text", "operator": "regex_contains", "operand": "^(?:\t| |\\)|]|\\}|>|$)", "match_all": true },
{ "key": "preceding_text", "operator": "not_regex_contains", "operand": "['a-zA-Z0-9_]$", "match_all": true },
{ "key": "eol_selector", "operator": "not_equal", "operand": "string.quoted.single - punctuation.definition.string.end", "match_all": true }
]
},
{ "keys": ["'"], "command": "insert_snippet", "args": {"contents": "'${0:$SELECTION}'"}, "context":
[
{ "key": "setting.auto_match_enabled", "operator": "equal", "operand": true },
{ "key": "selection_empty", "operator": "equal", "operand": false, "match_all": true }
]
},
{ "keys": ["'"], "command": "move", "args": {"by": "characters", "forward": true}, "context":
[
{ "key": "setting.auto_match_enabled", "operator": "equal", "operand": true },
{ "key": "selection_empty", "operator": "equal", "operand": true, "match_all": true },
{ "key": "following_text", "operator": "regex_contains", "operand": "^'", "match_all": true },
{ "key": "selector", "operator": "not_equal", "operand": "punctuation.definition.string.begin", "match_all": true },
{ "key": "eol_selector", "operator": "not_equal", "operand": "string.quoted.single - punctuation.definition.string.end", "match_all": true },
]
},
{ "keys": ["backspace"], "command": "run_macro_file", "args": {"file": "res://Packages/Default/Delete Left Right.sublime-macro"}, "context":
[
{ "key": "setting.auto_match_enabled", "operator": "equal", "operand": true },
{ "key": "selection_empty", "operator": "equal", "operand": true, "match_all": true },
{ "key": "preceding_text", "operator": "regex_contains", "operand": "'$", "match_all": true },
{ "key": "following_text", "operator": "regex_contains", "operand": "^'", "match_all": true },
{ "key": "selector", "operator": "not_equal", "operand": "punctuation.definition.string.begin", "match_all": true },
{ "key": "eol_selector", "operator": "not_equal", "operand": "string.quoted.single - punctuation.definition.string.end", "match_all": true },
]
},
// Auto-pair brackets
{ "keys": ["("], "command": "insert_snippet", "args": {"contents": "($0)"}, "context":
[
{ "key": "setting.auto_match_enabled", "operator": "equal", "operand": true },
{ "key": "selection_empty", "operator": "equal", "operand": true, "match_all": true },
{ "key": "following_text", "operator": "regex_contains", "operand": "^(?:\t| |\\)|]|;|\\}|$)", "match_all": true }
]
},
{ "keys": ["("], "command": "insert_snippet", "args": {"contents": "(${0:$SELECTION})"}, "context":
[
{ "key": "setting.auto_match_enabled", "operator": "equal", "operand": true },
{ "key": "selection_empty", "operator": "equal", "operand": false, "match_all": true }
]
},
{ "keys": [")"], "command": "move", "args": {"by": "characters", "forward": true}, "context":
[
{ "key": "setting.auto_match_enabled", "operator": "equal", "operand": true },
{ "key": "selection_empty", "operator": "equal", "operand": true, "match_all": true },
{ "key": "following_text", "operator": "regex_contains", "operand": "^\\)", "match_all": true }
]
},
{ "keys": ["backspace"], "command": "run_macro_file", "args": {"file": "res://Packages/Default/Delete Left Right.sublime-macro"}, "context":
[
{ "key": "setting.auto_match_enabled", "operator": "equal", "operand": true },
{ "key": "selection_empty", "operator": "equal", "operand": true, "match_all": true },
{ "key": "preceding_text", "operator": "regex_contains", "operand": "\\($", "match_all": true },
{ "key": "following_text", "operator": "regex_contains", "operand": "^\\)", "match_all": true }
]
},
// Auto-pair square brackets
{ "keys": ["["], "command": "insert_snippet", "args": {"contents": "[$0]"}, "context":
[
{ "key": "setting.auto_match_enabled", "operator": "equal", "operand": true },
{ "key": "selection_empty", "operator": "equal", "operand": true, "match_all": true },
{ "key": "following_text", "operator": "regex_contains", "operand": "^(?:\t| |\\)|]|;|\\}|$)", "match_all": true }
]
},
{ "keys": ["["], "command": "insert_snippet", "args": {"contents": "[${0:$SELECTION}]"}, "context":
[
{ "key": "setting.auto_match_enabled", "operator": "equal", "operand": true },
{ "key": "selection_empty", "operator": "equal", "operand": false, "match_all": true }
]
},
{ "keys": ["]"], "command": "move", "args": {"by": "characters", "forward": true}, "context":
[
{ "key": "setting.auto_match_enabled", "operator": "equal", "operand": true },
{ "key": "selection_empty", "operator": "equal", "operand": true, "match_all": true },
{ "key": "following_text", "operator": "regex_contains", "operand": "^\\]", "match_all": true }
]
},
{ "keys": ["backspace"], "command": "run_macro_file", "args": {"file": "res://Packages/Default/Delete Left Right.sublime-macro"}, "context":
[
{ "key": "setting.auto_match_enabled", "operator": "equal", "operand": true },
{ "key": "selection_empty", "operator": "equal", "operand": true, "match_all": true },
{ "key": "preceding_text", "operator": "regex_contains", "operand": "\\[$", "match_all": true },
{ "key": "following_text", "operator": "regex_contains", "operand": "^\\]", "match_all": true }
]
},
// Auto-pair curly brackets
{ "keys": ["{"], "command": "insert_snippet", "args": {"contents": "{$0}"}, "context":
[
{ "key": "setting.auto_match_enabled", "operator": "equal", "operand": true },
{ "key": "selection_empty", "operator": "equal", "operand": true, "match_all": true },
{ "key": "following_text", "operator": "regex_contains", "operand": "^(?:\t| |\\)|]|\\}|$)", "match_all": true }
]
},
{ "keys": ["{"], "command": "wrap_block", "args": {"begin": "{", "end": "}"}, "context":
[
{ "key": "indented_block", "match_all": true },
{ "key": "setting.auto_match_enabled", "operator": "equal", "operand": true },
{ "key": "selection_empty", "operator": "equal", "operand": true, "match_all": true },
{ "key": "following_text", "operator": "regex_match", "operand": "^$", "match_all": true },
]
},
{ "keys": ["{"], "command": "insert_snippet", "args": {"contents": "{${0:$SELECTION}}"}, "context":
[
{ "key": "setting.auto_match_enabled", "operator": "equal", "operand": true },
{ "key": "selection_empty", "operator": "equal", "operand": false, "match_all": true }
]
},
{ "keys": ["}"], "command": "move", "args": {"by": "characters", "forward": true}, "context":
[
{ "key": "setting.auto_match_enabled", "operator": "equal", "operand": true },
{ "key": "selection_empty", "operator": "equal", "operand": true, "match_all": true },
{ "key": "following_text", "operator": "regex_contains", "operand": "^\\}", "match_all": true }
]
},
{ "keys": ["backspace"], "command": "run_macro_file", "args": {"file": "res://Packages/Default/Delete Left Right.sublime-macro"}, "context":
[
{ "key": "setting.auto_match_enabled", "operator": "equal", "operand": true },
{ "key": "selection_empty", "operator": "equal", "operand": true, "match_all": true },
{ "key": "preceding_text", "operator": "regex_contains", "operand": "\\{$", "match_all": true },
{ "key": "following_text", "operator": "regex_contains", "operand": "^\\}", "match_all": true }
]
},
{ "keys": ["enter"], "command": "run_macro_file", "args": {"file": "res://Packages/Default/Add Line in Braces.sublime-macro"}, "context":
[
{ "key": "setting.auto_indent", "operator": "equal", "operand": true },
{ "key": "selection_empty", "operator": "equal", "operand": true, "match_all": true },
{ "key": "preceding_text", "operator": "regex_contains", "operand": "\\{$", "match_all": true },
{ "key": "following_text", "operator": "regex_contains", "operand": "^\\}", "match_all": true }
]
},
{ "keys": ["shift+enter"], "command": "run_macro_file", "args": {"file": "res://Packages/Default/Add Line in Braces.sublime-macro"}, "context":
[
{ "key": "setting.auto_indent", "operator": "equal", "operand": true },
{ "key": "selection_empty", "operator": "equal", "operand": true, "match_all": true },
{ "key": "preceding_text", "operator": "regex_contains", "operand": "\\{$", "match_all": true },
{ "key": "following_text", "operator": "regex_contains", "operand": "^\\}", "match_all": true }
]
},
{ "keys": ["enter"], "command": "auto_indent_tag", "context":
[
{ "key": "setting.auto_indent", "operator": "equal", "operand": true },
{ "key": "selection_empty", "operator": "equal", "operand": true, "match_all": true },
{ "key": "selector", "operator": "equal", "operand": "punctuation.definition.tag.begin", "match_all": true },
{ "key": "preceding_text", "operator": "regex_contains", "operand": ">$", "match_all": true },
{ "key": "following_text", "operator": "regex_contains", "operand": "^</", "match_all": true },
]
},
{ "keys": ["shift+enter"], "command": "auto_indent_tag", "context":
[
{ "key": "setting.auto_indent", "operator": "equal", "operand": true },
{ "key": "selection_empty", "operator": "equal", "operand": true, "match_all": true },
{ "key": "selector", "operator": "equal", "operand": "punctuation.definition.tag.begin", "match_all": true },
{ "key": "preceding_text", "operator": "regex_contains", "operand": ">$", "match_all": true },
{ "key": "following_text", "operator": "regex_contains", "operand": "^</", "match_all": true },
]
},
{
"keys": ["ctrl+super+1"],
"command": "set_layout",
"args":
{
"cols": [0.0, 1.0],
"rows": [0.0, 1.0],
"cells": [[0, 0, 1, 1]]
}
},
{
"keys": ["ctrl+super+2"],
"command": "set_layout",
"args":
{
"cols": [0.0, 0.5, 1.0],
"rows": [0.0, 1.0],
"cells": [[0, 0, 1, 1], [1, 0, 2, 1]]
}
},
{
"keys": ["ctrl+super+3"],
"command": "set_layout",
"args":
{
"cols": [0.0, 0.33, 0.66, 1.0],
"rows": [0.0, 1.0],
"cells": [[0, 0, 1, 1], [1, 0, 2, 1], [2, 0, 3, 1]]
}
},
{
"keys": ["ctrl+super+4"],
"command": "set_layout",
"args":
{
"cols": [0.0, 0.25, 0.5, 0.75, 1.0],
"rows": [0.0, 1.0],
"cells": [[0, 0, 1, 1], [1, 0, 2, 1], [2, 0, 3, 1], [3, 0, 4, 1]]
}
},
{
"keys": ["ctrl+super+shift+2"],
"command": "set_layout",
"args":
{
"cols": [0.0, 1.0],
"rows": [0.0, 0.5, 1.0],
"cells": [[0, 0, 1, 1], [0, 1, 1, 2]]
}
},
{
"keys": ["ctrl+super+shift+3"],
"command": "set_layout",
"args":
{
"cols": [0.0, 1.0],
"rows": [0.0, 0.33, 0.66, 1.0],
"cells": [[0, 0, 1, 1], [0, 1, 1, 2], [0, 2, 1, 3]]
}
},
{
"keys": ["ctrl+super+5"],
"command": "set_layout",
"args":
{
"cols": [0.0, 0.5, 1.0],
"rows": [0.0, 0.5, 1.0],
"cells":
[
[0, 0, 1, 1], [1, 0, 2, 1],
[0, 1, 1, 2], [1, 1, 2, 2]
]
}
},
{ "keys": ["alt+1"], "command": "focus_group", "args": { "group": 0 } },
{ "keys": ["alt+2"], "command": "focus_group", "args": { "group": 1 } },
{ "keys": ["alt+3"], "command": "focus_group", "args": { "group": 2 } },
{ "keys": ["alt+4"], "command": "focus_group", "args": { "group": 3 } },
{ "keys": ["alt+5"], "command": "focus_group", "args": { "group": 4 } },
{ "keys": ["alt+6"], "command": "focus_group", "args": { "group": 5 } },
{ "keys": ["alt+7"], "command": "focus_group", "args": { "group": 6 } },
{ "keys": ["alt+8"], "command": "focus_group", "args": { "group": 7 } },
{ "keys": ["alt+9"], "command": "focus_group", "args": { "group": 8 } },
{ "keys": ["alt+shift+1"], "command": "move_to_group", "args": { "group": 0 } },
{ "keys": ["alt+shift+2"], "command": "move_to_group", "args": { "group": 1 } },
{ "keys": ["alt+shift+3"], "command": "move_to_group", "args": { "group": 2 } },
{ "keys": ["alt+shift+4"], "command": "move_to_group", "args": { "group": 3 } },
{ "keys": ["alt+shift+5"], "command": "move_to_group", "args": { "group": 4 } },
{ "keys": ["alt+shift+6"], "command": "move_to_group", "args": { "group": 5 } },
{ "keys": ["alt+shift+7"], "command": "move_to_group", "args": { "group": 6 } },
{ "keys": ["alt+shift+8"], "command": "move_to_group", "args": { "group": 7 } },
{ "keys": ["alt+shift+9"], "command": "move_to_group", "args": { "group": 8 } },
{ "keys": ["alt+0"], "command": "focus_side_bar" },
{ "keys": ["ctrl+k", "ctrl+up"], "command": "new_pane" },
{ "keys": ["ctrl+k", "ctrl+shift+up"], "command": "new_pane", "args": {"move": false} },
{ "keys": ["ctrl+k", "ctrl+down"], "command": "close_pane" },
{ "keys": ["ctrl+k", "ctrl+left"], "command": "focus_neighboring_group", "args": {"forward": false} },
{ "keys": ["ctrl+k", "ctrl+right"], "command": "focus_neighboring_group" },
{ "keys": ["ctrl+k", "ctrl+shift+left"], "command": "move_to_neighboring_group", "args": {"forward": false} },
{ "keys": ["ctrl+k", "ctrl+shift+right"], "command": "move_to_neighboring_group" },
{ "keys": ["ctrl+1"], "command": "select_by_index", "args": { "index": 0 } },
{ "keys": ["ctrl+2"], "command": "select_by_index", "args": { "index": 1 } },
{ "keys": ["ctrl+3"], "command": "select_by_index", "args": { "index": 2 } },
{ "keys": ["ctrl+4"], "command": "select_by_index", "args": { "index": 3 } },
{ "keys": ["ctrl+5"], "command": "select_by_index", "args": { "index": 4 } },
{ "keys": ["ctrl+6"], "command": "select_by_index", "args": { "index": 5 } },
{ "keys": ["ctrl+7"], "command": "select_by_index", "args": { "index": 6 } },
{ "keys": ["ctrl+8"], "command": "select_by_index", "args": { "index": 7 } },
{ "keys": ["ctrl+9"], "command": "select_by_index", "args": { "index": 8 } },
{ "keys": ["ctrl+0"], "command": "select_by_index", "args": { "index": 9 } },
{ "keys": ["f2"], "command": "next_bookmark" },
{ "keys": ["shift+f2"], "command": "prev_bookmark" },
{ "keys": ["ctrl+f2"], "command": "toggle_bookmark" },
{ "keys": ["ctrl+shift+f2"], "command": "clear_bookmarks" },
{ "keys": ["super+f2"], "command": "select_all_bookmarks" },
{ "keys": ["ctrl+k", "ctrl+u"], "command": "upper_case" },
{ "keys": ["ctrl+k", "ctrl+l"], "command": "lower_case" },
{ "keys": ["ctrl+k", "ctrl+space"], "command": "set_mark" },
{ "keys": ["ctrl+k", "ctrl+a"], "command": "select_to_mark" },
{ "keys": ["ctrl+k", "ctrl+w"], "command": "delete_to_mark" },
{ "keys": ["ctrl+k", "ctrl+x"], "command": "swap_with_mark" },
{ "keys": ["ctrl+k", "ctrl+g"], "command": "clear_bookmarks", "args": {"name": "mark"} },
{ "keys": ["ctrl+equals"], "command": "increase_font_size" },
{ "keys": ["ctrl+plus"], "command": "increase_font_size" },
{ "keys": ["ctrl+minus"], "command": "decrease_font_size" },
{ "keys": ["alt+shift+w"], "command": "insert_snippet", "args": { "name": "Packages/XML/Snippets/long-tag.sublime-snippet" } },
{ "keys": ["alt+shift+k"], "command": "run_macro_file", "args": {"file": "res://Packages/Default/Delete Line.sublime-macro"} },
{ "keys": ["ctrl+super+q"], "command": "wrap_lines" },
{ "keys": ["ctrl+super+["], "command": "fold" },
{ "keys": ["ctrl+super+]"], "command": "unfold" },
{ "keys": ["ctrl+k", "ctrl+1"], "command": "fold_by_level", "args": {"level": 1} },
{ "keys": ["ctrl+k", "ctrl+2"], "command": "fold_by_level", "args": {"level": 2} },
{ "keys": ["ctrl+k", "ctrl+3"], "command": "fold_by_level", "args": {"level": 3} },
{ "keys": ["ctrl+k", "ctrl+4"], "command": "fold_by_level", "args": {"level": 4} },
{ "keys": ["ctrl+k", "ctrl+5"], "command": "fold_by_level", "args": {"level": 5} },
{ "keys": ["ctrl+k", "ctrl+6"], "command": "fold_by_level", "args": {"level": 6} },
{ "keys": ["ctrl+k", "ctrl+7"], "command": "fold_by_level", "args": {"level": 7} },
{ "keys": ["ctrl+k", "ctrl+8"], "command": "fold_by_level", "args": {"level": 8} },
{ "keys": ["ctrl+k", "ctrl+9"], "command": "fold_by_level", "args": {"level": 9} },
{ "keys": ["ctrl+k", "ctrl+0"], "command": "unfold_all" },
{ "keys": ["ctrl+k", "ctrl+j"], "command": "unfold_all" },
{ "keys": ["ctrl+k", "ctrl+t"], "command": "fold_tag_attributes" },
{ "keys": ["ctrl+super+o"], "command": "toggle_overwrite" },
{ "keys": ["super+f2"], "command": "context_menu" },
{ "keys": ["ctrl+super+c"], "command": "toggle_case_sensitive", "context":
[
{ "key": "setting.is_widget", "operator": "equal", "operand": true }
]
},
{ "keys": ["ctrl+super+r"], "command": "toggle_regex", "context":
[
{ "key": "setting.is_widget", "operator": "equal", "operand": true }
]
},
{ "keys": ["ctrl+super+w"], "command": "toggle_whole_word", "context":
[
{ "key": "setting.is_widget", "operator": "equal", "operand": true }
]
},
{ "keys": ["ctrl+super+a"], "command": "toggle_preserve_case", "context":
[
{ "key": "setting.is_widget", "operator": "equal", "operand": true }
]
},
// Find panel key bindings
{ "keys": ["enter"], "command": "find_next", "context":
[{"key": "panel", "operand": "find"}, {"key": "panel_has_focus"}]
},
{ "keys": ["shift+enter"], "command": "find_prev", "context":
[{"key": "panel", "operand": "find"}, {"key": "panel_has_focus"}]
},
{ "keys": ["super+enter"], "command": "find_all", "args": {"close_panel": true},
"context": [{"key": "panel", "operand": "find"}, {"key": "panel_has_focus"}]
},
// Replace panel key bindings
{ "keys": ["enter"], "command": "find_next", "context":
[{"key": "panel", "operand": "replace"}, {"key": "panel_has_focus"}]
},
{ "keys": ["shift+enter"], "command": "find_prev", "context":
[{"key": "panel", "operand": "replace"}, {"key": "panel_has_focus"}]
},
{ "keys": ["super+enter"], "command": "find_all", "args": {"close_panel": true},
"context": [{"key": "panel", "operand": "replace"}, {"key": "panel_has_focus"}]
},
{ "keys": ["alt+super+enter"], "command": "replace_all", "args": {"close_panel": true},
"context": [{"key": "panel", "operand": "replace"}, {"key": "panel_has_focus"}]
},
// Incremental find panel key bindings
{ "keys": ["enter"], "command": "hide_panel", "context":
[{"key": "panel", "operand": "incremental_find"}, {"key": "panel_has_focus"}]
},
{ "keys": ["shift+enter"], "command": "find_prev", "context":
[{"key": "panel", "operand": "incremental_find"}, {"key": "panel_has_focus"}]
},
{ "keys": ["super+enter"], "command": "find_all", "args": {"close_panel": true},
"context": [{"key": "panel", "operand": "incremental_find"}, {"key": "panel_has_focus"}]
},
{ "keys": ["ctrl+,"], "command": "edit_settings", "args":
{
"base_file": "${packages}/Default/Preferences.sublime-settings",
"default": "// Settings in here override those in \"Default/Preferences.sublime-settings\",\n// and are overridden in turn by syntax-specific settings.\n{\n\t$0\n}\n"
}
},
{ "keys": ["ctrl+k", "ctrl+y"], "command": "yank" },
{ "keys": ["ctrl+k", "ctrl+k"], "command": "run_macro_file", "args": {"file": "res://Packages/Default/Delete to Hard EOL.sublime-macro"} },
{ "keys": ["ctrl+k", "ctrl+backspace"], "command": "run_macro_file", "args": {"file": "res://Packages/Default/Delete to Hard BOL.sublime-macro"} },
{ "keys": ["ctrl+k", "ctrl+c"], "command": "show_at_center" },
// These are OS X built in commands, and don't need to be listed here, but
// doing so lets them show up in the menu
{ "keys": ["alt+y"], "command": "yank" },
{ "keys": ["ctrl+backspace"], "command": "run_macro_file", "args": {"file": "res://Packages/Default/Delete to Hard BOL.sublime-macro"} },
// ctrl+delete isn't a built in command, but makes sense anyway
{ "keys": ["ctrl+delete"], "command": "run_macro_file", "args": {"file": "res://Packages/Default/Delete to Hard EOL.sublime-macro"} },
{ "keys": ["alt+k"], "command": "run_macro_file", "args": {"file": "res://Packages/Default/Delete to Hard EOL.sublime-macro"} },
{ "keys": ["alt+l"], "command": "show_at_center" },
{ "keys": ["alt+o"], "command": "insert_snippet", "args": { "contents": "$0\n" } },
{ "keys": ["alt+ctrl+d"], "command": "noop" },
{ "keys": ["alt+ctrl+shift+d"], "command": "noop" },
// HTML, XML close tag
{ "keys": ["/"], "command": "close_tag", "args": { "insert_slash": true }, "context":
[
{ "key": "selector", "operator": "equal", "operand": "(text.html, text.xml) - string - comment", "match_all": true },
{ "key": "preceding_text", "operator": "regex_match", "operand": ".*<$", "match_all": true },
{ "key": "setting.auto_close_tags" }
]
}
]

View File

@@ -1,706 +0,0 @@
/*
On OS X, basic text manipulations (left, right, command+left, etc) make use of the system key bindings,
and don't need to be repeated here. Anything listed here will take precedence, however.
*/
[
{ "keys": ["ctrl+shift+n"], "command": "new_window" },
{ "keys": ["ctrl+shift+w"], "command": "close_window" },
{ "keys": ["ctrl+o"], "command": "prompt_open" },
{ "keys": ["ctrl+shift+t"], "command": "reopen_last_file" },
{ "keys": ["ctrl+super+up"], "command": "switch_file", "args": {"extensions": ["cpp", "cxx", "cc", "c", "hpp", "hxx", "hh", "h", "ipp", "inl", "m", "mm"]} },
{ "keys": ["ctrl+n"], "command": "new_file" },
{ "keys": ["ctrl+s"], "command": "save" },
{ "keys": ["ctrl+shift+s"], "command": "prompt_save_as" },
{ "keys": ["ctrl+super+s"], "command": "save_all" },
{ "keys": ["ctrl+w"], "command": "close" },
{ "keys": ["ctrl+k", "ctrl+b"], "command": "toggle_side_bar" },
{ "keys": ["ctrl+alt+f"], "command": "toggle_full_screen" },
{ "keys": ["ctrl+alt+shift+f"], "command": "toggle_distraction_free" },
{ "keys": ["ctrl+z"], "command": "undo" },
{ "keys": ["ctrl+shift+z"], "command": "redo" },
{ "keys": ["ctrl+y"], "command": "redo_or_repeat" },
{ "keys": ["ctrl+u"], "command": "soft_undo" },
{ "keys": ["ctrl+shift+u"], "command": "soft_redo" },
{ "keys": ["ctrl+x"], "command": "cut" },
{ "keys": ["ctrl+c"], "command": "copy" },
{ "keys": ["ctrl+v"], "command": "paste" },
{ "keys": ["ctrl+shift+v"], "command": "paste_and_indent" },
{ "keys": ["ctrl+k", "ctrl+v"], "command": "paste_from_history" },
{ "keys": ["ctrl+option+v"], "command": "paste_from_history" },
{ "keys": ["alt+super+left"], "command": "move", "args": {"by": "subwords", "forward": false} },
{ "keys": ["alt+super+right"], "command": "move", "args": {"by": "subword_ends", "forward": true} },
{ "keys": ["alt+super+shift+left"], "command": "move", "args": {"by": "subwords", "forward": false, "extend": true} },
{ "keys": ["alt+super+shift+right"], "command": "move", "args": {"by": "subword_ends", "forward": true, "extend": true} },
{ "keys": ["alt+left"], "command": "move", "args": {"by": "subwords", "forward": false} },
{ "keys": ["alt+right"], "command": "move", "args": {"by": "subword_ends", "forward": true} },
{ "keys": ["alt+shift+left"], "command": "move", "args": {"by": "subwords", "forward": false, "extend": true} },
{ "keys": ["alt+shift+right"], "command": "move", "args": {"by": "subword_ends", "forward": true, "extend": true} },
{ "keys": ["alt+super+up"], "command": "scroll_lines", "args": {"amount": 1.0} },
{ "keys": ["alt+super+down"], "command": "scroll_lines", "args": {"amount": -1.0} },
{ "keys": ["alt+shift+up"], "command": "select_lines", "args": {"forward": false} },
{ "keys": ["alt+shift+down"], "command": "select_lines", "args": {"forward": true} },
{ "keys": ["ctrl+shift+["], "command": "prev_view" },
{ "keys": ["ctrl+shift+]"], "command": "next_view" },
{ "keys": ["ctrl+super+left"], "command": "prev_view" },
{ "keys": ["ctrl+super+right"], "command": "next_view" },
{ "keys": ["alt+tab"], "command": "next_view_in_stack" },
{ "keys": ["alt+shift+tab"], "command": "prev_view_in_stack" },
{ "keys": ["ctrl+a"], "command": "select_all" },
{ "keys": ["ctrl+shift+l"], "command": "split_selection_into_lines" },
{ "keys": ["escape"], "command": "single_selection", "context":
[
{ "key": "num_selections", "operator": "not_equal", "operand": 1 }
]
},
{ "keys": ["escape"], "command": "clear_fields", "context":
[
{ "key": "has_next_field", "operator": "equal", "operand": true }
]
},
{ "keys": ["escape"], "command": "clear_fields", "context":
[
{ "key": "has_prev_field", "operator": "equal", "operand": true }
]
},
{ "keys": ["escape"], "command": "hide_panel", "args": {"cancel": true},
"context":
[
{ "key": "panel_visible", "operator": "equal", "operand": true }
]
},
{ "keys": ["escape"], "command": "hide_overlay", "context":
[
{ "key": "overlay_visible", "operator": "equal", "operand": true }
]
},
{ "keys": ["escape"], "command": "hide_popup", "context":
[
{ "key": "popup_visible", "operator": "equal", "operand": true }
]
},
{ "keys": ["escape"], "command": "hide_auto_complete", "context":
[
{ "key": "auto_complete_visible", "operator": "equal", "operand": true }
]
},
{ "keys": ["ctrl+]"], "command": "indent" },
{ "keys": ["ctrl+["], "command": "unindent" },
{ "keys": ["tab"], "command": "insert_best_completion", "args": {"default": "\t", "exact": true} },
{ "keys": ["tab"], "command": "insert_best_completion", "args": {"default": "\t", "exact": false},
"context":
[
{ "key": "setting.tab_completion", "operator": "equal", "operand": true },
{ "key": "preceding_text", "operator": "not_regex_match", "operand": ".*\\b[0-9]+$", "match_all": true },
]
},
{ "keys": ["tab"], "command": "replace_completion_with_next_completion", "context":
[
{ "key": "last_command", "operator": "equal", "operand": "insert_best_completion" },
{ "key": "setting.tab_completion", "operator": "equal", "operand": true }
]
},
{ "keys": ["tab"], "command": "reindent", "context":
[
{ "key": "setting.auto_indent", "operator": "equal", "operand": true },
{ "key": "selection_empty", "operator": "equal", "operand": true, "match_all": true },
{ "key": "preceding_text", "operator": "regex_match", "operand": "^$", "match_all": true },
{ "key": "following_text", "operator": "regex_match", "operand": "^$", "match_all": true }
]
},
{ "keys": ["tab"], "command": "indent", "context":
[
{ "key": "text", "operator": "regex_contains", "operand": "\n" }
]
},
{ "keys": ["tab"], "command": "next_field", "context":
[
{ "key": "has_next_field", "operator": "equal", "operand": true }
]
},
{ "keys": ["tab"], "command": "commit_completion", "context":
[
{ "key": "auto_complete_visible" },
{ "key": "setting.auto_complete_commit_on_tab" }
]
},
{ "keys": ["shift+tab"], "command": "insert", "args": {"characters": "\t"} },
{ "keys": ["shift+tab"], "command": "unindent", "context":
[
{ "key": "setting.shift_tab_unindent", "operator": "equal", "operand": true }
]
},
{ "keys": ["shift+tab"], "command": "unindent", "context":
[
{ "key": "preceding_text", "operator": "regex_match", "operand": "^[\t ]*" }
]
},
{ "keys": ["shift+tab"], "command": "unindent", "context":
[
{ "key": "text", "operator": "regex_contains", "operand": "\n" }
]
},
{ "keys": ["shift+tab"], "command": "prev_field", "context":
[
{ "key": "has_prev_field", "operator": "equal", "operand": true }
]
},
{ "keys": ["ctrl+l"], "command": "expand_selection", "args": {"to": "line"} },
{ "keys": ["ctrl+d"], "command": "find_under_expand" },
{ "keys": ["ctrl+k", "ctrl+d"], "command": "find_under_expand_skip" },
{ "keys": ["ctrl+shift+space"], "command": "expand_selection", "args": {"to": "scope"} },
{ "keys": ["alt+shift+m"], "command": "expand_selection", "args": {"to": "brackets"} },
{ "keys": ["alt+m"], "command": "move_to", "args": {"to": "brackets"} },
{ "keys": ["ctrl+shift+j"], "command": "expand_selection", "args": {"to": "indentation"} },
{ "keys": ["ctrl+shift+a"], "command": "expand_selection", "args": {"to": "tag"} },
{ "keys": ["ctrl+super+."], "command": "close_tag" },
{ "keys": ["alt+q"], "command": "toggle_record_macro" },
{ "keys": ["alt+shift+q"], "command": "run_macro" },
{ "keys": ["ctrl+enter"], "command": "run_macro_file", "args": {"file": "res://Packages/Default/Add Line.sublime-macro"} },
{ "keys": ["ctrl+shift+enter"], "command": "run_macro_file", "args": {"file": "res://Packages/Default/Add Line Before.sublime-macro"} },
{ "keys": ["enter"], "command": "commit_completion", "context":
[
{ "key": "auto_complete_visible" },
{ "key": "setting.auto_complete_commit_on_tab", "operand": false }
]
},
{ "keys": ["ctrl+t"], "command": "show_overlay", "args": {"overlay": "goto", "show_files": true} },
{ "keys": ["ctrl+p"], "command": "show_overlay", "args": {"overlay": "goto", "show_files": true} },
{ "keys": ["ctrl+shift+p"], "command": "show_overlay", "args": {"overlay": "command_palette"} },
{ "keys": ["ctrl+alt+p"], "command": "prompt_select_workspace" },
{ "keys": ["ctrl+r"], "command": "show_overlay", "args": {"overlay": "goto", "text": "@"} },
{ "keys": ["alt+g"], "command": "show_overlay", "args": {"overlay": "goto", "text": ":"} },
{ "keys": ["f12"], "command": "goto_definition" },
{ "keys": ["ctrl+super+down"], "command": "goto_definition" },
{ "keys": ["ctrl+shift+r"], "command": "goto_symbol_in_project" },
{ "keys": ["alt+minus"], "command": "jump_back" },
{ "keys": ["alt+shift+minus"], "command": "jump_forward" },
{ "keys": ["ctrl+i"], "command": "show_panel", "args": {"panel": "incremental_find", "reverse": false} },
{ "keys": ["ctrl+shift+i"], "command": "show_panel", "args": {"panel": "incremental_find", "reverse": true} },
{ "keys": ["ctrl+f"], "command": "show_panel", "args": {"panel": "find", "reverse": false} },
{ "keys": ["ctrl+super+f"], "command": "show_panel", "args": {"panel": "replace", "reverse": false} },
{ "keys": ["ctrl+super+e"], "command": "replace_next" },
{ "keys": ["ctrl+g"], "command": "find_next" },
{ "keys": ["ctrl+shift+g"], "command": "find_prev" },
{ "keys": ["ctrl+e"], "command": "slurp_find_string" },
{ "keys": ["ctrl+shift+e"], "command": "slurp_replace_string" },
{ "keys": ["super+ctrl+g"], "command": "find_under" },
{ "keys": ["shift+super+ctrl+g"], "command": "find_under_prev" },
{ "keys": ["alt+ctrl+g"], "command": "find_all_under" },
{ "keys": ["ctrl+shift+f"], "command": "show_panel", "args": {"panel": "find_in_files"} },
{ "keys": ["f4"], "command": "next_result" },
{ "keys": ["shift+f4"], "command": "prev_result" },
{ "keys": ["f6"], "command": "toggle_setting", "args": {"setting": "spell_check"} },
{ "keys": ["alt+f6"], "command": "next_misspelling" },
{ "keys": ["alt+shift+f6"], "command": "prev_misspelling" },
{ "keys": ["alt+ctrl+up"], "command": "swap_line_up" },
{ "keys": ["alt+ctrl+down"], "command": "swap_line_down" },
{ "keys": ["alt+backspace"], "command": "delete_word", "args": { "forward": false, "sub_words": true } },
{ "keys": ["alt+delete"], "command": "delete_word", "args": { "forward": true, "sub_words": true } },
{ "keys": ["ctrl+forward_slash"], "command": "toggle_comment", "args": { "block": false } },
{ "keys": ["ctrl+super+forward_slash"], "command": "toggle_comment", "args": { "block": true } },
{ "keys": ["ctrl+j"], "command": "join_lines" },
{ "keys": ["ctrl+shift+d"], "command": "duplicate_line" },
{ "keys": ["alt+backquote"], "command": "show_panel", "args": {"panel": "console", "toggle": true} },
{ "keys": ["alt+space"], "command": "auto_complete" },
{ "keys": ["alt+space"], "command": "replace_completion_with_auto_complete", "context":
[
{ "key": "last_command", "operator": "equal", "operand": "insert_best_completion" },
{ "key": "auto_complete_visible", "operator": "equal", "operand": false },
{ "key": "setting.tab_completion", "operator": "equal", "operand": true }
]
},
{ "keys": ["ctrl+super+p"], "command": "show_scope_name" },
{ "keys": ["alt+shift+p"], "command": "show_scope_name" },
{ "keys": ["f7"], "command": "build" },
{ "keys": ["ctrl+b"], "command": "build" },
{ "keys": ["ctrl+shift+b"], "command": "build", "args": {"select": true} },
{ "keys": ["alt+c"], "command": "cancel_build" },
{ "keys": ["alt+t"], "command": "transpose" },
{ "keys": ["f5"], "command": "sort_lines", "args": {"case_sensitive": false} },
{ "keys": ["alt+f5"], "command": "sort_lines", "args": {"case_sensitive": true} },
// Auto-pair quotes
{ "keys": ["\""], "command": "insert_snippet", "args": {"contents": "\"$0\""}, "context":
[
{ "key": "setting.auto_match_enabled", "operator": "equal", "operand": true },
{ "key": "selection_empty", "operator": "equal", "operand": true, "match_all": true },
{ "key": "following_text", "operator": "regex_contains", "operand": "^(?:\t| |\\)|]|\\}|>|$)", "match_all": true },
{ "key": "preceding_text", "operator": "not_regex_contains", "operand": "[\"a-zA-Z0-9_]$", "match_all": true },
{ "key": "eol_selector", "operator": "not_equal", "operand": "string.quoted.double - punctuation.definition.string.end", "match_all": true }
]
},
{ "keys": ["\""], "command": "insert_snippet", "args": {"contents": "\"${0:$SELECTION}\""}, "context":
[
{ "key": "setting.auto_match_enabled", "operator": "equal", "operand": true },
{ "key": "selection_empty", "operator": "equal", "operand": false, "match_all": true }
]
},
{ "keys": ["\""], "command": "move", "args": {"by": "characters", "forward": true}, "context":
[
{ "key": "setting.auto_match_enabled", "operator": "equal", "operand": true },
{ "key": "selection_empty", "operator": "equal", "operand": true, "match_all": true },
{ "key": "following_text", "operator": "regex_contains", "operand": "^\"", "match_all": true },
{ "key": "selector", "operator": "not_equal", "operand": "punctuation.definition.string.begin", "match_all": true },
{ "key": "eol_selector", "operator": "not_equal", "operand": "string.quoted.double - punctuation.definition.string.end", "match_all": true },
]
},
{ "keys": ["backspace"], "command": "run_macro_file", "args": {"file": "res://Packages/Default/Delete Left Right.sublime-macro"}, "context":
[
{ "key": "setting.auto_match_enabled", "operator": "equal", "operand": true },
{ "key": "selection_empty", "operator": "equal", "operand": true, "match_all": true },
{ "key": "preceding_text", "operator": "regex_contains", "operand": "\"$", "match_all": true },
{ "key": "following_text", "operator": "regex_contains", "operand": "^\"", "match_all": true },
{ "key": "selector", "operator": "not_equal", "operand": "punctuation.definition.string.begin", "match_all": true },
{ "key": "eol_selector", "operator": "not_equal", "operand": "string.quoted.double - punctuation.definition.string.end", "match_all": true },
]
},
// Auto-pair single quotes
{ "keys": ["'"], "command": "insert_snippet", "args": {"contents": "'$0'"}, "context":
[
{ "key": "setting.auto_match_enabled", "operator": "equal", "operand": true },
{ "key": "selection_empty", "operator": "equal", "operand": true, "match_all": true },
{ "key": "following_text", "operator": "regex_contains", "operand": "^(?:\t| |\\)|]|\\}|>|$)", "match_all": true },
{ "key": "preceding_text", "operator": "not_regex_contains", "operand": "['a-zA-Z0-9_]$", "match_all": true },
{ "key": "eol_selector", "operator": "not_equal", "operand": "string.quoted.single - punctuation.definition.string.end", "match_all": true }
]
},
{ "keys": ["'"], "command": "insert_snippet", "args": {"contents": "'${0:$SELECTION}'"}, "context":
[
{ "key": "setting.auto_match_enabled", "operator": "equal", "operand": true },
{ "key": "selection_empty", "operator": "equal", "operand": false, "match_all": true }
]
},
{ "keys": ["'"], "command": "move", "args": {"by": "characters", "forward": true}, "context":
[
{ "key": "setting.auto_match_enabled", "operator": "equal", "operand": true },
{ "key": "selection_empty", "operator": "equal", "operand": true, "match_all": true },
{ "key": "following_text", "operator": "regex_contains", "operand": "^'", "match_all": true },
{ "key": "selector", "operator": "not_equal", "operand": "punctuation.definition.string.begin", "match_all": true },
{ "key": "eol_selector", "operator": "not_equal", "operand": "string.quoted.single - punctuation.definition.string.end", "match_all": true },
]
},
{ "keys": ["backspace"], "command": "run_macro_file", "args": {"file": "res://Packages/Default/Delete Left Right.sublime-macro"}, "context":
[
{ "key": "setting.auto_match_enabled", "operator": "equal", "operand": true },
{ "key": "selection_empty", "operator": "equal", "operand": true, "match_all": true },
{ "key": "preceding_text", "operator": "regex_contains", "operand": "'$", "match_all": true },
{ "key": "following_text", "operator": "regex_contains", "operand": "^'", "match_all": true },
{ "key": "selector", "operator": "not_equal", "operand": "punctuation.definition.string.begin", "match_all": true },
{ "key": "eol_selector", "operator": "not_equal", "operand": "string.quoted.single - punctuation.definition.string.end", "match_all": true },
]
},
// Auto-pair brackets
{ "keys": ["("], "command": "insert_snippet", "args": {"contents": "($0)"}, "context":
[
{ "key": "setting.auto_match_enabled", "operator": "equal", "operand": true },
{ "key": "selection_empty", "operator": "equal", "operand": true, "match_all": true },
{ "key": "following_text", "operator": "regex_contains", "operand": "^(?:\t| |\\)|]|;|\\}|$)", "match_all": true }
]
},
{ "keys": ["("], "command": "insert_snippet", "args": {"contents": "(${0:$SELECTION})"}, "context":
[
{ "key": "setting.auto_match_enabled", "operator": "equal", "operand": true },
{ "key": "selection_empty", "operator": "equal", "operand": false, "match_all": true }
]
},
{ "keys": [")"], "command": "move", "args": {"by": "characters", "forward": true}, "context":
[
{ "key": "setting.auto_match_enabled", "operator": "equal", "operand": true },
{ "key": "selection_empty", "operator": "equal", "operand": true, "match_all": true },
{ "key": "following_text", "operator": "regex_contains", "operand": "^\\)", "match_all": true }
]
},
{ "keys": ["backspace"], "command": "run_macro_file", "args": {"file": "res://Packages/Default/Delete Left Right.sublime-macro"}, "context":
[
{ "key": "setting.auto_match_enabled", "operator": "equal", "operand": true },
{ "key": "selection_empty", "operator": "equal", "operand": true, "match_all": true },
{ "key": "preceding_text", "operator": "regex_contains", "operand": "\\($", "match_all": true },
{ "key": "following_text", "operator": "regex_contains", "operand": "^\\)", "match_all": true }
]
},
// Auto-pair square brackets
{ "keys": ["["], "command": "insert_snippet", "args": {"contents": "[$0]"}, "context":
[
{ "key": "setting.auto_match_enabled", "operator": "equal", "operand": true },
{ "key": "selection_empty", "operator": "equal", "operand": true, "match_all": true },
{ "key": "following_text", "operator": "regex_contains", "operand": "^(?:\t| |\\)|]|;|\\}|$)", "match_all": true }
]
},
{ "keys": ["["], "command": "insert_snippet", "args": {"contents": "[${0:$SELECTION}]"}, "context":
[
{ "key": "setting.auto_match_enabled", "operator": "equal", "operand": true },
{ "key": "selection_empty", "operator": "equal", "operand": false, "match_all": true }
]
},
{ "keys": ["]"], "command": "move", "args": {"by": "characters", "forward": true}, "context":
[
{ "key": "setting.auto_match_enabled", "operator": "equal", "operand": true },
{ "key": "selection_empty", "operator": "equal", "operand": true, "match_all": true },
{ "key": "following_text", "operator": "regex_contains", "operand": "^\\]", "match_all": true }
]
},
{ "keys": ["backspace"], "command": "run_macro_file", "args": {"file": "res://Packages/Default/Delete Left Right.sublime-macro"}, "context":
[
{ "key": "setting.auto_match_enabled", "operator": "equal", "operand": true },
{ "key": "selection_empty", "operator": "equal", "operand": true, "match_all": true },
{ "key": "preceding_text", "operator": "regex_contains", "operand": "\\[$", "match_all": true },
{ "key": "following_text", "operator": "regex_contains", "operand": "^\\]", "match_all": true }
]
},
// Auto-pair curly brackets
{ "keys": ["{"], "command": "insert_snippet", "args": {"contents": "{$0}"}, "context":
[
{ "key": "setting.auto_match_enabled", "operator": "equal", "operand": true },
{ "key": "selection_empty", "operator": "equal", "operand": true, "match_all": true },
{ "key": "following_text", "operator": "regex_contains", "operand": "^(?:\t| |\\)|]|\\}|$)", "match_all": true }
]
},
{ "keys": ["{"], "command": "wrap_block", "args": {"begin": "{", "end": "}"}, "context":
[
{ "key": "indented_block", "match_all": true },
{ "key": "setting.auto_match_enabled", "operator": "equal", "operand": true },
{ "key": "selection_empty", "operator": "equal", "operand": true, "match_all": true },
{ "key": "following_text", "operator": "regex_match", "operand": "^$", "match_all": true },
]
},
{ "keys": ["{"], "command": "insert_snippet", "args": {"contents": "{${0:$SELECTION}}"}, "context":
[
{ "key": "setting.auto_match_enabled", "operator": "equal", "operand": true },
{ "key": "selection_empty", "operator": "equal", "operand": false, "match_all": true }
]
},
{ "keys": ["}"], "command": "move", "args": {"by": "characters", "forward": true}, "context":
[
{ "key": "setting.auto_match_enabled", "operator": "equal", "operand": true },
{ "key": "selection_empty", "operator": "equal", "operand": true, "match_all": true },
{ "key": "following_text", "operator": "regex_contains", "operand": "^\\}", "match_all": true }
]
},
{ "keys": ["backspace"], "command": "run_macro_file", "args": {"file": "res://Packages/Default/Delete Left Right.sublime-macro"}, "context":
[
{ "key": "setting.auto_match_enabled", "operator": "equal", "operand": true },
{ "key": "selection_empty", "operator": "equal", "operand": true, "match_all": true },
{ "key": "preceding_text", "operator": "regex_contains", "operand": "\\{$", "match_all": true },
{ "key": "following_text", "operator": "regex_contains", "operand": "^\\}", "match_all": true }
]
},
{ "keys": ["enter"], "command": "run_macro_file", "args": {"file": "res://Packages/Default/Add Line in Braces.sublime-macro"}, "context":
[
{ "key": "setting.auto_indent", "operator": "equal", "operand": true },
{ "key": "selection_empty", "operator": "equal", "operand": true, "match_all": true },
{ "key": "preceding_text", "operator": "regex_contains", "operand": "\\{$", "match_all": true },
{ "key": "following_text", "operator": "regex_contains", "operand": "^\\}", "match_all": true }
]
},
{ "keys": ["shift+enter"], "command": "run_macro_file", "args": {"file": "res://Packages/Default/Add Line in Braces.sublime-macro"}, "context":
[
{ "key": "setting.auto_indent", "operator": "equal", "operand": true },
{ "key": "selection_empty", "operator": "equal", "operand": true, "match_all": true },
{ "key": "preceding_text", "operator": "regex_contains", "operand": "\\{$", "match_all": true },
{ "key": "following_text", "operator": "regex_contains", "operand": "^\\}", "match_all": true }
]
},
{ "keys": ["enter"], "command": "auto_indent_tag", "context":
[
{ "key": "setting.auto_indent", "operator": "equal", "operand": true },
{ "key": "selection_empty", "operator": "equal", "operand": true, "match_all": true },
{ "key": "selector", "operator": "equal", "operand": "punctuation.definition.tag.begin", "match_all": true },
{ "key": "preceding_text", "operator": "regex_contains", "operand": ">$", "match_all": true },
{ "key": "following_text", "operator": "regex_contains", "operand": "^</", "match_all": true },
]
},
{ "keys": ["shift+enter"], "command": "auto_indent_tag", "context":
[
{ "key": "setting.auto_indent", "operator": "equal", "operand": true },
{ "key": "selection_empty", "operator": "equal", "operand": true, "match_all": true },
{ "key": "selector", "operator": "equal", "operand": "punctuation.definition.tag.begin", "match_all": true },
{ "key": "preceding_text", "operator": "regex_contains", "operand": ">$", "match_all": true },
{ "key": "following_text", "operator": "regex_contains", "operand": "^</", "match_all": true },
]
},
{
"keys": ["ctrl+super+1"],
"command": "set_layout",
"args":
{
"cols": [0.0, 1.0],
"rows": [0.0, 1.0],
"cells": [[0, 0, 1, 1]]
}
},
{
"keys": ["ctrl+super+2"],
"command": "set_layout",
"args":
{
"cols": [0.0, 0.5, 1.0],
"rows": [0.0, 1.0],
"cells": [[0, 0, 1, 1], [1, 0, 2, 1]]
}
},
{
"keys": ["ctrl+super+3"],
"command": "set_layout",
"args":
{
"cols": [0.0, 0.33, 0.66, 1.0],
"rows": [0.0, 1.0],
"cells": [[0, 0, 1, 1], [1, 0, 2, 1], [2, 0, 3, 1]]
}
},
{
"keys": ["ctrl+super+4"],
"command": "set_layout",
"args":
{
"cols": [0.0, 0.25, 0.5, 0.75, 1.0],
"rows": [0.0, 1.0],
"cells": [[0, 0, 1, 1], [1, 0, 2, 1], [2, 0, 3, 1], [3, 0, 4, 1]]
}
},
{
"keys": ["ctrl+super+shift+2"],
"command": "set_layout",
"args":
{
"cols": [0.0, 1.0],
"rows": [0.0, 0.5, 1.0],
"cells": [[0, 0, 1, 1], [0, 1, 1, 2]]
}
},
{
"keys": ["ctrl+super+shift+3"],
"command": "set_layout",
"args":
{
"cols": [0.0, 1.0],
"rows": [0.0, 0.33, 0.66, 1.0],
"cells": [[0, 0, 1, 1], [0, 1, 1, 2], [0, 2, 1, 3]]
}
},
{
"keys": ["ctrl+super+5"],
"command": "set_layout",
"args":
{
"cols": [0.0, 0.5, 1.0],
"rows": [0.0, 0.5, 1.0],
"cells":
[
[0, 0, 1, 1], [1, 0, 2, 1],
[0, 1, 1, 2], [1, 1, 2, 2]
]
}
},
{ "keys": ["alt+1"], "command": "focus_group", "args": { "group": 0 } },
{ "keys": ["alt+2"], "command": "focus_group", "args": { "group": 1 } },
{ "keys": ["alt+3"], "command": "focus_group", "args": { "group": 2 } },
{ "keys": ["alt+4"], "command": "focus_group", "args": { "group": 3 } },
{ "keys": ["alt+5"], "command": "focus_group", "args": { "group": 4 } },
{ "keys": ["alt+6"], "command": "focus_group", "args": { "group": 5 } },
{ "keys": ["alt+7"], "command": "focus_group", "args": { "group": 6 } },
{ "keys": ["alt+8"], "command": "focus_group", "args": { "group": 7 } },
{ "keys": ["alt+9"], "command": "focus_group", "args": { "group": 8 } },
{ "keys": ["alt+shift+1"], "command": "move_to_group", "args": { "group": 0 } },
{ "keys": ["alt+shift+2"], "command": "move_to_group", "args": { "group": 1 } },
{ "keys": ["alt+shift+3"], "command": "move_to_group", "args": { "group": 2 } },
{ "keys": ["alt+shift+4"], "command": "move_to_group", "args": { "group": 3 } },
{ "keys": ["alt+shift+5"], "command": "move_to_group", "args": { "group": 4 } },
{ "keys": ["alt+shift+6"], "command": "move_to_group", "args": { "group": 5 } },
{ "keys": ["alt+shift+7"], "command": "move_to_group", "args": { "group": 6 } },
{ "keys": ["alt+shift+8"], "command": "move_to_group", "args": { "group": 7 } },
{ "keys": ["alt+shift+9"], "command": "move_to_group", "args": { "group": 8 } },
{ "keys": ["alt+0"], "command": "focus_side_bar" },
{ "keys": ["ctrl+k", "ctrl+up"], "command": "new_pane" },
{ "keys": ["ctrl+k", "ctrl+shift+up"], "command": "new_pane", "args": {"move": false} },
{ "keys": ["ctrl+k", "ctrl+down"], "command": "close_pane" },
{ "keys": ["ctrl+k", "ctrl+left"], "command": "focus_neighboring_group", "args": {"forward": false} },
{ "keys": ["ctrl+k", "ctrl+right"], "command": "focus_neighboring_group" },
{ "keys": ["ctrl+k", "ctrl+shift+left"], "command": "move_to_neighboring_group", "args": {"forward": false} },
{ "keys": ["ctrl+k", "ctrl+shift+right"], "command": "move_to_neighboring_group" },
{ "keys": ["ctrl+1"], "command": "select_by_index", "args": { "index": 0 } },
{ "keys": ["ctrl+2"], "command": "select_by_index", "args": { "index": 1 } },
{ "keys": ["ctrl+3"], "command": "select_by_index", "args": { "index": 2 } },
{ "keys": ["ctrl+4"], "command": "select_by_index", "args": { "index": 3 } },
{ "keys": ["ctrl+5"], "command": "select_by_index", "args": { "index": 4 } },
{ "keys": ["ctrl+6"], "command": "select_by_index", "args": { "index": 5 } },
{ "keys": ["ctrl+7"], "command": "select_by_index", "args": { "index": 6 } },
{ "keys": ["ctrl+8"], "command": "select_by_index", "args": { "index": 7 } },
{ "keys": ["ctrl+9"], "command": "select_by_index", "args": { "index": 8 } },
{ "keys": ["ctrl+0"], "command": "select_by_index", "args": { "index": 9 } },
{ "keys": ["f2"], "command": "next_bookmark" },
{ "keys": ["shift+f2"], "command": "prev_bookmark" },
{ "keys": ["ctrl+f2"], "command": "toggle_bookmark" },
{ "keys": ["ctrl+shift+f2"], "command": "clear_bookmarks" },
{ "keys": ["super+f2"], "command": "select_all_bookmarks" },
{ "keys": ["ctrl+k", "ctrl+u"], "command": "upper_case" },
{ "keys": ["ctrl+k", "ctrl+l"], "command": "lower_case" },
{ "keys": ["ctrl+k", "ctrl+space"], "command": "set_mark" },
{ "keys": ["ctrl+k", "ctrl+a"], "command": "select_to_mark" },
{ "keys": ["ctrl+k", "ctrl+w"], "command": "delete_to_mark" },
{ "keys": ["ctrl+k", "ctrl+x"], "command": "swap_with_mark" },
{ "keys": ["ctrl+k", "ctrl+g"], "command": "clear_bookmarks", "args": {"name": "mark"} },
{ "keys": ["ctrl+equals"], "command": "increase_font_size" },
{ "keys": ["ctrl+plus"], "command": "increase_font_size" },
{ "keys": ["ctrl+minus"], "command": "decrease_font_size" },
{ "keys": ["alt+shift+w"], "command": "insert_snippet", "args": { "name": "Packages/XML/Snippets/long-tag.sublime-snippet" } },
{ "keys": ["alt+shift+k"], "command": "run_macro_file", "args": {"file": "res://Packages/Default/Delete Line.sublime-macro"} },
{ "keys": ["ctrl+super+q"], "command": "wrap_lines" },
{ "keys": ["ctrl+super+["], "command": "fold" },
{ "keys": ["ctrl+super+]"], "command": "unfold" },
{ "keys": ["ctrl+k", "ctrl+1"], "command": "fold_by_level", "args": {"level": 1} },
{ "keys": ["ctrl+k", "ctrl+2"], "command": "fold_by_level", "args": {"level": 2} },
{ "keys": ["ctrl+k", "ctrl+3"], "command": "fold_by_level", "args": {"level": 3} },
{ "keys": ["ctrl+k", "ctrl+4"], "command": "fold_by_level", "args": {"level": 4} },
{ "keys": ["ctrl+k", "ctrl+5"], "command": "fold_by_level", "args": {"level": 5} },
{ "keys": ["ctrl+k", "ctrl+6"], "command": "fold_by_level", "args": {"level": 6} },
{ "keys": ["ctrl+k", "ctrl+7"], "command": "fold_by_level", "args": {"level": 7} },
{ "keys": ["ctrl+k", "ctrl+8"], "command": "fold_by_level", "args": {"level": 8} },
{ "keys": ["ctrl+k", "ctrl+9"], "command": "fold_by_level", "args": {"level": 9} },
{ "keys": ["ctrl+k", "ctrl+0"], "command": "unfold_all" },
{ "keys": ["ctrl+k", "ctrl+j"], "command": "unfold_all" },
{ "keys": ["ctrl+k", "ctrl+t"], "command": "fold_tag_attributes" },
{ "keys": ["ctrl+super+o"], "command": "toggle_overwrite" },
{ "keys": ["super+f2"], "command": "context_menu" },
{ "keys": ["ctrl+super+c"], "command": "toggle_case_sensitive", "context":
[
{ "key": "setting.is_widget", "operator": "equal", "operand": true }
]
},
{ "keys": ["ctrl+super+r"], "command": "toggle_regex", "context":
[
{ "key": "setting.is_widget", "operator": "equal", "operand": true }
]
},
{ "keys": ["ctrl+super+w"], "command": "toggle_whole_word", "context":
[
{ "key": "setting.is_widget", "operator": "equal", "operand": true }
]
},
{ "keys": ["ctrl+super+a"], "command": "toggle_preserve_case", "context":
[
{ "key": "setting.is_widget", "operator": "equal", "operand": true }
]
},
// Find panel key bindings
{ "keys": ["enter"], "command": "find_next", "context":
[{"key": "panel", "operand": "find"}, {"key": "panel_has_focus"}]
},
{ "keys": ["shift+enter"], "command": "find_prev", "context":
[{"key": "panel", "operand": "find"}, {"key": "panel_has_focus"}]
},
{ "keys": ["super+enter"], "command": "find_all", "args": {"close_panel": true},
"context": [{"key": "panel", "operand": "find"}, {"key": "panel_has_focus"}]
},
// Replace panel key bindings
{ "keys": ["enter"], "command": "find_next", "context":
[{"key": "panel", "operand": "replace"}, {"key": "panel_has_focus"}]
},
{ "keys": ["shift+enter"], "command": "find_prev", "context":
[{"key": "panel", "operand": "replace"}, {"key": "panel_has_focus"}]
},
{ "keys": ["super+enter"], "command": "find_all", "args": {"close_panel": true},
"context": [{"key": "panel", "operand": "replace"}, {"key": "panel_has_focus"}]
},
{ "keys": ["alt+super+enter"], "command": "replace_all", "args": {"close_panel": true},
"context": [{"key": "panel", "operand": "replace"}, {"key": "panel_has_focus"}]
},
// Incremental find panel key bindings
{ "keys": ["enter"], "command": "hide_panel", "context":
[{"key": "panel", "operand": "incremental_find"}, {"key": "panel_has_focus"}]
},
{ "keys": ["shift+enter"], "command": "find_prev", "context":
[{"key": "panel", "operand": "incremental_find"}, {"key": "panel_has_focus"}]
},
{ "keys": ["super+enter"], "command": "find_all", "args": {"close_panel": true},
"context": [{"key": "panel", "operand": "incremental_find"}, {"key": "panel_has_focus"}]
},
{ "keys": ["ctrl+,"], "command": "edit_settings", "args":
{
"base_file": "${packages}/Default/Preferences.sublime-settings",
"default": "// Settings in here override those in \"Default/Preferences.sublime-settings\",\n// and are overridden in turn by syntax-specific settings.\n{\n\t$0\n}\n"
}
},
{ "keys": ["ctrl+k", "ctrl+y"], "command": "yank" },
{ "keys": ["ctrl+k", "ctrl+k"], "command": "run_macro_file", "args": {"file": "res://Packages/Default/Delete to Hard EOL.sublime-macro"} },
{ "keys": ["ctrl+k", "ctrl+backspace"], "command": "run_macro_file", "args": {"file": "res://Packages/Default/Delete to Hard BOL.sublime-macro"} },
{ "keys": ["ctrl+k", "ctrl+c"], "command": "show_at_center" },
// These are OS X built in commands, and don't need to be listed here, but
// doing so lets them show up in the menu
{ "keys": ["alt+y"], "command": "yank" },
{ "keys": ["ctrl+backspace"], "command": "run_macro_file", "args": {"file": "res://Packages/Default/Delete to Hard BOL.sublime-macro"} },
// ctrl+delete isn't a built in command, but makes sense anyway
{ "keys": ["ctrl+delete"], "command": "run_macro_file", "args": {"file": "res://Packages/Default/Delete to Hard EOL.sublime-macro"} },
{ "keys": ["alt+k"], "command": "run_macro_file", "args": {"file": "res://Packages/Default/Delete to Hard EOL.sublime-macro"} },
{ "keys": ["alt+l"], "command": "show_at_center" },
{ "keys": ["alt+o"], "command": "insert_snippet", "args": { "contents": "$0\n" } },
{ "keys": ["alt+ctrl+d"], "command": "noop" },
{ "keys": ["alt+ctrl+shift+d"], "command": "noop" },
// HTML, XML close tag
{ "keys": ["/"], "command": "close_tag", "args": { "insert_slash": true }, "context":
[
{ "key": "selector", "operator": "equal", "operand": "(text.html, text.xml) - string - comment", "match_all": true },
{ "key": "preceding_text", "operator": "regex_match", "operand": ".*<$", "match_all": true },
{ "key": "setting.auto_close_tags" }
]
}
]

View File

@@ -1,734 +0,0 @@
[
{ "keys": ["ctrl+q"], "command": "exit" },
{ "keys": ["ctrl+shift+n"], "command": "new_window" },
{ "keys": ["ctrl+shift+w"], "command": "close_window" },
{ "keys": ["ctrl+o"], "command": "prompt_open_file" },
{ "keys": ["ctrl+shift+t"], "command": "reopen_last_file" },
{ "keys": ["alt+o"], "command": "switch_file", "args": {"extensions": ["cpp", "cxx", "cc", "c", "hpp", "hxx", "hh", "h", "ipp", "inl", "m", "mm"]} },
{ "keys": ["ctrl+n"], "command": "new_file" },
{ "keys": ["ctrl+s"], "command": "save" },
{ "keys": ["ctrl+shift+s"], "command": "prompt_save_as" },
{ "keys": ["ctrl+f4"], "command": "close_file" },
{ "keys": ["ctrl+w"], "command": "close" },
{ "keys": ["ctrl+k", "ctrl+b"], "command": "toggle_side_bar" },
{ "keys": ["f11"], "command": "toggle_full_screen" },
{ "keys": ["shift+f11"], "command": "toggle_distraction_free" },
{ "keys": ["backspace"], "command": "left_delete" },
{ "keys": ["shift+backspace"], "command": "left_delete" },
{ "keys": ["ctrl+shift+backspace"], "command": "left_delete" },
{ "keys": ["delete"], "command": "right_delete" },
{ "keys": ["enter"], "command": "insert", "args": {"characters": "\n"} },
{ "keys": ["shift+enter"], "command": "insert", "args": {"characters": "\n"} },
{ "keys": ["keypad_enter"], "command": "insert", "args": {"characters": "\n"} },
{ "keys": ["shift+keypad_enter"], "command": "insert", "args": {"characters": "\n"} },
{ "keys": ["ctrl+z"], "command": "undo" },
{ "keys": ["ctrl+shift+z"], "command": "redo" },
{ "keys": ["ctrl+y"], "command": "redo_or_repeat" },
{ "keys": ["ctrl+u"], "command": "soft_undo" },
{ "keys": ["ctrl+shift+u"], "command": "soft_redo" },
{ "keys": ["shift+delete"], "command": "cut" },
{ "keys": ["ctrl+insert"], "command": "copy" },
{ "keys": ["shift+insert"], "command": "paste" },
// These two key bindings should replace the above three if you'd prefer
// the traditional X11 behavior of shift+insert pasting from the primary
// selection. The above CUA keys are the default, to match most GTK
// applications.
//{ "keys": ["shift+insert"], "command": "paste", "args": {"clipboard": "selection"} },
//{ "keys": ["shift+delete"], "command": "right_delete" },
{ "keys": ["ctrl+x"], "command": "cut" },
{ "keys": ["ctrl+c"], "command": "copy" },
{ "keys": ["ctrl+v"], "command": "paste" },
{ "keys": ["ctrl+shift+v"], "command": "paste_and_indent" },
{ "keys": ["ctrl+k", "ctrl+v"], "command": "paste_from_history" },
{ "keys": ["left"], "command": "move", "args": {"by": "characters", "forward": false} },
{ "keys": ["right"], "command": "move", "args": {"by": "characters", "forward": true} },
{ "keys": ["up"], "command": "move", "args": {"by": "lines", "forward": false} },
{ "keys": ["down"], "command": "move", "args": {"by": "lines", "forward": true} },
{ "keys": ["shift+left"], "command": "move", "args": {"by": "characters", "forward": false, "extend": true} },
{ "keys": ["shift+right"], "command": "move", "args": {"by": "characters", "forward": true, "extend": true} },
{ "keys": ["shift+up"], "command": "move", "args": {"by": "lines", "forward": false, "extend": true} },
{ "keys": ["shift+down"], "command": "move", "args": {"by": "lines", "forward": true, "extend": true} },
{ "keys": ["ctrl+left"], "command": "move", "args": {"by": "words", "forward": false} },
{ "keys": ["ctrl+right"], "command": "move", "args": {"by": "word_ends", "forward": true} },
{ "keys": ["ctrl+shift+left"], "command": "move", "args": {"by": "words", "forward": false, "extend": true} },
{ "keys": ["ctrl+shift+right"], "command": "move", "args": {"by": "word_ends", "forward": true, "extend": true} },
{ "keys": ["alt+left"], "command": "move", "args": {"by": "subwords", "forward": false} },
{ "keys": ["alt+right"], "command": "move", "args": {"by": "subword_ends", "forward": true} },
{ "keys": ["alt+shift+left"], "command": "move", "args": {"by": "subwords", "forward": false, "extend": true} },
{ "keys": ["alt+shift+right"], "command": "move", "args": {"by": "subword_ends", "forward": true, "extend": true} },
{ "keys": ["alt+shift+up"], "command": "select_lines", "args": {"forward": false} },
{ "keys": ["alt+shift+down"], "command": "select_lines", "args": {"forward": true} },
{ "keys": ["pageup"], "command": "move", "args": {"by": "pages", "forward": false} },
{ "keys": ["pagedown"], "command": "move", "args": {"by": "pages", "forward": true} },
{ "keys": ["shift+pageup"], "command": "move", "args": {"by": "pages", "forward": false, "extend": true} },
{ "keys": ["shift+pagedown"], "command": "move", "args": {"by": "pages", "forward": true, "extend": true} },
{ "keys": ["home"], "command": "move_to", "args": {"to": "bol", "extend": false} },
{ "keys": ["end"], "command": "move_to", "args": {"to": "eol", "extend": false} },
{ "keys": ["shift+home"], "command": "move_to", "args": {"to": "bol", "extend": true} },
{ "keys": ["shift+end"], "command": "move_to", "args": {"to": "eol", "extend": true} },
{ "keys": ["ctrl+home"], "command": "move_to", "args": {"to": "bof", "extend": false} },
{ "keys": ["ctrl+end"], "command": "move_to", "args": {"to": "eof", "extend": false} },
{ "keys": ["ctrl+shift+home"], "command": "move_to", "args": {"to": "bof", "extend": true} },
{ "keys": ["ctrl+shift+end"], "command": "move_to", "args": {"to": "eof", "extend": true} },
{ "keys": ["ctrl+up"], "command": "scroll_lines", "args": {"amount": 1.0 } },
{ "keys": ["ctrl+down"], "command": "scroll_lines", "args": {"amount": -1.0 } },
{ "keys": ["ctrl+pagedown"], "command": "next_view" },
{ "keys": ["ctrl+pageup"], "command": "prev_view" },
{ "keys": ["ctrl+tab"], "command": "next_view_in_stack" },
{ "keys": ["ctrl+shift+tab"], "command": "prev_view_in_stack" },
{ "keys": ["ctrl+a"], "command": "select_all" },
{ "keys": ["ctrl+shift+l"], "command": "split_selection_into_lines" },
{ "keys": ["escape"], "command": "single_selection", "context":
[
{ "key": "num_selections", "operator": "not_equal", "operand": 1 }
]
},
{ "keys": ["escape"], "command": "clear_fields", "context":
[
{ "key": "has_next_field", "operator": "equal", "operand": true }
]
},
{ "keys": ["escape"], "command": "clear_fields", "context":
[
{ "key": "has_prev_field", "operator": "equal", "operand": true }
]
},
{ "keys": ["escape"], "command": "hide_panel", "args": {"cancel": true},
"context":
[
{ "key": "panel_visible", "operator": "equal", "operand": true }
]
},
{ "keys": ["escape"], "command": "hide_overlay", "context":
[
{ "key": "overlay_visible", "operator": "equal", "operand": true }
]
},
{ "keys": ["escape"], "command": "hide_popup", "context":
[
{ "key": "popup_visible", "operator": "equal", "operand": true }
]
},
{ "keys": ["escape"], "command": "hide_auto_complete", "context":
[
{ "key": "auto_complete_visible", "operator": "equal", "operand": true }
]
},
{ "keys": ["tab"], "command": "insert_best_completion", "args": {"default": "\t", "exact": true} },
{ "keys": ["tab"], "command": "insert_best_completion", "args": {"default": "\t", "exact": false},
"context":
[
{ "key": "setting.tab_completion", "operator": "equal", "operand": true },
{ "key": "preceding_text", "operator": "not_regex_match", "operand": ".*\\b[0-9]+$", "match_all": true },
]
},
{ "keys": ["tab"], "command": "replace_completion_with_next_completion", "context":
[
{ "key": "last_command", "operator": "equal", "operand": "insert_best_completion" },
{ "key": "setting.tab_completion", "operator": "equal", "operand": true }
]
},
{ "keys": ["tab"], "command": "reindent", "context":
[
{ "key": "setting.auto_indent", "operator": "equal", "operand": true },
{ "key": "selection_empty", "operator": "equal", "operand": true, "match_all": true },
{ "key": "preceding_text", "operator": "regex_match", "operand": "^$", "match_all": true },
{ "key": "following_text", "operator": "regex_match", "operand": "^$", "match_all": true }
]
},
{ "keys": ["tab"], "command": "indent", "context":
[
{ "key": "text", "operator": "regex_contains", "operand": "\n" }
]
},
{ "keys": ["tab"], "command": "next_field", "context":
[
{ "key": "has_next_field", "operator": "equal", "operand": true }
]
},
{ "keys": ["tab"], "command": "commit_completion", "context":
[
{ "key": "auto_complete_visible" },
{ "key": "setting.auto_complete_commit_on_tab" }
]
},
{ "keys": ["shift+tab"], "command": "insert", "args": {"characters": "\t"} },
{ "keys": ["shift+tab"], "command": "unindent", "context":
[
{ "key": "setting.shift_tab_unindent", "operator": "equal", "operand": true }
]
},
{ "keys": ["shift+tab"], "command": "unindent", "context":
[
{ "key": "preceding_text", "operator": "regex_match", "operand": "^[\t ]*" }
]
},
{ "keys": ["shift+tab"], "command": "unindent", "context":
[
{ "key": "text", "operator": "regex_contains", "operand": "\n" }
]
},
{ "keys": ["shift+tab"], "command": "prev_field", "context":
[
{ "key": "has_prev_field", "operator": "equal", "operand": true }
]
},
{ "keys": ["ctrl+]"], "command": "indent" },
{ "keys": ["ctrl+["], "command": "unindent" },
{ "keys": ["insert"], "command": "toggle_overwrite" },
{ "keys": ["ctrl+l"], "command": "expand_selection", "args": {"to": "line"} },
{ "keys": ["ctrl+d"], "command": "find_under_expand" },
{ "keys": ["ctrl+k", "ctrl+d"], "command": "find_under_expand_skip" },
{ "keys": ["ctrl+shift+space"], "command": "expand_selection", "args": {"to": "scope"} },
{ "keys": ["ctrl+shift+m"], "command": "expand_selection", "args": {"to": "brackets"} },
{ "keys": ["ctrl+m"], "command": "move_to", "args": {"to": "brackets"} },
{ "keys": ["ctrl+shift+j"], "command": "expand_selection", "args": {"to": "indentation"} },
{ "keys": ["ctrl+shift+a"], "command": "expand_selection", "args": {"to": "tag"} },
{ "keys": ["alt+."], "command": "close_tag" },
{ "keys": ["ctrl+alt+q"], "command": "toggle_record_macro" },
{ "keys": ["ctrl+alt+shift+q"], "command": "run_macro" },
{ "keys": ["ctrl+enter"], "command": "run_macro_file", "args": {"file": "res://Packages/Default/Add Line.sublime-macro"} },
{ "keys": ["ctrl+shift+enter"], "command": "run_macro_file", "args": {"file": "res://Packages/Default/Add Line Before.sublime-macro"} },
{ "keys": ["enter"], "command": "commit_completion", "context":
[
{ "key": "auto_complete_visible" },
{ "key": "setting.auto_complete_commit_on_tab", "operand": false }
]
},
{ "keys": ["ctrl+p"], "command": "show_overlay", "args": {"overlay": "goto", "show_files": true} },
{ "keys": ["ctrl+shift+p"], "command": "show_overlay", "args": {"overlay": "command_palette"} },
{ "keys": ["ctrl+alt+p"], "command": "prompt_select_workspace" },
{ "keys": ["ctrl+r"], "command": "show_overlay", "args": {"overlay": "goto", "text": "@"} },
{ "keys": ["ctrl+g"], "command": "show_overlay", "args": {"overlay": "goto", "text": ":"} },
{ "keys": ["ctrl+;"], "command": "show_overlay", "args": {"overlay": "goto", "text": "#"} },
{ "keys": ["f12"], "command": "goto_definition" },
{ "keys": ["shift+f12"], "command": "goto_reference" },
{ "keys": ["ctrl+shift+r"], "command": "goto_symbol_in_project" },
{ "keys": ["alt+-"], "command": "jump_back" },
{ "keys": ["alt+shift+-"], "command": "jump_forward" },
{ "keys": ["alt+keypad_minus"], "command": "jump_back" },
{ "keys": ["alt+shift+keypad_minus"], "command": "jump_forward" },
{ "keys": ["ctrl+i"], "command": "show_panel", "args": {"panel": "incremental_find", "reverse": false} },
{ "keys": ["ctrl+shift+i"], "command": "show_panel", "args": {"panel": "incremental_find", "reverse": true} },
{ "keys": ["ctrl+f"], "command": "show_panel", "args": {"panel": "find", "reverse": false} },
{ "keys": ["ctrl+h"], "command": "show_panel", "args": {"panel": "replace", "reverse": false} },
{ "keys": ["ctrl+shift+h"], "command": "replace_next" },
{ "keys": ["f3"], "command": "find_next" },
{ "keys": ["shift+f3"], "command": "find_prev" },
{ "keys": ["ctrl+f3"], "command": "find_under" },
{ "keys": ["ctrl+shift+f3"], "command": "find_under_prev" },
{ "keys": ["alt+f3"], "command": "find_all_under" },
{ "keys": ["ctrl+e"], "command": "slurp_find_string" },
{ "keys": ["ctrl+shift+e"], "command": "slurp_replace_string" },
{ "keys": ["ctrl+shift+f"], "command": "show_panel", "args": {"panel": "find_in_files"} },
{ "keys": ["f4"], "command": "next_result" },
{ "keys": ["shift+f4"], "command": "prev_result" },
{ "keys": ["f6"], "command": "toggle_setting", "args": {"setting": "spell_check"} },
{ "keys": ["ctrl+f6"], "command": "next_misspelling" },
{ "keys": ["ctrl+shift+f6"], "command": "prev_misspelling" },
{ "keys": ["ctrl+shift+up"], "command": "swap_line_up" },
{ "keys": ["ctrl+shift+down"], "command": "swap_line_down" },
{ "keys": ["ctrl+backspace"], "command": "delete_word", "args": { "forward": false } },
{ "keys": ["ctrl+shift+backspace"], "command": "run_macro_file", "args": {"file": "res://Packages/Default/Delete to Hard BOL.sublime-macro"} },
{ "keys": ["ctrl+delete"], "command": "delete_word", "args": { "forward": true } },
{ "keys": ["ctrl+shift+delete"], "command": "run_macro_file", "args": {"file": "res://Packages/Default/Delete to Hard EOL.sublime-macro"} },
{ "keys": ["ctrl+/"], "command": "toggle_comment", "args": { "block": false } },
{ "keys": ["ctrl+shift+/"], "command": "toggle_comment", "args": { "block": true } },
{ "keys": ["ctrl+j"], "command": "join_lines" },
{ "keys": ["ctrl+shift+d"], "command": "duplicate_line" },
{ "keys": ["ctrl+`"], "command": "show_panel", "args": {"panel": "console", "toggle": true} },
{ "keys": ["alt+/"], "command": "auto_complete" },
{ "keys": ["alt+/"], "command": "replace_completion_with_auto_complete", "context":
[
{ "key": "last_command", "operator": "equal", "operand": "insert_best_completion" },
{ "key": "auto_complete_visible", "operator": "equal", "operand": false },
{ "key": "setting.tab_completion", "operator": "equal", "operand": true }
]
},
{ "keys": ["ctrl+alt+shift+p"], "command": "show_scope_name" },
{ "keys": ["f7"], "command": "build" },
{ "keys": ["ctrl+b"], "command": "build" },
{ "keys": ["ctrl+shift+b"], "command": "build", "args": {"select": true} },
{ "keys": ["ctrl+break"], "command": "cancel_build" },
{ "keys": ["ctrl+t"], "command": "transpose" },
{ "keys": ["f9"], "command": "sort_lines", "args": {"case_sensitive": false} },
{ "keys": ["ctrl+f9"], "command": "sort_lines", "args": {"case_sensitive": true} },
// Auto-pair quotes
{ "keys": ["\""], "command": "insert_snippet", "args": {"contents": "\"$0\""}, "context":
[
{ "key": "setting.auto_match_enabled", "operator": "equal", "operand": true },
{ "key": "selection_empty", "operator": "equal", "operand": true, "match_all": true },
{ "key": "following_text", "operator": "regex_contains", "operand": "^(?:\t| |\\)|]|\\}|>|$)", "match_all": true },
{ "key": "preceding_text", "operator": "not_regex_contains", "operand": "[\"a-zA-Z0-9_]$", "match_all": true },
{ "key": "eol_selector", "operator": "not_equal", "operand": "string.quoted.double - punctuation.definition.string.end", "match_all": true }
]
},
{ "keys": ["\""], "command": "insert_snippet", "args": {"contents": "\"${0:$SELECTION}\""}, "context":
[
{ "key": "setting.auto_match_enabled", "operator": "equal", "operand": true },
{ "key": "selection_empty", "operator": "equal", "operand": false, "match_all": true }
]
},
{ "keys": ["\""], "command": "move", "args": {"by": "characters", "forward": true}, "context":
[
{ "key": "setting.auto_match_enabled", "operator": "equal", "operand": true },
{ "key": "selection_empty", "operator": "equal", "operand": true, "match_all": true },
{ "key": "following_text", "operator": "regex_contains", "operand": "^\"", "match_all": true },
{ "key": "selector", "operator": "not_equal", "operand": "punctuation.definition.string.begin", "match_all": true },
{ "key": "eol_selector", "operator": "not_equal", "operand": "string.quoted.double - punctuation.definition.string.end", "match_all": true },
]
},
{ "keys": ["backspace"], "command": "run_macro_file", "args": {"file": "res://Packages/Default/Delete Left Right.sublime-macro"}, "context":
[
{ "key": "setting.auto_match_enabled", "operator": "equal", "operand": true },
{ "key": "selection_empty", "operator": "equal", "operand": true, "match_all": true },
{ "key": "preceding_text", "operator": "regex_contains", "operand": "\"$", "match_all": true },
{ "key": "following_text", "operator": "regex_contains", "operand": "^\"", "match_all": true },
{ "key": "selector", "operator": "not_equal", "operand": "punctuation.definition.string.begin", "match_all": true },
{ "key": "eol_selector", "operator": "not_equal", "operand": "string.quoted.double - punctuation.definition.string.end", "match_all": true },
]
},
// Auto-pair single quotes
{ "keys": ["'"], "command": "insert_snippet", "args": {"contents": "'$0'"}, "context":
[
{ "key": "setting.auto_match_enabled", "operator": "equal", "operand": true },
{ "key": "selection_empty", "operator": "equal", "operand": true, "match_all": true },
{ "key": "following_text", "operator": "regex_contains", "operand": "^(?:\t| |\\)|]|\\}|>|$)", "match_all": true },
{ "key": "preceding_text", "operator": "not_regex_contains", "operand": "['a-zA-Z0-9_]$", "match_all": true },
{ "key": "eol_selector", "operator": "not_equal", "operand": "string.quoted.single - punctuation.definition.string.end", "match_all": true }
]
},
{ "keys": ["'"], "command": "insert_snippet", "args": {"contents": "'${0:$SELECTION}'"}, "context":
[
{ "key": "setting.auto_match_enabled", "operator": "equal", "operand": true },
{ "key": "selection_empty", "operator": "equal", "operand": false, "match_all": true }
]
},
{ "keys": ["'"], "command": "move", "args": {"by": "characters", "forward": true}, "context":
[
{ "key": "setting.auto_match_enabled", "operator": "equal", "operand": true },
{ "key": "selection_empty", "operator": "equal", "operand": true, "match_all": true },
{ "key": "following_text", "operator": "regex_contains", "operand": "^'", "match_all": true },
{ "key": "selector", "operator": "not_equal", "operand": "punctuation.definition.string.begin", "match_all": true },
{ "key": "eol_selector", "operator": "not_equal", "operand": "string.quoted.single - punctuation.definition.string.end", "match_all": true },
]
},
{ "keys": ["backspace"], "command": "run_macro_file", "args": {"file": "res://Packages/Default/Delete Left Right.sublime-macro"}, "context":
[
{ "key": "setting.auto_match_enabled", "operator": "equal", "operand": true },
{ "key": "selection_empty", "operator": "equal", "operand": true, "match_all": true },
{ "key": "preceding_text", "operator": "regex_contains", "operand": "'$", "match_all": true },
{ "key": "following_text", "operator": "regex_contains", "operand": "^'", "match_all": true },
{ "key": "selector", "operator": "not_equal", "operand": "punctuation.definition.string.begin", "match_all": true },
{ "key": "eol_selector", "operator": "not_equal", "operand": "string.quoted.single - punctuation.definition.string.end", "match_all": true },
]
},
// Auto-pair brackets
{ "keys": ["("], "command": "insert_snippet", "args": {"contents": "($0)"}, "context":
[
{ "key": "setting.auto_match_enabled", "operator": "equal", "operand": true },
{ "key": "selection_empty", "operator": "equal", "operand": true, "match_all": true },
{ "key": "following_text", "operator": "regex_contains", "operand": "^(?:\t| |\\)|]|;|\\}|$)", "match_all": true }
]
},
{ "keys": ["("], "command": "insert_snippet", "args": {"contents": "(${0:$SELECTION})"}, "context":
[
{ "key": "setting.auto_match_enabled", "operator": "equal", "operand": true },
{ "key": "selection_empty", "operator": "equal", "operand": false, "match_all": true }
]
},
{ "keys": [")"], "command": "move", "args": {"by": "characters", "forward": true}, "context":
[
{ "key": "setting.auto_match_enabled", "operator": "equal", "operand": true },
{ "key": "selection_empty", "operator": "equal", "operand": true, "match_all": true },
{ "key": "following_text", "operator": "regex_contains", "operand": "^\\)", "match_all": true }
]
},
{ "keys": ["backspace"], "command": "run_macro_file", "args": {"file": "res://Packages/Default/Delete Left Right.sublime-macro"}, "context":
[
{ "key": "setting.auto_match_enabled", "operator": "equal", "operand": true },
{ "key": "selection_empty", "operator": "equal", "operand": true, "match_all": true },
{ "key": "preceding_text", "operator": "regex_contains", "operand": "\\($", "match_all": true },
{ "key": "following_text", "operator": "regex_contains", "operand": "^\\)", "match_all": true }
]
},
// Auto-pair square brackets
{ "keys": ["["], "command": "insert_snippet", "args": {"contents": "[$0]"}, "context":
[
{ "key": "setting.auto_match_enabled", "operator": "equal", "operand": true },
{ "key": "selection_empty", "operator": "equal", "operand": true, "match_all": true },
{ "key": "following_text", "operator": "regex_contains", "operand": "^(?:\t| |\\)|]|;|\\}|$)", "match_all": true }
]
},
{ "keys": ["["], "command": "insert_snippet", "args": {"contents": "[${0:$SELECTION}]"}, "context":
[
{ "key": "setting.auto_match_enabled", "operator": "equal", "operand": true },
{ "key": "selection_empty", "operator": "equal", "operand": false, "match_all": true }
]
},
{ "keys": ["]"], "command": "move", "args": {"by": "characters", "forward": true}, "context":
[
{ "key": "setting.auto_match_enabled", "operator": "equal", "operand": true },
{ "key": "selection_empty", "operator": "equal", "operand": true, "match_all": true },
{ "key": "following_text", "operator": "regex_contains", "operand": "^\\]", "match_all": true }
]
},
{ "keys": ["backspace"], "command": "run_macro_file", "args": {"file": "res://Packages/Default/Delete Left Right.sublime-macro"}, "context":
[
{ "key": "setting.auto_match_enabled", "operator": "equal", "operand": true },
{ "key": "selection_empty", "operator": "equal", "operand": true, "match_all": true },
{ "key": "preceding_text", "operator": "regex_contains", "operand": "\\[$", "match_all": true },
{ "key": "following_text", "operator": "regex_contains", "operand": "^\\]", "match_all": true }
]
},
// Auto-pair curly brackets
{ "keys": ["{"], "command": "insert_snippet", "args": {"contents": "{$0}"}, "context":
[
{ "key": "setting.auto_match_enabled", "operator": "equal", "operand": true },
{ "key": "selection_empty", "operator": "equal", "operand": true, "match_all": true },
{ "key": "following_text", "operator": "regex_contains", "operand": "^(?:\t| |\\)|]|\\}|$)", "match_all": true }
]
},
{ "keys": ["{"], "command": "wrap_block", "args": {"begin": "{", "end": "}"}, "context":
[
{ "key": "indented_block", "match_all": true },
{ "key": "setting.auto_match_enabled", "operator": "equal", "operand": true },
{ "key": "selection_empty", "operator": "equal", "operand": true, "match_all": true },
{ "key": "following_text", "operator": "regex_match", "operand": "^$", "match_all": true },
]
},
{ "keys": ["{"], "command": "insert_snippet", "args": {"contents": "{${0:$SELECTION}}"}, "context":
[
{ "key": "setting.auto_match_enabled", "operator": "equal", "operand": true },
{ "key": "selection_empty", "operator": "equal", "operand": false, "match_all": true }
]
},
{ "keys": ["}"], "command": "move", "args": {"by": "characters", "forward": true}, "context":
[
{ "key": "setting.auto_match_enabled", "operator": "equal", "operand": true },
{ "key": "selection_empty", "operator": "equal", "operand": true, "match_all": true },
{ "key": "following_text", "operator": "regex_contains", "operand": "^\\}", "match_all": true }
]
},
{ "keys": ["backspace"], "command": "run_macro_file", "args": {"file": "res://Packages/Default/Delete Left Right.sublime-macro"}, "context":
[
{ "key": "setting.auto_match_enabled", "operator": "equal", "operand": true },
{ "key": "selection_empty", "operator": "equal", "operand": true, "match_all": true },
{ "key": "preceding_text", "operator": "regex_contains", "operand": "\\{$", "match_all": true },
{ "key": "following_text", "operator": "regex_contains", "operand": "^\\}", "match_all": true }
]
},
{ "keys": ["enter"], "command": "run_macro_file", "args": {"file": "res://Packages/Default/Add Line in Braces.sublime-macro"}, "context":
[
{ "key": "setting.auto_indent", "operator": "equal", "operand": true },
{ "key": "selection_empty", "operator": "equal", "operand": true, "match_all": true },
{ "key": "preceding_text", "operator": "regex_contains", "operand": "\\{$", "match_all": true },
{ "key": "following_text", "operator": "regex_contains", "operand": "^\\}", "match_all": true }
]
},
{ "keys": ["shift+enter"], "command": "run_macro_file", "args": {"file": "res://Packages/Default/Add Line in Braces.sublime-macro"}, "context":
[
{ "key": "setting.auto_indent", "operator": "equal", "operand": true },
{ "key": "selection_empty", "operator": "equal", "operand": true, "match_all": true },
{ "key": "preceding_text", "operator": "regex_contains", "operand": "\\{$", "match_all": true },
{ "key": "following_text", "operator": "regex_contains", "operand": "^\\}", "match_all": true }
]
},
{ "keys": ["enter"], "command": "auto_indent_tag", "context":
[
{ "key": "setting.auto_indent", "operator": "equal", "operand": true },
{ "key": "selection_empty", "operator": "equal", "operand": true, "match_all": true },
{ "key": "selector", "operator": "equal", "operand": "punctuation.definition.tag.begin", "match_all": true },
{ "key": "preceding_text", "operator": "regex_contains", "operand": ">$", "match_all": true },
{ "key": "following_text", "operator": "regex_contains", "operand": "^</", "match_all": true },
]
},
{ "keys": ["shift+enter"], "command": "auto_indent_tag", "context":
[
{ "key": "setting.auto_indent", "operator": "equal", "operand": true },
{ "key": "selection_empty", "operator": "equal", "operand": true, "match_all": true },
{ "key": "selector", "operator": "equal", "operand": "punctuation.definition.tag.begin", "match_all": true },
{ "key": "preceding_text", "operator": "regex_contains", "operand": ">$", "match_all": true },
{ "key": "following_text", "operator": "regex_contains", "operand": "^</", "match_all": true },
]
},
{
"keys": ["alt+shift+1"],
"command": "set_layout",
"args":
{
"cols": [0.0, 1.0],
"rows": [0.0, 1.0],
"cells": [[0, 0, 1, 1]]
}
},
{
"keys": ["alt+shift+2"],
"command": "set_layout",
"args":
{
"cols": [0.0, 0.5, 1.0],
"rows": [0.0, 1.0],
"cells": [[0, 0, 1, 1], [1, 0, 2, 1]]
}
},
{
"keys": ["alt+shift+3"],
"command": "set_layout",
"args":
{
"cols": [0.0, 0.33, 0.66, 1.0],
"rows": [0.0, 1.0],
"cells": [[0, 0, 1, 1], [1, 0, 2, 1], [2, 0, 3, 1]]
}
},
{
"keys": ["alt+shift+4"],
"command": "set_layout",
"args":
{
"cols": [0.0, 0.25, 0.5, 0.75, 1.0],
"rows": [0.0, 1.0],
"cells": [[0, 0, 1, 1], [1, 0, 2, 1], [2, 0, 3, 1], [3, 0, 4, 1]]
}
},
{
"keys": ["alt+shift+8"],
"command": "set_layout",
"args":
{
"cols": [0.0, 1.0],
"rows": [0.0, 0.5, 1.0],
"cells": [[0, 0, 1, 1], [0, 1, 1, 2]]
}
},
{
"keys": ["alt+shift+9"],
"command": "set_layout",
"args":
{
"cols": [0.0, 1.0],
"rows": [0.0, 0.33, 0.66, 1.0],
"cells": [[0, 0, 1, 1], [0, 1, 1, 2], [0, 2, 1, 3]]
}
},
{
"keys": ["alt+shift+5"],
"command": "set_layout",
"args":
{
"cols": [0.0, 0.5, 1.0],
"rows": [0.0, 0.5, 1.0],
"cells":
[
[0, 0, 1, 1], [1, 0, 2, 1],
[0, 1, 1, 2], [1, 1, 2, 2]
]
}
},
{ "keys": ["ctrl+1"], "command": "focus_group", "args": { "group": 0 } },
{ "keys": ["ctrl+2"], "command": "focus_group", "args": { "group": 1 } },
{ "keys": ["ctrl+3"], "command": "focus_group", "args": { "group": 2 } },
{ "keys": ["ctrl+4"], "command": "focus_group", "args": { "group": 3 } },
{ "keys": ["ctrl+5"], "command": "focus_group", "args": { "group": 4 } },
{ "keys": ["ctrl+6"], "command": "focus_group", "args": { "group": 5 } },
{ "keys": ["ctrl+7"], "command": "focus_group", "args": { "group": 6 } },
{ "keys": ["ctrl+8"], "command": "focus_group", "args": { "group": 7 } },
{ "keys": ["ctrl+9"], "command": "focus_group", "args": { "group": 8 } },
{ "keys": ["ctrl+shift+1"], "command": "move_to_group", "args": { "group": 0 } },
{ "keys": ["ctrl+shift+2"], "command": "move_to_group", "args": { "group": 1 } },
{ "keys": ["ctrl+shift+3"], "command": "move_to_group", "args": { "group": 2 } },
{ "keys": ["ctrl+shift+4"], "command": "move_to_group", "args": { "group": 3 } },
{ "keys": ["ctrl+shift+5"], "command": "move_to_group", "args": { "group": 4 } },
{ "keys": ["ctrl+shift+6"], "command": "move_to_group", "args": { "group": 5 } },
{ "keys": ["ctrl+shift+7"], "command": "move_to_group", "args": { "group": 6 } },
{ "keys": ["ctrl+shift+8"], "command": "move_to_group", "args": { "group": 7 } },
{ "keys": ["ctrl+shift+9"], "command": "move_to_group", "args": { "group": 8 } },
{ "keys": ["ctrl+0"], "command": "focus_side_bar" },
{ "keys": ["ctrl+k", "ctrl+up"], "command": "new_pane" },
{ "keys": ["ctrl+k", "ctrl+shift+up"], "command": "new_pane", "args": {"move": false} },
{ "keys": ["ctrl+k", "ctrl+down"], "command": "close_pane" },
{ "keys": ["ctrl+k", "ctrl+left"], "command": "focus_neighboring_group", "args": {"forward": false} },
{ "keys": ["ctrl+k", "ctrl+right"], "command": "focus_neighboring_group" },
{ "keys": ["ctrl+k", "ctrl+shift+left"], "command": "move_to_neighboring_group", "args": {"forward": false} },
{ "keys": ["ctrl+k", "ctrl+shift+right"], "command": "move_to_neighboring_group" },
{ "keys": ["alt+1"], "command": "select_by_index", "args": { "index": 0 } },
{ "keys": ["alt+2"], "command": "select_by_index", "args": { "index": 1 } },
{ "keys": ["alt+3"], "command": "select_by_index", "args": { "index": 2 } },
{ "keys": ["alt+4"], "command": "select_by_index", "args": { "index": 3 } },
{ "keys": ["alt+5"], "command": "select_by_index", "args": { "index": 4 } },
{ "keys": ["alt+6"], "command": "select_by_index", "args": { "index": 5 } },
{ "keys": ["alt+7"], "command": "select_by_index", "args": { "index": 6 } },
{ "keys": ["alt+8"], "command": "select_by_index", "args": { "index": 7 } },
{ "keys": ["alt+9"], "command": "select_by_index", "args": { "index": 8 } },
{ "keys": ["alt+0"], "command": "select_by_index", "args": { "index": 9 } },
{ "keys": ["f2"], "command": "next_bookmark" },
{ "keys": ["shift+f2"], "command": "prev_bookmark" },
{ "keys": ["ctrl+f2"], "command": "toggle_bookmark" },
{ "keys": ["ctrl+shift+f2"], "command": "clear_bookmarks" },
{ "keys": ["alt+f2"], "command": "select_all_bookmarks" },
{ "keys": ["ctrl+shift+k"], "command": "run_macro_file", "args": {"file": "res://Packages/Default/Delete Line.sublime-macro"} },
{ "keys": ["alt+q"], "command": "wrap_lines" },
{ "keys": ["ctrl+k", "ctrl+u"], "command": "upper_case" },
{ "keys": ["ctrl+k", "ctrl+l"], "command": "lower_case" },
{ "keys": ["ctrl+k", "ctrl+space"], "command": "set_mark" },
{ "keys": ["ctrl+k", "ctrl+a"], "command": "select_to_mark" },
{ "keys": ["ctrl+k", "ctrl+w"], "command": "delete_to_mark" },
{ "keys": ["ctrl+k", "ctrl+x"], "command": "swap_with_mark" },
{ "keys": ["ctrl+k", "ctrl+y"], "command": "yank" },
{ "keys": ["ctrl+k", "ctrl+k"], "command": "run_macro_file", "args": {"file": "res://Packages/Default/Delete to Hard EOL.sublime-macro"} },
{ "keys": ["ctrl+k", "ctrl+backspace"], "command": "run_macro_file", "args": {"file": "res://Packages/Default/Delete to Hard BOL.sublime-macro"} },
{ "keys": ["ctrl+k", "ctrl+g"], "command": "clear_bookmarks", "args": {"name": "mark"} },
{ "keys": ["ctrl+k", "ctrl+c"], "command": "show_at_center" },
{ "keys": ["ctrl++"], "command": "increase_font_size" },
{ "keys": ["ctrl+="], "command": "increase_font_size" },
{ "keys": ["ctrl+-"], "command": "decrease_font_size" },
{ "keys": ["alt+shift+w"], "command": "insert_snippet", "args": { "name": "Packages/XML/Snippets/long-tag.sublime-snippet" } },
{ "keys": ["ctrl+shift+["], "command": "fold" },
{ "keys": ["ctrl+shift+]"], "command": "unfold" },
{ "keys": ["ctrl+k", "ctrl+1"], "command": "fold_by_level", "args": {"level": 1} },
{ "keys": ["ctrl+k", "ctrl+2"], "command": "fold_by_level", "args": {"level": 2} },
{ "keys": ["ctrl+k", "ctrl+3"], "command": "fold_by_level", "args": {"level": 3} },
{ "keys": ["ctrl+k", "ctrl+4"], "command": "fold_by_level", "args": {"level": 4} },
{ "keys": ["ctrl+k", "ctrl+5"], "command": "fold_by_level", "args": {"level": 5} },
{ "keys": ["ctrl+k", "ctrl+6"], "command": "fold_by_level", "args": {"level": 6} },
{ "keys": ["ctrl+k", "ctrl+7"], "command": "fold_by_level", "args": {"level": 7} },
{ "keys": ["ctrl+k", "ctrl+8"], "command": "fold_by_level", "args": {"level": 8} },
{ "keys": ["ctrl+k", "ctrl+9"], "command": "fold_by_level", "args": {"level": 9} },
{ "keys": ["ctrl+k", "ctrl+0"], "command": "unfold_all" },
{ "keys": ["ctrl+k", "ctrl+j"], "command": "unfold_all" },
{ "keys": ["ctrl+k", "ctrl+t"], "command": "fold_tag_attributes" },
{ "keys": ["context_menu"], "command": "context_menu" },
{ "keys": ["alt+c"], "command": "toggle_case_sensitive", "context":
[
{ "key": "setting.is_widget", "operator": "equal", "operand": true }
]
},
{ "keys": ["alt+r"], "command": "toggle_regex", "context":
[
{ "key": "setting.is_widget", "operator": "equal", "operand": true }
]
},
{ "keys": ["alt+w"], "command": "toggle_whole_word", "context":
[
{ "key": "setting.is_widget", "operator": "equal", "operand": true }
]
},
{ "keys": ["alt+a"], "command": "toggle_preserve_case", "context":
[
{ "key": "setting.is_widget", "operator": "equal", "operand": true }
]
},
// Find panel key bindings
{ "keys": ["enter"], "command": "find_next", "context":
[{"key": "panel", "operand": "find"}, {"key": "panel_has_focus"}]
},
{ "keys": ["shift+enter"], "command": "find_prev", "context":
[{"key": "panel", "operand": "find"}, {"key": "panel_has_focus"}]
},
{ "keys": ["alt+enter"], "command": "find_all", "args": {"close_panel": true},
"context": [{"key": "panel", "operand": "find"}, {"key": "panel_has_focus"}]
},
// Replace panel key bindings
{ "keys": ["enter"], "command": "find_next", "context":
[{"key": "panel", "operand": "replace"}, {"key": "panel_has_focus"}]
},
{ "keys": ["shift+enter"], "command": "find_prev", "context":
[{"key": "panel", "operand": "replace"}, {"key": "panel_has_focus"}]
},
{ "keys": ["alt+enter"], "command": "find_all", "args": {"close_panel": true},
"context": [{"key": "panel", "operand": "replace"}, {"key": "panel_has_focus"}]
},
{ "keys": ["ctrl+alt+enter"], "command": "replace_all", "args": {"close_panel": true},
"context": [{"key": "panel", "operand": "replace"}, {"key": "panel_has_focus"}]
},
// Incremental find panel key bindings
{ "keys": ["enter"], "command": "hide_panel", "context":
[{"key": "panel", "operand": "incremental_find"}, {"key": "panel_has_focus"}]
},
{ "keys": ["shift+enter"], "command": "find_prev", "context":
[{"key": "panel", "operand": "incremental_find"}, {"key": "panel_has_focus"}]
},
{ "keys": ["alt+enter"], "command": "find_all", "args": {"close_panel": true},
"context": [{"key": "panel", "operand": "incremental_find"}, {"key": "panel_has_focus"}]
},
// Find in Files panel key bindings
{ "keys": ["alt+enter"], "command": "find_all",
"context": [{"key": "panel", "operand": "find_in_files"}, {"key": "panel_has_focus"}]
},
{ "keys": ["ctrl+alt+enter"], "command": "replace_all",
"context": [{"key": "panel", "operand": "find_in_files"}, {"key": "panel_has_focus"}]
},
// HTML, XML close tag
{ "keys": ["/"], "command": "close_tag", "args": { "insert_slash": true }, "context":
[
{ "key": "selector", "operator": "equal", "operand": "(text.html, text.xml) - string - comment", "match_all": true },
{ "key": "preceding_text", "operator": "regex_match", "operand": ".*<$", "match_all": true },
{ "key": "setting.auto_close_tags" }
]
}
]

View File

@@ -1,706 +0,0 @@
/*
On OS X, basic text manipulations (left, right, command+left, etc) make use of the system key bindings,
and don't need to be repeated here. Anything listed here will take precedence, however.
*/
[
{ "keys": ["super+shift+n"], "command": "new_window" },
{ "keys": ["super+shift+w"], "command": "close_window" },
{ "keys": ["super+o"], "command": "prompt_open" },
{ "keys": ["super+shift+t"], "command": "reopen_last_file" },
{ "keys": ["super+alt+up"], "command": "switch_file", "args": {"extensions": ["cpp", "cxx", "cc", "c", "hpp", "hxx", "hh", "h", "ipp", "inl", "m", "mm"]} },
{ "keys": ["super+n"], "command": "new_file" },
{ "keys": ["super+s"], "command": "save" },
{ "keys": ["super+shift+s"], "command": "prompt_save_as" },
{ "keys": ["super+alt+s"], "command": "save_all" },
{ "keys": ["super+w"], "command": "close" },
{ "keys": ["super+k", "super+b"], "command": "toggle_side_bar" },
{ "keys": ["super+ctrl+f"], "command": "toggle_full_screen" },
{ "keys": ["super+ctrl+shift+f"], "command": "toggle_distraction_free" },
{ "keys": ["super+z"], "command": "undo" },
{ "keys": ["super+shift+z"], "command": "redo" },
{ "keys": ["super+y"], "command": "redo_or_repeat" },
{ "keys": ["super+u"], "command": "soft_undo" },
{ "keys": ["super+shift+u"], "command": "soft_redo" },
{ "keys": ["super+x"], "command": "cut" },
{ "keys": ["super+c"], "command": "copy" },
{ "keys": ["super+v"], "command": "paste" },
{ "keys": ["super+shift+v"], "command": "paste_and_indent" },
{ "keys": ["super+k", "super+v"], "command": "paste_from_history" },
{ "keys": ["super+option+v"], "command": "paste_from_history" },
{ "keys": ["ctrl+alt+left"], "command": "move", "args": {"by": "subwords", "forward": false} },
{ "keys": ["ctrl+alt+right"], "command": "move", "args": {"by": "subword_ends", "forward": true} },
{ "keys": ["ctrl+alt+shift+left"], "command": "move", "args": {"by": "subwords", "forward": false, "extend": true} },
{ "keys": ["ctrl+alt+shift+right"], "command": "move", "args": {"by": "subword_ends", "forward": true, "extend": true} },
{ "keys": ["ctrl+left"], "command": "move", "args": {"by": "subwords", "forward": false} },
{ "keys": ["ctrl+right"], "command": "move", "args": {"by": "subword_ends", "forward": true} },
{ "keys": ["ctrl+shift+left"], "command": "move", "args": {"by": "subwords", "forward": false, "extend": true} },
{ "keys": ["ctrl+shift+right"], "command": "move", "args": {"by": "subword_ends", "forward": true, "extend": true} },
{ "keys": ["ctrl+alt+up"], "command": "scroll_lines", "args": {"amount": 1.0} },
{ "keys": ["ctrl+alt+down"], "command": "scroll_lines", "args": {"amount": -1.0} },
{ "keys": ["ctrl+shift+up"], "command": "select_lines", "args": {"forward": false} },
{ "keys": ["ctrl+shift+down"], "command": "select_lines", "args": {"forward": true} },
{ "keys": ["super+shift+["], "command": "prev_view" },
{ "keys": ["super+shift+]"], "command": "next_view" },
{ "keys": ["super+alt+left"], "command": "prev_view" },
{ "keys": ["super+alt+right"], "command": "next_view" },
{ "keys": ["ctrl+tab"], "command": "next_view_in_stack" },
{ "keys": ["ctrl+shift+tab"], "command": "prev_view_in_stack" },
{ "keys": ["super+a"], "command": "select_all" },
{ "keys": ["super+shift+l"], "command": "split_selection_into_lines" },
{ "keys": ["escape"], "command": "single_selection", "context":
[
{ "key": "num_selections", "operator": "not_equal", "operand": 1 }
]
},
{ "keys": ["escape"], "command": "clear_fields", "context":
[
{ "key": "has_next_field", "operator": "equal", "operand": true }
]
},
{ "keys": ["escape"], "command": "clear_fields", "context":
[
{ "key": "has_prev_field", "operator": "equal", "operand": true }
]
},
{ "keys": ["escape"], "command": "hide_panel", "args": {"cancel": true},
"context":
[
{ "key": "panel_visible", "operator": "equal", "operand": true }
]
},
{ "keys": ["escape"], "command": "hide_overlay", "context":
[
{ "key": "overlay_visible", "operator": "equal", "operand": true }
]
},
{ "keys": ["escape"], "command": "hide_popup", "context":
[
{ "key": "popup_visible", "operator": "equal", "operand": true }
]
},
{ "keys": ["escape"], "command": "hide_auto_complete", "context":
[
{ "key": "auto_complete_visible", "operator": "equal", "operand": true }
]
},
{ "keys": ["super+]"], "command": "indent" },
{ "keys": ["super+["], "command": "unindent" },
{ "keys": ["tab"], "command": "insert_best_completion", "args": {"default": "\t", "exact": true} },
{ "keys": ["tab"], "command": "insert_best_completion", "args": {"default": "\t", "exact": false},
"context":
[
{ "key": "setting.tab_completion", "operator": "equal", "operand": true },
{ "key": "preceding_text", "operator": "not_regex_match", "operand": ".*\\b[0-9]+$", "match_all": true },
]
},
{ "keys": ["tab"], "command": "replace_completion_with_next_completion", "context":
[
{ "key": "last_command", "operator": "equal", "operand": "insert_best_completion" },
{ "key": "setting.tab_completion", "operator": "equal", "operand": true }
]
},
{ "keys": ["tab"], "command": "reindent", "context":
[
{ "key": "setting.auto_indent", "operator": "equal", "operand": true },
{ "key": "selection_empty", "operator": "equal", "operand": true, "match_all": true },
{ "key": "preceding_text", "operator": "regex_match", "operand": "^$", "match_all": true },
{ "key": "following_text", "operator": "regex_match", "operand": "^$", "match_all": true }
]
},
{ "keys": ["tab"], "command": "indent", "context":
[
{ "key": "text", "operator": "regex_contains", "operand": "\n" }
]
},
{ "keys": ["tab"], "command": "next_field", "context":
[
{ "key": "has_next_field", "operator": "equal", "operand": true }
]
},
{ "keys": ["tab"], "command": "commit_completion", "context":
[
{ "key": "auto_complete_visible" },
{ "key": "setting.auto_complete_commit_on_tab" }
]
},
{ "keys": ["shift+tab"], "command": "insert", "args": {"characters": "\t"} },
{ "keys": ["shift+tab"], "command": "unindent", "context":
[
{ "key": "setting.shift_tab_unindent", "operator": "equal", "operand": true }
]
},
{ "keys": ["shift+tab"], "command": "unindent", "context":
[
{ "key": "preceding_text", "operator": "regex_match", "operand": "^[\t ]*" }
]
},
{ "keys": ["shift+tab"], "command": "unindent", "context":
[
{ "key": "text", "operator": "regex_contains", "operand": "\n" }
]
},
{ "keys": ["shift+tab"], "command": "prev_field", "context":
[
{ "key": "has_prev_field", "operator": "equal", "operand": true }
]
},
{ "keys": ["super+l"], "command": "expand_selection", "args": {"to": "line"} },
{ "keys": ["super+d"], "command": "find_under_expand" },
{ "keys": ["super+k", "super+d"], "command": "find_under_expand_skip" },
{ "keys": ["super+shift+space"], "command": "expand_selection", "args": {"to": "scope"} },
{ "keys": ["ctrl+shift+m"], "command": "expand_selection", "args": {"to": "brackets"} },
{ "keys": ["ctrl+m"], "command": "move_to", "args": {"to": "brackets"} },
{ "keys": ["super+shift+j"], "command": "expand_selection", "args": {"to": "indentation"} },
{ "keys": ["super+shift+a"], "command": "expand_selection", "args": {"to": "tag"} },
{ "keys": ["super+alt+."], "command": "close_tag" },
{ "keys": ["ctrl+q"], "command": "toggle_record_macro" },
{ "keys": ["ctrl+shift+q"], "command": "run_macro" },
{ "keys": ["super+enter"], "command": "run_macro_file", "args": {"file": "res://Packages/Default/Add Line.sublime-macro"} },
{ "keys": ["super+shift+enter"], "command": "run_macro_file", "args": {"file": "res://Packages/Default/Add Line Before.sublime-macro"} },
{ "keys": ["enter"], "command": "commit_completion", "context":
[
{ "key": "auto_complete_visible" },
{ "key": "setting.auto_complete_commit_on_tab", "operand": false }
]
},
{ "keys": ["super+t"], "command": "show_overlay", "args": {"overlay": "goto", "show_files": true} },
{ "keys": ["super+p"], "command": "show_overlay", "args": {"overlay": "goto", "show_files": true} },
{ "keys": ["super+shift+p"], "command": "show_overlay", "args": {"overlay": "command_palette"} },
{ "keys": ["super+ctrl+p"], "command": "prompt_select_workspace" },
{ "keys": ["super+r"], "command": "show_overlay", "args": {"overlay": "goto", "text": "@"} },
{ "keys": ["ctrl+g"], "command": "show_overlay", "args": {"overlay": "goto", "text": ":"} },
{ "keys": ["f12"], "command": "goto_definition" },
{ "keys": ["super+alt+down"], "command": "goto_definition" },
{ "keys": ["super+shift+r"], "command": "goto_symbol_in_project" },
{ "keys": ["ctrl+minus"], "command": "jump_back" },
{ "keys": ["ctrl+shift+minus"], "command": "jump_forward" },
{ "keys": ["super+i"], "command": "show_panel", "args": {"panel": "incremental_find", "reverse": false} },
{ "keys": ["super+shift+i"], "command": "show_panel", "args": {"panel": "incremental_find", "reverse": true} },
{ "keys": ["super+f"], "command": "show_panel", "args": {"panel": "find", "reverse": false} },
{ "keys": ["super+alt+f"], "command": "show_panel", "args": {"panel": "replace", "reverse": false} },
{ "keys": ["super+alt+e"], "command": "replace_next" },
{ "keys": ["super+g"], "command": "find_next" },
{ "keys": ["super+shift+g"], "command": "find_prev" },
{ "keys": ["super+e"], "command": "slurp_find_string" },
{ "keys": ["super+shift+e"], "command": "slurp_replace_string" },
{ "keys": ["alt+super+g"], "command": "find_under" },
{ "keys": ["shift+alt+super+g"], "command": "find_under_prev" },
{ "keys": ["ctrl+super+g"], "command": "find_all_under" },
{ "keys": ["super+shift+f"], "command": "show_panel", "args": {"panel": "find_in_files"} },
{ "keys": ["f4"], "command": "next_result" },
{ "keys": ["shift+f4"], "command": "prev_result" },
{ "keys": ["f6"], "command": "toggle_setting", "args": {"setting": "spell_check"} },
{ "keys": ["ctrl+f6"], "command": "next_misspelling" },
{ "keys": ["ctrl+shift+f6"], "command": "prev_misspelling" },
{ "keys": ["ctrl+super+up"], "command": "swap_line_up" },
{ "keys": ["ctrl+super+down"], "command": "swap_line_down" },
{ "keys": ["ctrl+backspace"], "command": "delete_word", "args": { "forward": false, "sub_words": true } },
{ "keys": ["ctrl+delete"], "command": "delete_word", "args": { "forward": true, "sub_words": true } },
{ "keys": ["super+forward_slash"], "command": "toggle_comment", "args": { "block": false } },
{ "keys": ["super+alt+forward_slash"], "command": "toggle_comment", "args": { "block": true } },
{ "keys": ["super+j"], "command": "join_lines" },
{ "keys": ["super+shift+d"], "command": "duplicate_line" },
{ "keys": ["ctrl+backquote"], "command": "show_panel", "args": {"panel": "console", "toggle": true} },
{ "keys": ["ctrl+space"], "command": "auto_complete" },
{ "keys": ["ctrl+space"], "command": "replace_completion_with_auto_complete", "context":
[
{ "key": "last_command", "operator": "equal", "operand": "insert_best_completion" },
{ "key": "auto_complete_visible", "operator": "equal", "operand": false },
{ "key": "setting.tab_completion", "operator": "equal", "operand": true }
]
},
{ "keys": ["super+alt+p"], "command": "show_scope_name" },
{ "keys": ["ctrl+shift+p"], "command": "show_scope_name" },
{ "keys": ["f7"], "command": "build" },
{ "keys": ["super+b"], "command": "build" },
{ "keys": ["super+shift+b"], "command": "build", "args": {"select": true} },
{ "keys": ["ctrl+c"], "command": "cancel_build" },
{ "keys": ["ctrl+t"], "command": "transpose" },
{ "keys": ["f5"], "command": "sort_lines", "args": {"case_sensitive": false} },
{ "keys": ["ctrl+f5"], "command": "sort_lines", "args": {"case_sensitive": true} },
// Auto-pair quotes
{ "keys": ["\""], "command": "insert_snippet", "args": {"contents": "\"$0\""}, "context":
[
{ "key": "setting.auto_match_enabled", "operator": "equal", "operand": true },
{ "key": "selection_empty", "operator": "equal", "operand": true, "match_all": true },
{ "key": "following_text", "operator": "regex_contains", "operand": "^(?:\t| |\\)|]|\\}|>|$)", "match_all": true },
{ "key": "preceding_text", "operator": "not_regex_contains", "operand": "[\"a-zA-Z0-9_]$", "match_all": true },
{ "key": "eol_selector", "operator": "not_equal", "operand": "string.quoted.double - punctuation.definition.string.end", "match_all": true }
]
},
{ "keys": ["\""], "command": "insert_snippet", "args": {"contents": "\"${0:$SELECTION}\""}, "context":
[
{ "key": "setting.auto_match_enabled", "operator": "equal", "operand": true },
{ "key": "selection_empty", "operator": "equal", "operand": false, "match_all": true }
]
},
{ "keys": ["\""], "command": "move", "args": {"by": "characters", "forward": true}, "context":
[
{ "key": "setting.auto_match_enabled", "operator": "equal", "operand": true },
{ "key": "selection_empty", "operator": "equal", "operand": true, "match_all": true },
{ "key": "following_text", "operator": "regex_contains", "operand": "^\"", "match_all": true },
{ "key": "selector", "operator": "not_equal", "operand": "punctuation.definition.string.begin", "match_all": true },
{ "key": "eol_selector", "operator": "not_equal", "operand": "string.quoted.double - punctuation.definition.string.end", "match_all": true },
]
},
{ "keys": ["backspace"], "command": "run_macro_file", "args": {"file": "res://Packages/Default/Delete Left Right.sublime-macro"}, "context":
[
{ "key": "setting.auto_match_enabled", "operator": "equal", "operand": true },
{ "key": "selection_empty", "operator": "equal", "operand": true, "match_all": true },
{ "key": "preceding_text", "operator": "regex_contains", "operand": "\"$", "match_all": true },
{ "key": "following_text", "operator": "regex_contains", "operand": "^\"", "match_all": true },
{ "key": "selector", "operator": "not_equal", "operand": "punctuation.definition.string.begin", "match_all": true },
{ "key": "eol_selector", "operator": "not_equal", "operand": "string.quoted.double - punctuation.definition.string.end", "match_all": true },
]
},
// Auto-pair single quotes
{ "keys": ["'"], "command": "insert_snippet", "args": {"contents": "'$0'"}, "context":
[
{ "key": "setting.auto_match_enabled", "operator": "equal", "operand": true },
{ "key": "selection_empty", "operator": "equal", "operand": true, "match_all": true },
{ "key": "following_text", "operator": "regex_contains", "operand": "^(?:\t| |\\)|]|\\}|>|$)", "match_all": true },
{ "key": "preceding_text", "operator": "not_regex_contains", "operand": "['a-zA-Z0-9_]$", "match_all": true },
{ "key": "eol_selector", "operator": "not_equal", "operand": "string.quoted.single - punctuation.definition.string.end", "match_all": true }
]
},
{ "keys": ["'"], "command": "insert_snippet", "args": {"contents": "'${0:$SELECTION}'"}, "context":
[
{ "key": "setting.auto_match_enabled", "operator": "equal", "operand": true },
{ "key": "selection_empty", "operator": "equal", "operand": false, "match_all": true }
]
},
{ "keys": ["'"], "command": "move", "args": {"by": "characters", "forward": true}, "context":
[
{ "key": "setting.auto_match_enabled", "operator": "equal", "operand": true },
{ "key": "selection_empty", "operator": "equal", "operand": true, "match_all": true },
{ "key": "following_text", "operator": "regex_contains", "operand": "^'", "match_all": true },
{ "key": "selector", "operator": "not_equal", "operand": "punctuation.definition.string.begin", "match_all": true },
{ "key": "eol_selector", "operator": "not_equal", "operand": "string.quoted.single - punctuation.definition.string.end", "match_all": true },
]
},
{ "keys": ["backspace"], "command": "run_macro_file", "args": {"file": "res://Packages/Default/Delete Left Right.sublime-macro"}, "context":
[
{ "key": "setting.auto_match_enabled", "operator": "equal", "operand": true },
{ "key": "selection_empty", "operator": "equal", "operand": true, "match_all": true },
{ "key": "preceding_text", "operator": "regex_contains", "operand": "'$", "match_all": true },
{ "key": "following_text", "operator": "regex_contains", "operand": "^'", "match_all": true },
{ "key": "selector", "operator": "not_equal", "operand": "punctuation.definition.string.begin", "match_all": true },
{ "key": "eol_selector", "operator": "not_equal", "operand": "string.quoted.single - punctuation.definition.string.end", "match_all": true },
]
},
// Auto-pair brackets
{ "keys": ["("], "command": "insert_snippet", "args": {"contents": "($0)"}, "context":
[
{ "key": "setting.auto_match_enabled", "operator": "equal", "operand": true },
{ "key": "selection_empty", "operator": "equal", "operand": true, "match_all": true },
{ "key": "following_text", "operator": "regex_contains", "operand": "^(?:\t| |\\)|]|;|\\}|$)", "match_all": true }
]
},
{ "keys": ["("], "command": "insert_snippet", "args": {"contents": "(${0:$SELECTION})"}, "context":
[
{ "key": "setting.auto_match_enabled", "operator": "equal", "operand": true },
{ "key": "selection_empty", "operator": "equal", "operand": false, "match_all": true }
]
},
{ "keys": [")"], "command": "move", "args": {"by": "characters", "forward": true}, "context":
[
{ "key": "setting.auto_match_enabled", "operator": "equal", "operand": true },
{ "key": "selection_empty", "operator": "equal", "operand": true, "match_all": true },
{ "key": "following_text", "operator": "regex_contains", "operand": "^\\)", "match_all": true }
]
},
{ "keys": ["backspace"], "command": "run_macro_file", "args": {"file": "res://Packages/Default/Delete Left Right.sublime-macro"}, "context":
[
{ "key": "setting.auto_match_enabled", "operator": "equal", "operand": true },
{ "key": "selection_empty", "operator": "equal", "operand": true, "match_all": true },
{ "key": "preceding_text", "operator": "regex_contains", "operand": "\\($", "match_all": true },
{ "key": "following_text", "operator": "regex_contains", "operand": "^\\)", "match_all": true }
]
},
// Auto-pair square brackets
{ "keys": ["["], "command": "insert_snippet", "args": {"contents": "[$0]"}, "context":
[
{ "key": "setting.auto_match_enabled", "operator": "equal", "operand": true },
{ "key": "selection_empty", "operator": "equal", "operand": true, "match_all": true },
{ "key": "following_text", "operator": "regex_contains", "operand": "^(?:\t| |\\)|]|;|\\}|$)", "match_all": true }
]
},
{ "keys": ["["], "command": "insert_snippet", "args": {"contents": "[${0:$SELECTION}]"}, "context":
[
{ "key": "setting.auto_match_enabled", "operator": "equal", "operand": true },
{ "key": "selection_empty", "operator": "equal", "operand": false, "match_all": true }
]
},
{ "keys": ["]"], "command": "move", "args": {"by": "characters", "forward": true}, "context":
[
{ "key": "setting.auto_match_enabled", "operator": "equal", "operand": true },
{ "key": "selection_empty", "operator": "equal", "operand": true, "match_all": true },
{ "key": "following_text", "operator": "regex_contains", "operand": "^\\]", "match_all": true }
]
},
{ "keys": ["backspace"], "command": "run_macro_file", "args": {"file": "res://Packages/Default/Delete Left Right.sublime-macro"}, "context":
[
{ "key": "setting.auto_match_enabled", "operator": "equal", "operand": true },
{ "key": "selection_empty", "operator": "equal", "operand": true, "match_all": true },
{ "key": "preceding_text", "operator": "regex_contains", "operand": "\\[$", "match_all": true },
{ "key": "following_text", "operator": "regex_contains", "operand": "^\\]", "match_all": true }
]
},
// Auto-pair curly brackets
{ "keys": ["{"], "command": "insert_snippet", "args": {"contents": "{$0}"}, "context":
[
{ "key": "setting.auto_match_enabled", "operator": "equal", "operand": true },
{ "key": "selection_empty", "operator": "equal", "operand": true, "match_all": true },
{ "key": "following_text", "operator": "regex_contains", "operand": "^(?:\t| |\\)|]|\\}|$)", "match_all": true }
]
},
{ "keys": ["{"], "command": "wrap_block", "args": {"begin": "{", "end": "}"}, "context":
[
{ "key": "indented_block", "match_all": true },
{ "key": "setting.auto_match_enabled", "operator": "equal", "operand": true },
{ "key": "selection_empty", "operator": "equal", "operand": true, "match_all": true },
{ "key": "following_text", "operator": "regex_match", "operand": "^$", "match_all": true },
]
},
{ "keys": ["{"], "command": "insert_snippet", "args": {"contents": "{${0:$SELECTION}}"}, "context":
[
{ "key": "setting.auto_match_enabled", "operator": "equal", "operand": true },
{ "key": "selection_empty", "operator": "equal", "operand": false, "match_all": true }
]
},
{ "keys": ["}"], "command": "move", "args": {"by": "characters", "forward": true}, "context":
[
{ "key": "setting.auto_match_enabled", "operator": "equal", "operand": true },
{ "key": "selection_empty", "operator": "equal", "operand": true, "match_all": true },
{ "key": "following_text", "operator": "regex_contains", "operand": "^\\}", "match_all": true }
]
},
{ "keys": ["backspace"], "command": "run_macro_file", "args": {"file": "res://Packages/Default/Delete Left Right.sublime-macro"}, "context":
[
{ "key": "setting.auto_match_enabled", "operator": "equal", "operand": true },
{ "key": "selection_empty", "operator": "equal", "operand": true, "match_all": true },
{ "key": "preceding_text", "operator": "regex_contains", "operand": "\\{$", "match_all": true },
{ "key": "following_text", "operator": "regex_contains", "operand": "^\\}", "match_all": true }
]
},
{ "keys": ["enter"], "command": "run_macro_file", "args": {"file": "res://Packages/Default/Add Line in Braces.sublime-macro"}, "context":
[
{ "key": "setting.auto_indent", "operator": "equal", "operand": true },
{ "key": "selection_empty", "operator": "equal", "operand": true, "match_all": true },
{ "key": "preceding_text", "operator": "regex_contains", "operand": "\\{$", "match_all": true },
{ "key": "following_text", "operator": "regex_contains", "operand": "^\\}", "match_all": true }
]
},
{ "keys": ["shift+enter"], "command": "run_macro_file", "args": {"file": "res://Packages/Default/Add Line in Braces.sublime-macro"}, "context":
[
{ "key": "setting.auto_indent", "operator": "equal", "operand": true },
{ "key": "selection_empty", "operator": "equal", "operand": true, "match_all": true },
{ "key": "preceding_text", "operator": "regex_contains", "operand": "\\{$", "match_all": true },
{ "key": "following_text", "operator": "regex_contains", "operand": "^\\}", "match_all": true }
]
},
{ "keys": ["enter"], "command": "auto_indent_tag", "context":
[
{ "key": "setting.auto_indent", "operator": "equal", "operand": true },
{ "key": "selection_empty", "operator": "equal", "operand": true, "match_all": true },
{ "key": "selector", "operator": "equal", "operand": "punctuation.definition.tag.begin", "match_all": true },
{ "key": "preceding_text", "operator": "regex_contains", "operand": ">$", "match_all": true },
{ "key": "following_text", "operator": "regex_contains", "operand": "^</", "match_all": true },
]
},
{ "keys": ["shift+enter"], "command": "auto_indent_tag", "context":
[
{ "key": "setting.auto_indent", "operator": "equal", "operand": true },
{ "key": "selection_empty", "operator": "equal", "operand": true, "match_all": true },
{ "key": "selector", "operator": "equal", "operand": "punctuation.definition.tag.begin", "match_all": true },
{ "key": "preceding_text", "operator": "regex_contains", "operand": ">$", "match_all": true },
{ "key": "following_text", "operator": "regex_contains", "operand": "^</", "match_all": true },
]
},
{
"keys": ["super+alt+1"],
"command": "set_layout",
"args":
{
"cols": [0.0, 1.0],
"rows": [0.0, 1.0],
"cells": [[0, 0, 1, 1]]
}
},
{
"keys": ["super+alt+2"],
"command": "set_layout",
"args":
{
"cols": [0.0, 0.5, 1.0],
"rows": [0.0, 1.0],
"cells": [[0, 0, 1, 1], [1, 0, 2, 1]]
}
},
{
"keys": ["super+alt+3"],
"command": "set_layout",
"args":
{
"cols": [0.0, 0.33, 0.66, 1.0],
"rows": [0.0, 1.0],
"cells": [[0, 0, 1, 1], [1, 0, 2, 1], [2, 0, 3, 1]]
}
},
{
"keys": ["super+alt+4"],
"command": "set_layout",
"args":
{
"cols": [0.0, 0.25, 0.5, 0.75, 1.0],
"rows": [0.0, 1.0],
"cells": [[0, 0, 1, 1], [1, 0, 2, 1], [2, 0, 3, 1], [3, 0, 4, 1]]
}
},
{
"keys": ["super+alt+shift+2"],
"command": "set_layout",
"args":
{
"cols": [0.0, 1.0],
"rows": [0.0, 0.5, 1.0],
"cells": [[0, 0, 1, 1], [0, 1, 1, 2]]
}
},
{
"keys": ["super+alt+shift+3"],
"command": "set_layout",
"args":
{
"cols": [0.0, 1.0],
"rows": [0.0, 0.33, 0.66, 1.0],
"cells": [[0, 0, 1, 1], [0, 1, 1, 2], [0, 2, 1, 3]]
}
},
{
"keys": ["super+alt+5"],
"command": "set_layout",
"args":
{
"cols": [0.0, 0.5, 1.0],
"rows": [0.0, 0.5, 1.0],
"cells":
[
[0, 0, 1, 1], [1, 0, 2, 1],
[0, 1, 1, 2], [1, 1, 2, 2]
]
}
},
{ "keys": ["ctrl+1"], "command": "focus_group", "args": { "group": 0 } },
{ "keys": ["ctrl+2"], "command": "focus_group", "args": { "group": 1 } },
{ "keys": ["ctrl+3"], "command": "focus_group", "args": { "group": 2 } },
{ "keys": ["ctrl+4"], "command": "focus_group", "args": { "group": 3 } },
{ "keys": ["ctrl+5"], "command": "focus_group", "args": { "group": 4 } },
{ "keys": ["ctrl+6"], "command": "focus_group", "args": { "group": 5 } },
{ "keys": ["ctrl+7"], "command": "focus_group", "args": { "group": 6 } },
{ "keys": ["ctrl+8"], "command": "focus_group", "args": { "group": 7 } },
{ "keys": ["ctrl+9"], "command": "focus_group", "args": { "group": 8 } },
{ "keys": ["ctrl+shift+1"], "command": "move_to_group", "args": { "group": 0 } },
{ "keys": ["ctrl+shift+2"], "command": "move_to_group", "args": { "group": 1 } },
{ "keys": ["ctrl+shift+3"], "command": "move_to_group", "args": { "group": 2 } },
{ "keys": ["ctrl+shift+4"], "command": "move_to_group", "args": { "group": 3 } },
{ "keys": ["ctrl+shift+5"], "command": "move_to_group", "args": { "group": 4 } },
{ "keys": ["ctrl+shift+6"], "command": "move_to_group", "args": { "group": 5 } },
{ "keys": ["ctrl+shift+7"], "command": "move_to_group", "args": { "group": 6 } },
{ "keys": ["ctrl+shift+8"], "command": "move_to_group", "args": { "group": 7 } },
{ "keys": ["ctrl+shift+9"], "command": "move_to_group", "args": { "group": 8 } },
{ "keys": ["ctrl+0"], "command": "focus_side_bar" },
{ "keys": ["super+k", "super+up"], "command": "new_pane" },
{ "keys": ["super+k", "super+shift+up"], "command": "new_pane", "args": {"move": false} },
{ "keys": ["super+k", "super+down"], "command": "close_pane" },
{ "keys": ["super+k", "super+left"], "command": "focus_neighboring_group", "args": {"forward": false} },
{ "keys": ["super+k", "super+right"], "command": "focus_neighboring_group" },
{ "keys": ["super+k", "super+shift+left"], "command": "move_to_neighboring_group", "args": {"forward": false} },
{ "keys": ["super+k", "super+shift+right"], "command": "move_to_neighboring_group" },
{ "keys": ["super+1"], "command": "select_by_index", "args": { "index": 0 } },
{ "keys": ["super+2"], "command": "select_by_index", "args": { "index": 1 } },
{ "keys": ["super+3"], "command": "select_by_index", "args": { "index": 2 } },
{ "keys": ["super+4"], "command": "select_by_index", "args": { "index": 3 } },
{ "keys": ["super+5"], "command": "select_by_index", "args": { "index": 4 } },
{ "keys": ["super+6"], "command": "select_by_index", "args": { "index": 5 } },
{ "keys": ["super+7"], "command": "select_by_index", "args": { "index": 6 } },
{ "keys": ["super+8"], "command": "select_by_index", "args": { "index": 7 } },
{ "keys": ["super+9"], "command": "select_by_index", "args": { "index": 8 } },
{ "keys": ["super+0"], "command": "select_by_index", "args": { "index": 9 } },
{ "keys": ["f2"], "command": "next_bookmark" },
{ "keys": ["shift+f2"], "command": "prev_bookmark" },
{ "keys": ["super+f2"], "command": "toggle_bookmark" },
{ "keys": ["super+shift+f2"], "command": "clear_bookmarks" },
{ "keys": ["alt+f2"], "command": "select_all_bookmarks" },
{ "keys": ["super+k", "super+u"], "command": "upper_case" },
{ "keys": ["super+k", "super+l"], "command": "lower_case" },
{ "keys": ["super+k", "super+space"], "command": "set_mark" },
{ "keys": ["super+k", "super+a"], "command": "select_to_mark" },
{ "keys": ["super+k", "super+w"], "command": "delete_to_mark" },
{ "keys": ["super+k", "super+x"], "command": "swap_with_mark" },
{ "keys": ["super+k", "super+g"], "command": "clear_bookmarks", "args": {"name": "mark"} },
{ "keys": ["super+equals"], "command": "increase_font_size" },
{ "keys": ["super+plus"], "command": "increase_font_size" },
{ "keys": ["super+minus"], "command": "decrease_font_size" },
{ "keys": ["ctrl+shift+w"], "command": "insert_snippet", "args": { "name": "Packages/XML/Snippets/long-tag.sublime-snippet" } },
{ "keys": ["ctrl+shift+k"], "command": "run_macro_file", "args": {"file": "res://Packages/Default/Delete Line.sublime-macro"} },
{ "keys": ["super+alt+q"], "command": "wrap_lines" },
{ "keys": ["super+alt+["], "command": "fold" },
{ "keys": ["super+alt+]"], "command": "unfold" },
{ "keys": ["super+k", "super+1"], "command": "fold_by_level", "args": {"level": 1} },
{ "keys": ["super+k", "super+2"], "command": "fold_by_level", "args": {"level": 2} },
{ "keys": ["super+k", "super+3"], "command": "fold_by_level", "args": {"level": 3} },
{ "keys": ["super+k", "super+4"], "command": "fold_by_level", "args": {"level": 4} },
{ "keys": ["super+k", "super+5"], "command": "fold_by_level", "args": {"level": 5} },
{ "keys": ["super+k", "super+6"], "command": "fold_by_level", "args": {"level": 6} },
{ "keys": ["super+k", "super+7"], "command": "fold_by_level", "args": {"level": 7} },
{ "keys": ["super+k", "super+8"], "command": "fold_by_level", "args": {"level": 8} },
{ "keys": ["super+k", "super+9"], "command": "fold_by_level", "args": {"level": 9} },
{ "keys": ["super+k", "super+0"], "command": "unfold_all" },
{ "keys": ["super+k", "super+j"], "command": "unfold_all" },
{ "keys": ["super+k", "super+t"], "command": "fold_tag_attributes" },
{ "keys": ["super+alt+o"], "command": "toggle_overwrite" },
{ "keys": ["alt+f2"], "command": "context_menu" },
{ "keys": ["super+alt+c"], "command": "toggle_case_sensitive", "context":
[
{ "key": "setting.is_widget", "operator": "equal", "operand": true }
]
},
{ "keys": ["super+alt+r"], "command": "toggle_regex", "context":
[
{ "key": "setting.is_widget", "operator": "equal", "operand": true }
]
},
{ "keys": ["super+alt+w"], "command": "toggle_whole_word", "context":
[
{ "key": "setting.is_widget", "operator": "equal", "operand": true }
]
},
{ "keys": ["super+alt+a"], "command": "toggle_preserve_case", "context":
[
{ "key": "setting.is_widget", "operator": "equal", "operand": true }
]
},
// Find panel key bindings
{ "keys": ["enter"], "command": "find_next", "context":
[{"key": "panel", "operand": "find"}, {"key": "panel_has_focus"}]
},
{ "keys": ["shift+enter"], "command": "find_prev", "context":
[{"key": "panel", "operand": "find"}, {"key": "panel_has_focus"}]
},
{ "keys": ["alt+enter"], "command": "find_all", "args": {"close_panel": true},
"context": [{"key": "panel", "operand": "find"}, {"key": "panel_has_focus"}]
},
// Replace panel key bindings
{ "keys": ["enter"], "command": "find_next", "context":
[{"key": "panel", "operand": "replace"}, {"key": "panel_has_focus"}]
},
{ "keys": ["shift+enter"], "command": "find_prev", "context":
[{"key": "panel", "operand": "replace"}, {"key": "panel_has_focus"}]
},
{ "keys": ["alt+enter"], "command": "find_all", "args": {"close_panel": true},
"context": [{"key": "panel", "operand": "replace"}, {"key": "panel_has_focus"}]
},
{ "keys": ["ctrl+alt+enter"], "command": "replace_all", "args": {"close_panel": true},
"context": [{"key": "panel", "operand": "replace"}, {"key": "panel_has_focus"}]
},
// Incremental find panel key bindings
{ "keys": ["enter"], "command": "hide_panel", "context":
[{"key": "panel", "operand": "incremental_find"}, {"key": "panel_has_focus"}]
},
{ "keys": ["shift+enter"], "command": "find_prev", "context":
[{"key": "panel", "operand": "incremental_find"}, {"key": "panel_has_focus"}]
},
{ "keys": ["alt+enter"], "command": "find_all", "args": {"close_panel": true},
"context": [{"key": "panel", "operand": "incremental_find"}, {"key": "panel_has_focus"}]
},
{ "keys": ["super+,"], "command": "edit_settings", "args":
{
"base_file": "${packages}/Default/Preferences.sublime-settings",
"default": "// Settings in here override those in \"Default/Preferences.sublime-settings\",\n// and are overridden in turn by syntax-specific settings.\n{\n\t$0\n}\n"
}
},
{ "keys": ["super+k", "super+y"], "command": "yank" },
{ "keys": ["super+k", "super+k"], "command": "run_macro_file", "args": {"file": "res://Packages/Default/Delete to Hard EOL.sublime-macro"} },
{ "keys": ["super+k", "super+backspace"], "command": "run_macro_file", "args": {"file": "res://Packages/Default/Delete to Hard BOL.sublime-macro"} },
{ "keys": ["super+k", "super+c"], "command": "show_at_center" },
// These are OS X built in commands, and don't need to be listed here, but
// doing so lets them show up in the menu
{ "keys": ["ctrl+y"], "command": "yank" },
{ "keys": ["super+backspace"], "command": "run_macro_file", "args": {"file": "res://Packages/Default/Delete to Hard BOL.sublime-macro"} },
// super+delete isn't a built in command, but makes sense anyway
{ "keys": ["super+delete"], "command": "run_macro_file", "args": {"file": "res://Packages/Default/Delete to Hard EOL.sublime-macro"} },
{ "keys": ["ctrl+k"], "command": "run_macro_file", "args": {"file": "res://Packages/Default/Delete to Hard EOL.sublime-macro"} },
{ "keys": ["ctrl+l"], "command": "show_at_center" },
{ "keys": ["ctrl+o"], "command": "insert_snippet", "args": { "contents": "$0\n" } },
{ "keys": ["ctrl+super+d"], "command": "noop" },
{ "keys": ["ctrl+super+shift+d"], "command": "noop" },
// HTML, XML close tag
{ "keys": ["/"], "command": "close_tag", "args": { "insert_slash": true }, "context":
[
{ "key": "selector", "operator": "equal", "operand": "(text.html, text.xml) - string - comment", "match_all": true },
{ "key": "preceding_text", "operator": "regex_match", "operand": ".*<$", "match_all": true },
{ "key": "setting.auto_close_tags" }
]
}
]

View File

@@ -1,432 +0,0 @@
{"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"}

View File

@@ -1,115 +0,0 @@
#!/usr/bin/env python
#
# Kinto - Python implementation of Xlib
#
# Based on code by Stephan Sokolow
# Source: https://gist.github.com/ssokolow/e7c9aae63fb7973e4d64cff969a78ae8
from contextlib import contextmanager
import Xlib
import Xlib.display
# Connect to the X server and get the root window
disp = Xlib.display.Display()
root = disp.screen().root
# Prepare the property names we use so they can be fed into X11 APIs
NET_ACTIVE_WINDOW = disp.intern_atom('_NET_ACTIVE_WINDOW')
NET_WM_NAME = disp.intern_atom('_NET_WM_NAME') # UTF-8
WM_NAME = disp.intern_atom('WM_NAME') # Legacy encoding
NET_WM_CLASS = disp.intern_atom('_NET_WM_CLASS') # UTF-8
WM_CLASS = disp.intern_atom('WM_CLASS')
last_seen = { 'xid': None, 'title': None }
@contextmanager
def window_obj(win_id):
"""Simplify dealing with BadWindow (make it either valid or None)"""
window_obj = None
if win_id:
try:
window_obj = disp.create_resource_object('window', win_id)
except Xlib.error.XError:
pass
yield window_obj
def get_active_window():
"""Return a (window_obj, focus_has_changed) tuple for the active window."""
win_id = root.get_full_property(NET_ACTIVE_WINDOW,Xlib.X.AnyPropertyType).value[0]
focus_changed = (win_id != last_seen['xid'])
if focus_changed:
with window_obj(last_seen['xid']) as old_win:
if old_win:
old_win.change_attributes(event_mask=Xlib.X.NoEventMask)
last_seen['xid'] = win_id
with window_obj(win_id) as new_win:
if new_win:
new_win.change_attributes(event_mask=Xlib.X.PropertyChangeMask)
return win_id, focus_changed
def _get_window_class_inner(win_obj):
for atom in (NET_WM_CLASS, WM_CLASS):
try:
window_class = win_obj.get_full_property(atom, 0)
except UnicodeDecodeError: # Apparently a Debian distro package bug
title = "<could not decode characters>"
else:
if window_class:
win_class = window_class.value.split('\x00')[1]
if isinstance(win_class, bytes):
# Apparently COMPOUND_TEXT is so arcane that this is how
# tools like xprop deal with receiving it these days
win_class = win_class.split('\x00')[1].decode('latin1', 'replace')
return win_class
else:
title = "<unnamed window>"
return "{} (XID: {})".format(title, win_obj.id)
def get_window_class(win_id):
"""Look up the window name for a given X11 window ID"""
if not win_id:
last_seen['title'] = "<no window id>"
return last_seen['title']
title_changed = False
with window_obj(win_id) as wobj:
if wobj:
win_title = _get_window_class_inner(wobj)
title_changed = (win_title != last_seen['title'])
last_seen['title'] = win_title
return last_seen['title'], title_changed
def handle_xevent(event):
# Loop through, ignoring events until we're notified of focus/title change
if event.type != Xlib.X.PropertyNotify:
return
changed = False
if event.atom == NET_ACTIVE_WINDOW:
if get_active_window()[1]:
changed = changed or get_window_class(last_seen['xid'])[1]
elif event.atom in (NET_WM_CLASS, WM_CLASS):
changed = changed or get_window_class(last_seen['xid'])[1]
if changed:
handle_change(last_seen)
def handle_change(new_state):
"""Replace this with whatever you want to actually do"""
print(new_state['title'])
if __name__ == '__main__':
# Listen for _NET_ACTIVE_WINDOW changes
root.change_attributes(event_mask=Xlib.X.PropertyChangeMask)
# Prime last_seen with whatever window was active when we started this
get_window_class(get_active_window()[0])
handle_change(last_seen)
while True: # next_event() sleeps until we get an event
handle_xevent(disp.next_event())

View File

@@ -1,16 +0,0 @@
#!/bin/bash
mkdir -p ~/.xkb/{keymap,symbols,types}
cp ./.xkb/symbols/chromebook ~/.xkb/symbols/chromebook
cp ./.xkb/symbols/mac_gui ~/.xkb/symbols/mac_gui
cp ./.xkb/types/mac_gui ~/.xkb/types/mac_gui
setxkbmap -option
setxkbmap -print > ~/.xkb/keymap/kbd.chromebook.gui
setxkbmap -print > ~/.xkb/keymap/kbd.chromebook.term
line=$(cat ~/.xkb/keymap/kbd.chromebook.gui | grep -n 'xkb_symbols' | cut -f1 -d:)
sed -ie "${line}s/\"/+chromebook(swap_lalt_lctrl)+mac_gui(mac_levelssym)\"/2" ~/.xkb/keymap/kbd.chromebook.gui
sleep 1
line=$(cat ~/.xkb/keymap/kbd.chromebook.gui | grep -n 'xkb_types' | cut -f1 -d:)
sed -ie "${line}s/\"/+mac_gui(addmac_levels)\"/2" ~/.xkb/keymap/kbd.chromebook.gui
sleep 1
line=$(cat ~/.xkb/keymap/kbd.chromebook.term | grep -n 'xkb_symbols' | cut -f1 -d:)
sed -ie "${line}s/\"/+altwin(swap_alt_win)+mac_term(mac_levelssym)\"/2" ~/.xkb/keymap/kbd.chromebook.term

View File

@@ -1,176 +0,0 @@
#!/usr/bin/env python3
import os, platform, sysconfig, sys, subprocess, time
yellow = "\033[1;33m"
green = "\033[0;32m"
red = "\033[1;31m"
italic = "\033[3m"
reset = "\033[0;0m"
platform_name = platform.system()
# print sysconfig.get_platform()
sys.stdout.write(yellow)
cloud = '\u2601'
circleo = '\u25CE'
clocko = '\u2B6E'
syme = '\u0250'
syma = '\u0251'
# bang = '\u1F589'.decode('unicode-escape')
internalid = 0
usbid = 0
def keyboard_detect():
global internalid, usbid, chromeswap, system_type
internal_kbname = ""
usb_kbname = ""
# If chromebook
if system_type == "2":
print()
print("Looking for keyboards...")
print()
result = subprocess.check_output('xinput list | grep -iv "Virtual\|USB" | grep -i "keyboard.*keyboard" | grep -o -P "(?<=↳).*(?=id\=)";exit 0', shell=True).decode('utf-8')
if result != "":
internal_kbname = result.strip()
internalid = subprocess.check_output('xinput list | grep -iv "Virtual\|USB" | grep -i "keyboard.*keyboard" | cut -d "=" -f 2- | awk \'{print $1}\' | tail -1;exit 0', shell=True).decode('utf-8')
print("Internal Keyboard\nName: " + internal_kbname + "\nID: " + internalid)
result = subprocess.check_output('udevadm info -e | grep -o -P "(?<=by-id/usb-).*(?=-event-kbd)" | head -1;exit 0', shell=True).decode('utf-8')
if result != "":
usb_kbname = result.strip()
# Loop the following to ensure the id is picked up after 5-10 tries
usbid = ""
usbcount=0
while usbid == "":
usbid = subprocess.check_output('udevadm info -e | stdbuf -oL grep -o -P "(?<=event-kbd /dev/input/by-path/pci-0000:00:).*(?=.0-usb) | head -n 1";exit 0', shell=True).decode('utf-8')
if usbid == "":
usbcount += 1
# print('usbid not found '+ str(usbcount))
if usbcount == 5:
usbid = "0"
time.sleep(1)
print("\nUSB Keyboard\n" + "Name: " + usb_kbname + "\nID: " + usbid)
if system_type == "1":
system_type = "windows"
elif system_type == "2":
system_type = "chromebook"
elif system_type == "3":
result = subprocess.check_output('lsmod | grep hid_apple 1>/dev/null; echo $?', shell=True).decode('utf-8')
if result.strip() == "0":
system_type = "mac"
else:
system_type = "mac_only"
print("Apple hid_apple driver is not loaded, a keymap that is specific for only Apple keyboards will be used.")
if system_type == "windows" or system_type == "mac":
subprocess.check_output('/bin/bash -c ./mac_wordwise.sh', shell=True).decode('utf-8')
cmdgui = '"setxkbmap -option;xkbcomp -w0 -I$HOME/.xkb ~/.xkb/keymap/kbd.mac.gui $DISPLAY"'
elif system_type == "mac_only":
subprocess.check_output('/bin/bash -c ./mac_only.sh', shell=True).decode('utf-8')
cmdgui = '"setxkbmap -option;xkbcomp -w0 -I$HOME/.xkb ~/.xkb/keymap/kbd.mac.gui $DISPLAY"'
elif system_type == "chromebook":
subprocess.check_output('/bin/bash -c ./chromebook.sh', shell=True).decode('utf-8')
cmdgui = '"setxkbmap -option;xkbcomp -w0 -I$HOME/.xkb ~/.xkb/keymap/kbd.chromebook.gui $DISPLAY"'
# password = getpass("Please enter your password to complete the keyswap: ")
# proc = Popen("echo '1' | sudo tee -a /sys/module/hid_apple/parameters/swap_opt_cmd".split(), stdin=PIPE, stdout=PIPE, stderr=PIPE)
# proc.communicate(password.encode())
if swap_behavior == 1:
print("Setting up " + system_type + " keyswap as a service.")
print("You can disable and remove the service by using the following command in the Kinto directory.")
print("./uninstall.sh")
keyswapcmd = '/bin/bash -c "./keyswap_service.sh 1 0 ' + system_type + ' ' + str(internalid).strip() + ' ' + str(usbid).strip() + ' ' + str(chromeswap) + '"'
# print(keyswapcmd)
subprocess.check_output(keyswapcmd, shell=True).decode('utf-8')
else:
print("Setting up " + system_type + " keyswap inside your profiles ~/.Xsession file.")
print("You can modify or remove the file if you want you want to remove the modification.")
keyswapcmd = '/bin/bash -c \'./keyswap_service.sh 0 ' + cmdgui + '\''
subprocess.check_output(keyswapcmd, shell=True).decode('utf-8')
if system_type == "mac":
print()
print("An Apple keyboard with the hid_apple driver was detected.")
print("Please run the following commands to swap alt/option and Command.")
print("Your Kinto keymapping will not work right on Apple keyboards without it.")
print()
print("echo '1' | sudo tee -a /sys/module/hid_apple/parameters/swap_opt_cmd")
print('echo "options hid_apple swap_opt_cmd=1" | sudo tee -a /etc/modprobe.d/hid_apple.conf')
print('sudo update-initramfs -u -k all')
def os_detect():
print()
print("Checking for OS and system information...")
print()
print("OS Type")
# print(" Platform: " + platform_name)
if platform_name == 'Linux':
result = subprocess.check_output("lsb_release -a | grep -v LSB ", shell=True).decode('ascii')
print(result)
def hwinfo():
print("Requires user password to display hardware information...")
result = subprocess.check_output('sudo dmidecode | grep -A 9 "System Information" | grep -v "UUID\|Serial\|SKU\|Wake"', shell=True).decode('ascii')
print(result)
def kblist():
result = subprocess.check_output('xinput list', shell=True).decode('ascii')
print(result)
print()
print()
print(" Kint" + circleo)
sys.stdout.write(reset)
print(italic + " - F!x the d" + syma + "mn k" + syme + "yb" + circleo + syma + "rd. - ")
sys.stdout.write(reset)
print()
input("Press Enter to begin...")
system_type = input("\nWhat type of keyboard are you using? (If Mac and Windows then select Mac)\n\
1) Windows\n\
2) Chromebook\n\
3) Mac\n")
swap_behavior = 1
chromeswap = 0
# Chromebook
if system_type == "2":
if not input("\nWould you like to swap Alt to Super/Win and Search key to Ctrl when using terminal applications? (y/n)\n\
Note: For a more mac like experience & less issues with terminal based interactions y is recommended.\n").lower().strip()[:1] == "y":
swap_behavior = 0
# Windows
if system_type == "1":
if not input("\nWould you like to swap Alt to Super/Win and Ctrl key back to Ctrl when using terminal applications? (y/n)\n\
Note: For a more mac like experience & less issues with terminal based interactions y is recommended.\n").lower().strip()[:1] == "y":
swap_behavior = 0
# Mac
if system_type == "3":
if not input("\nWould you like to swap Command back to Super/Win and Ctrl key back to Ctrl when using terminal applications? (y/n)\n\
Note: For a more mac like experience & less issues with terminal based interactions y is recommended.\n").lower().strip()[:1] == "y":
swap_behavior = 0
if int(system_type) == 2 and swap_behavior == 1:
chromeswap = input("\nIf the keyswap is applied on a chromebook with both an internal and external Apple keyboard\n\
you may need to press a key on the external Apple keyboard any time you switch between the terminal and gui based apps.\n\
Are you ok with that, or would you like to only apply the keyswap on one keyboard type?\n\
1) Built-in\n\
2) Both - (Chromebook & Windows)\n\
3) Both - (Chromebook & Mac)\n\
4) USB External - (Mac)\n")
if chromeswap == "1":
chromeswap = "none"
elif chromeswap == "2":
chromeswap = "both_win"
elif chromeswap == "3" or chromeswap == "4":
chromeswap = "both_mac"
keyboard_detect()

View File

@@ -1,15 +0,0 @@
#!/bin/bash
mkdir -p ~/.xkb/{keymap,symbols,types}
cp ./.xkb/symbols/mac_gui ~/.xkb/symbols/mac_gui
cp ./.xkb/types/mac_gui ~/.xkb/types/mac_gui
setxkbmap -option
setxkbmap -print > ~/.xkb/keymap/kbd.mac.gui
setxkbmap -print > ~/.xkb/keymap/kbd.mac.term
line=$(cat ~/.xkb/keymap/kbd.mac.gui | grep -n 'xkb_symbols' | cut -f1 -d:)
sed -ie "${line}s/\"/+ctrl(swap_lwin_lctl)+ctrl(swap_rwin_rctl)+mac_gui(mac_levelssym)\"/2" ~/.xkb/keymap/kbd.mac.gui
sleep 1
line=$(cat ~/.xkb/keymap/kbd.mac.gui | grep -n 'xkb_types' | cut -f1 -d:)
sed -ie "${line}s/\"/+mac_gui(addmac_levels)\"/2" ~/.xkb/keymap/kbd.mac.gui
sleep 1
line=$(cat ~/.xkb/keymap/kbd.mac.term | grep -n 'xkb_symbols' | cut -f1 -d:)
sed -ie "${line}s/\"/+altwin(alt_super_win)+mac_term(mac_levelssym)\"/2" ~/.xkb/keymap/kbd.mac.term

View File

@@ -1,15 +0,0 @@
#!/bin/bash
mkdir -p ~/.xkb/{keymap,symbols,types}
cp ./.xkb/symbols/mac_gui ~/.xkb/symbols/mac_gui
cp ./.xkb/types/mac_gui ~/.xkb/types/mac_gui
setxkbmap -option
setxkbmap -print > ~/.xkb/keymap/kbd.mac.gui
setxkbmap -print > ~/.xkb/keymap/kbd.mac.term
line=$(cat ~/.xkb/keymap/kbd.mac.gui | grep -n 'xkb_symbols' | cut -f1 -d:)
sed -ie "${line}s/\"/+altwin(ctrl_alt_win)+mac_gui(mac_levelssym)\"/2" ~/.xkb/keymap/kbd.mac.gui
sleep 1
line=$(cat ~/.xkb/keymap/kbd.mac.gui | grep -n 'xkb_types' | cut -f1 -d:)
sed -ie "${line}s/\"/+mac_gui(addmac_levels)\"/2" ~/.xkb/keymap/kbd.mac.gui
sleep 1
line=$(cat ~/.xkb/keymap/kbd.mac.term | grep -n 'xkb_symbols' | cut -f1 -d:)
sed -ie "${line}s/\"/+altwin(swap_alt_win)+mac_term(mac_levelssym)\"/2" ~/.xkb/keymap/kbd.mac.term

View File

@@ -1,9 +0,0 @@
#!/bin/bash
systemctl --user stop keyswap
systemctl --user disable keyswap
rm -rf ~/.config/autostart/keyswap.sh
rm -rf ~/.config/xactive.sh
rm -rf ~/.xkb
sed -i '/xkb/d' ~/.Xsession

View File

@@ -1,316 +0,0 @@
# pip3 install pynput
# pip3 install --no-deps pynput
from pynput.keyboard import Key, Listener
import sys, subprocess
uitype=sys.argv[1]
apply_rules=sys.argv[2]
windows=sys.argv[3]
chromebook=sys.argv[4]
mac=sys.argv[5]
class color:
PURPLE = '\033[95m'
CYAN = '\033[96m'
DARKCYAN = '\033[36m'
BLUE = '\033[94m'
GREEN = '\033[92m'
YELLOW = '\033[93m'
RED = '\033[91m'
BOLD = '\033[1m'
UNDERLINE = '\033[4m'
END = '\033[0m'
def on_press(key):
print('{0} pressed'.format(key))
def on_release(key):
# print('{0} release'.format(key))
if key == Key.esc:
# Stop listener
return False
def is_ctrl_winchrome(key):
if key == Key.ctrl:
# print(str(key).replace("Key.", "").title() +' successfully mapped to physical Alt key.'.format(key))
print(color.GREEN + 'Success' + color.END + ' Alt is now Ctrl')
return False
elif key == Key.esc:
return False
else:
print('keymap failure, ' + str(key).replace("Key.", "").title() + ' may have been mapped to the physical Alt key.'.format(key))
return False
def is_ctrl_mac(key):
if key == Key.ctrl:
# print(str(key).replace("Key.", "").title() +' successfully mapped to physical Alt key.'.format(key))
print(color.GREEN + 'Success' + color.END + ' Command is now Ctrl')
return False
elif key == Key.esc:
return False
else:
print('keymap failure, ' + str(key).replace("Key.", "").title() + ' may have been mapped to the physical Command key.'.format(key))
return False
def is_ctrl_terminal(key):
if key == Key.ctrl:
# print(str(key).replace("Key.", "").title() +' successfully mapped to physical Ctrl key.'.format(key))
print(color.GREEN + 'Success' + color.END + ' Ctrl remains Ctrl,\nwhile in terminal apps.')
return False
elif key == Key.esc:
return False
else:
print('keymap failure, ' + str(key).replace("Key.", "").title() + ' may have been mapped to the physical Ctrl key.'.format(key))
return False
def is_alt_chromebook(key):
if key == Key.alt:
# print(str(key).replace("Key.", "").title() +' successfully mapped to the physical Ctrl key.'.format(key))
print(color.GREEN + 'Success' + color.END + ' Ctrl is now Alt')
return False
elif key == Key.esc:
return False
else:
print('keymap failure, ' + str(key).replace("Key.", "").title() + ' may have been mapped to the physical Ctrl key.'.format(key))
return False
def is_alt_windows(key):
if key == Key.alt:
# print(str(key).replace("Key.", "").title() +' successfully mapped to the physical Ctrl key.'.format(key))
print(color.GREEN + 'Success' + color.END + ' Win/Super is now Alt')
return False
elif key == Key.esc:
return False
else:
print('keymap failure, ' + str(key).replace("Key.", "").title() + ' may have been mapped to the physical Win/Super key.'.format(key))
return False
def is_alt_mac(key):
if key == Key.alt:
# print(str(key).replace("Key.", "").title() +' successfully mapped to the physical Ctrl key.'.format(key))
print(color.GREEN + 'Success' + color.END + ' Alt remains Alt')
return False
elif key == Key.esc:
return False
else:
print('keymap failure, ' + str(key).replace("Key.", "").title() + ' may have been mapped to the physical Alt key.'.format(key))
return False
def is_alt_chromebook_terminal(key):
if key == Key.alt:
# print(str(key).replace("Key.", "").title() +' successfully mapped to the physical Search key.'.format(key))
print(color.GREEN + 'Success' + color.END + ' Search is now Alt,\nwhile in terminals apps.')
return False
elif key == Key.esc:
return False
else:
print('keymap failure, ' + str(key).replace("Key.", "").title() + ' may have been mapped to the physical Search key.'.format(key))
return False
def is_super_winmac(key):
if key == Key.cmd:
# print('Super/Win successfully mapped to the physical Search key.'.format(key))
print(color.GREEN + 'Success' + color.END + ' Ctrl key is Super/Win')
return False
elif key == Key.esc:
return False
else:
print('keymap failure, ' + str(key).replace("Key.", "").title() + ' may have been mapped to the physical Ctrl key.'.format(key))
return False
def is_super_chromebook(key):
if key == Key.cmd:
# print('Super/Win successfully mapped to the physical Search key.'.format(key))
print(color.GREEN + 'Success' + color.END + ' Search key is Super/Win')
return False
elif key == Key.esc:
return False
else:
print('keymap failure, ' + str(key).replace("Key.", "").title() + ' may have been mapped to the physical Search key.'.format(key))
return False
def is_super_terminal(key):
if key == Key.cmd:
# print('Super/Win successfully mapped to the physical Alt key.'.format(key))
print(color.GREEN + 'Success' + color.END + ' Alt is now Super/Win,\nwhile in terminal apps.')
return False
elif key == Key.esc:
return False
else:
print('keymap failure, ' + str(key).replace("Key.", "").title() + ' may have been mapped to the physical Alt key.'.format(key))
return False
def is_super_mac_terminal(key):
if key == Key.cmd:
# print('Super/Win successfully mapped to the physical Alt key.'.format(key))
print(color.GREEN + 'Success' + color.END + ' Command is now Super/Win,\nwhile in terminal apps.')
return False
elif key == Key.esc:
return False
else:
print('keymap failure, ' + str(key).replace("Key.", "").title() + ' may have been mapped to the physical Command key.'.format(key))
return False
def chromebook_keys_gui():
print()
print(color.UNDERLINE + color.YELLOW + "Press the physical Alt" + color.END + " key to confirm the new keymapping to Ctrl..")
with Listener(
# on_press=on_press,
on_release=is_ctrl_winchrome) as listener:
listener.join()
print()
print(color.UNDERLINE + color.YELLOW + "Press the physical Ctrl" + color.END + " key to confirm the new keymapping to Alt..")
with Listener(
# on_press=on_press,
on_release=is_alt_chromebook) as listener:
listener.join()
print()
print(color.UNDERLINE + color.YELLOW + "Press the physical Search" + color.END + " key to confirm the new keymapping to Super/Win..")
with Listener(
# on_press=on_press,
on_release=is_super_chromebook) as listener:
listener.join()
def chromebook_keys_terminal():
print()
print(color.UNDERLINE + color.YELLOW + "Press the physical Alt" + color.END + " key to confirm the new keymapping to Super/Win..")
with Listener(
# on_press=on_press,
on_release=is_super_terminal) as listener:
listener.join()
print()
print(color.UNDERLINE + color.YELLOW + "Press the physical Ctrl" + color.END + " key to confirm the new keymapping to Ctrl..")
with Listener(
# on_press=on_press,
on_release=is_ctrl_terminal) as listener:
listener.join()
print()
print(color.UNDERLINE + color.YELLOW + "Press the physical Search" + color.END + " key to confirm the new keymapping to Alt..")
with Listener(
# on_press=on_press,
on_release=is_alt_chromebook_terminal) as listener:
listener.join()
def windows_keys_gui():
print()
print(color.UNDERLINE + color.YELLOW + "Press the physical Alt" + color.END + " key to confirm the new keymapping to Ctrl..")
with Listener(
# on_press=on_press,
on_release=is_ctrl_winchrome) as listener:
listener.join()
print()
print(color.UNDERLINE + color.YELLOW + "Press the physical Win/Super" + color.END + " key to confirm the new keymapping to Alt..")
with Listener(
# on_press=on_press,
on_release=is_alt_windows) as listener:
listener.join()
print()
print(color.UNDERLINE + color.YELLOW + "Press the physical Ctrl" + color.END + " key to confirm the new keymapping to Win/Super..")
with Listener(
# on_press=on_press,
on_release=is_super_winmac) as listener:
listener.join()
def windows_keys_terminal():
print()
print(color.UNDERLINE + color.YELLOW + "Press the physical Alt" + color.END + " key to confirm the new keymapping to Super/Win..")
with Listener(
# on_press=on_press,
on_release=is_super_terminal) as listener:
listener.join()
print()
print(color.UNDERLINE + color.YELLOW + "Press the physical Win/Super" + color.END + " key to confirm the new keymapping to Alt..")
with Listener(
# on_press=on_press,
on_release=is_alt_windows) as listener:
listener.join()
print()
print(color.UNDERLINE + color.YELLOW + "Press the physical Ctrl" + color.END + " key to confirm the new keymapping to Ctrl..")
with Listener(
# on_press=on_press,
on_release=is_ctrl_terminal) as listener:
listener.join()
def mac_keys_gui():
print()
print(color.UNDERLINE + color.YELLOW + "Press the physical Command" + color.END + " key to confirm the new keymapping to Ctrl..")
with Listener(
# on_press=on_press,
on_release=is_ctrl_mac) as listener:
listener.join()
print()
print(color.UNDERLINE + color.YELLOW + "Press the physical Alt" + color.END + " key to confirm it remains Alt..")
with Listener(
# on_press=on_press,
on_release=is_alt_mac) as listener:
listener.join()
print()
print(color.UNDERLINE + color.YELLOW + "Press the physical Ctrl" + color.END + " key to confirm the new keymapping to Win/Super..")
with Listener(
# on_press=on_press,
on_release=is_super_winmac) as listener:
listener.join()
def mac_keys_terminal():
print()
print(color.UNDERLINE + color.YELLOW + "Press the physical Command" + color.END + " key to confirm the new keymapping to Super/Win..")
with Listener(
# on_press=on_press,
on_release=is_super_mac_terminal) as listener:
listener.join()
print()
print(color.UNDERLINE + color.YELLOW + "Press the physical Alt" + color.END + " key to confirm it remains Alt..")
with Listener(
# on_press=on_press,
on_release=is_alt_mac) as listener:
listener.join()
print()
print(color.UNDERLINE + color.YELLOW + "Press the physical Ctrl" + color.END + " key to confirm it remains Ctrl..")
with Listener(
# on_press=on_press,
on_release=is_ctrl_terminal) as listener:
listener.join()
if uitype == 'gui':
if chromebook == '1':
if apply_rules == '1':
subprocess.check_output('setxkbmap -option;xkbcomp -w0 -I$HOME/.xkb ~/.xkb/keymap/kbd.chromebook.gui $DISPLAY', shell=True).decode('utf-8')
print()
print("Testing chromebook - GUI apps - Kinto keymapping...")
chromebook_keys_gui()
if windows == '1':
if apply_rules == '1':
subprocess.check_output('setxkbmap -option;xkbcomp -w0 -I$HOME/.xkb ~/.xkb/keymap/kbd.mac.gui $DISPLAY', shell=True).decode('utf-8')
print()
print ("Testing windows keyboard - GUI apps - Kinto keymapping...")
windows_keys_gui()
if mac == '1':
if apply_rules == '1':
subprocess.check_output('setxkbmap -option;xkbcomp -w0 -I$HOME/.xkb ~/.xkb/keymap/kbd.mac.gui $DISPLAY', shell=True).decode('utf-8')
print ("Testing mac keyboard - GUI apps - Kinto keymapping...")
mac_keys_gui()
if uitype == 'term':
if chromebook == '1':
if apply_rules == '1':
subprocess.check_output('setxkbmap -option;setxkbmap -option altwin:swap_lalt_lwin', shell=True).decode('utf-8')
print("Testing chromebook - terminal - Kinto keymapping...")
chromebook_keys_terminal()
if windows == '1':
if apply_rules == '1':
subprocess.check_output('setxkbmap -option;setxkbmap -option altwin:swap_alt_win', shell=True).decode('utf-8')
print ("Testing windows keyboard - terminal - Kinto keymapping...")
windows_keys_terminal()
if mac == '1':
if apply_rules == '1':
subprocess.check_output('setxkbmap -option;setxkbmap -option altwin:swap_alt_win', shell=True).decode('utf-8')
print ("Testing mac keyboard - terminal - Kinto keymapping...")
mac_keys_terminal()
if apply_rules == '1':
subprocess.run('setxkbmap -option', shell=True)

View File

@@ -1,75 +0,0 @@
# GalliumOS Notes
xfconf-query -c xfce4-keyboard-shortcuts -lv | grep "show_desktop_key\|cycle_windows_key\|cycle_reverse_windows_key\|close_window_key\|maximize_window_key\|xfce4-popup-whiskermenu\|move_window_next_workspace_key\|move_window_prev_workspace_key\|hide" | grep -v "default\|<Alt>m"
# Show Desktop
xfconf-query --channel xfce4-keyboard-shortcuts --property "/xfwm4/custom/<Super>d" --create --type string --set "show_desktop_key"
# Undo show desktop
xfconf-query --channel xfce4-keyboard-shortcuts --property "/xfwm4/custom/<Super>d" --reset
# GUI Alt Tab - Window Switching
xfconf-query --channel xfce4-keyboard-shortcuts --property "/xfwm4/custom/<Alt><Shift>Tab" --set "cycle_reverse_windows_key"
xfconf-query --channel xfce4-keyboard-shortcuts --property "/xfwm4/custom/<Alt>Tab" --set "cycle_windows_key"
# Term Alt Tab - Window Switching
xfconf-query --channel xfce4-keyboard-shortcuts --property "/xfwm4/custom/<Alt><Shift>Tab" --set "cycle_windows_key"
xfconf-query --channel xfce4-keyboard-shortcuts --property "/xfwm4/custom/<Alt>Tab" --set "cycle_reverse_windows_key"
# Hide/minimize Window
xfconf-query --channel xfce4-keyboard-shortcuts --property "/xfwm4/custom/<Super>h" --create --type string --set "hide_window_key"
# Spotlight
xfconf-query --channel xfce4-keyboard-shortcuts --property "/commands/custom/<Primary><Shift>space" --create --type string --set "xfce4-popup-whiskermenu"
# Change workspace to left
xfconf-query --channel xfce4-keyboard-shortcuts --property "/xfwm4/custom/<Super>Left" --create --type string --set "move_window_prev_workspace_key"
# Change workspace to right
xfconf-query --channel xfce4-keyboard-shortcuts --property "/xfwm4/custom/<Super>Right" --create --type string --set "move_window_next_workspace_key"
# PopOS
# Close App Alt+F4 (Super+w)
gsettings set org.gnome.desktop.wm.keybindings close "['<Alt>F4','<Super>w']"
# Undo
gsettings set org.gnome.desktop.wm.keybindings close "['<Super>w']"
# Maximize Window
gsettings set org.gnome.desktop.wm.keybindings toggle-maximized "['<Alt>F10','<Primary><Super>Up']"
# Undo
gsettings set org.gnome.desktop.wm.keybindings toggle-maximized "['<Primary><Super>Up']"
# Ubuntu 19.10
# Change Workspace
gsettings set org.gnome.desktop.wm.keybindings switch-to-workspace-left "['<Primary><Alt>Left','<Super>Left']"
gsettings set org.gnome.desktop.wm.keybindings switch-to-workspace-right "['<Primary><Alt>Right','<Super>Right']"
# ElementaryOS
# Show Desktop
gsettings set org.gnome.desktop.wm.keybindings show-desktop "['<Super>d','<Super>Down']"
# Maximize Window
gsettings set org.gnome.desktop.wm.keybindings toggle-maximized "['<Alt>F10','<Super>Up']"
# Spotlight
gsettings set org.gnome.desktop.wm.keybindings panel-main-menu "['<Control><Shift>Space','<Super>Space']"
# Fedora 31
# Show Desktop
gsettings set org.gnome.desktop.wm.keybindings show-desktop "['<Super>d']"
# Change Workspace
gsettings set org.gnome.desktop.wm.keybindings switch-to-workspace-left "['<Primary><Alt>Left','<Super>Left']"
gsettings set org.gnome.desktop.wm.keybindings switch-to-workspace-right "['<Primary><Alt>Right','<Super>Right']"
# Manjaro/Arch KDE
# Maximize
kwriteconfig5 --file "$HOME/.config/kglobalshortcutsrc" --group "kwin" \
--key "Maximize Window" "Alt+F10,Meta+PgUp,Maximize Window"
# Minimize
kwriteconfig5 --file "$HOME/.config/kglobalshortcutsrc" --group "kwin" \
--key "Minimize Window" "Meta+h,Meta+PgDown,Minimize Window"
# Switch Desktops
kwriteconfig5 --file "$HOME/.config/kglobalshortcutsrc" --group "kwin" \
--key "Switch to Next Desktop" "Meta+Right,Meta+Right,Switch to Next Desktop"
kwriteconfig5 --file "$HOME/.config/kglobalshortcutsrc" --group "kwin" \
--key "Switch to Previous Desktop" "Meta+Left,Meta+Left,Switch to Previous Desktop"
kquitapp5 kglobalaccel && sleep 2s && kglobalaccel5 &

File diff suppressed because it is too large Load Diff

611
setup.py
View File

@@ -1,62 +1,91 @@
#!/usr/bin/env python3
import json, time, os, sys, subprocess, shlex
import json, time, os, sys, subprocess, shlex, platform,argparse
from shutil import copyfile
from subprocess import PIPE, Popen
from prekinto import *
parser = argparse.ArgumentParser()
parser.add_argument('-r', dest='uninstall', action='store_true', help="uninstall kinto")
parser.add_argument('--remove', dest='uninstall', action='store_true', help="uninstall kinto")
args = parser.parse_args()
homedir = os.path.expanduser("~")
kintotype = 0
def windows_setup():
keymaps = ["Apple keyboard standard", "Windows keyboard standard","Uninstall"]
keymaps = ["Apple keyboard standard", "Windows keyboard standard","Chromebook","IBM - No Super/Win","Uninstall"]
for index, item in enumerate(keymaps):
print(" %i. %s" % (index+1, item.capitalize()))
print(" %i. %s" % (index+1, item))
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("")
# Short DOS path notation
path= cmdline('echo %cd%')[:-1]
print("Copying autohotkey combinations for Terminals & Editors...")
os.system("copy /Y " + path + "\\windows\\kinto.ahk " + path + "\\windows\\kinto-new.ahk")
if default == 1:
os.system('perl -pi -e "s/(; )(.*)(; MacModifiers)/$2$3/g" ./windows/kinto-new.ahk')
# os.system("regedit " + path + "\\windows\\macbook_winctrl_swap.reg")
elif default == 2:
os.system('perl -pi -e "s/(; )(.*)(; WinModifiers)/$2$3/g" ./windows/kinto-new.ahk')
# os.system("regedit " + path + "\\windows\\standard_ctrlalt_swap.reg")
elif default == 3:
os.system("regedit " + path + "\\windows\\remove_keyswap.reg")
os.system("del /f .\\windows\\kinto-new.ahk")
os.system("del \"C:\\ProgramData\\Microsoft\\Windows\\Start Menu\\Programs\\StartUp\\kinto.ahk\"")
os.system("taskkill /IM autohotkey.exe")
os.system('rd /s /q %userprofile%\\.kinto')
os.system('del "%userprofile%\\AppData\\Roaming\\Microsoft\\Windows\\STARTM~1\\Programs\\Startup\\kinto-start.vbs"')
stvscode = yn_choice(bcolors.CYELLOW2 + "Would you like to use Sublime Text 3 keymaps in VS Code?\n" + bcolors.ENDC)
if default > 0 and default < 3:
path= cmdline('echo ''%cd%''')[:-1]
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("Copying autohotkey combinations for Terminals & Editors...")
os.system('copy /Y "' + path + '\\windows\\kinto.ahk" "' + homedir + '\\kinto-new.ahk"')
if default < 3:
os.system('C:\\Strawberry\\perl\\bin\\perl.exe -pi -e "s/(; )(.*)(; Default)(?!( - ST2CODE))(.*)/$2$3$5/gm" ' + homedir + '\\kinto-new.ahk')
if default == 1:
kbtype = "mac"
os.system('C:\\Strawberry\\perl\\bin\\perl.exe -pi -e "s/(; )(.*)(; MacModifiers)/$2$3/gm" ' + homedir + '\\kinto-new.ahk')
elif default == 2:
kbtype = "win"
os.system('C:\\Strawberry\\perl\\bin\\perl.exe -pi -e "s/(; )(.*)(; WinModifiers)/$2$3/gm" ' + homedir + '\\kinto-new.ahk')
elif default == 5:
print("Removing any old registry keys from prior versions...")
p = subprocess.Popen(['powershell.exe', "Remove-ItemProperty -Path HKLM:'SYSTEM\CurrentControlSet\Control\Keyboard Layout' -Name 'Scancode Map' -ErrorAction SilentlyContinue"], stdout=sys.stdout)
print("Removing Kinto from Startup folder...")
os.system("(del \"C:\\ProgramData\\Microsoft\\Windows\\Start Menu\\Programs\\StartUp\\kinto.ahk\") 2> nul")
os.system('(del "%userprofile%\\AppData\\Roaming\\Microsoft\\Windows\\STARTM~1\\Programs\\Startup\\kinto-start.vbs") 2> nul')
print("Ending any running Kinto tasks...")
os.system("(taskkill /IM autohotkey.exe) 2> nul")
print("Removing Kinto from users profile directory...")
os.system('(rd /s /q "%userprofile%\\.kinto") 2> nul')
print("")
print("Uninstall of Kinto is Complete.")
if default == 3:
kbtype = "chrome"
os.system('C:\\Strawberry\\perl\\bin\\perl.exe -pi -e "s/(; )(.*)(; Chromebook)/$2$3/gm" ' + homedir + '\\kinto-new.ahk')
os.system('C:\\Strawberry\\perl\\bin\\perl.exe -pi -e "s/(; )(.*)(; WinModifiers\/CB)/$2$3/gm" ' + homedir + '\\kinto-new.ahk')
if default == 3 or default == 4:
os.system('C:\\Strawberry\\perl\\bin\\perl.exe -pi -e "s/(; )(.*)(; CB\/IBM)/$2$3/gm" ' + homedir + '\\kinto-new.ahk')
os.system('C:\\Strawberry\\perl\\bin\\perl.exe -pi -e "s/(; )(.*)(; WinModifiers\/CB\/IBM)/$2$3/gm" ' + homedir + '\\kinto-new.ahk')
if default == 4:
kbtype = "ibm"
os.system('C:\\Strawberry\\perl\\bin\\perl.exe -pi -e "s/(; )(.*)(; IBM)/$2$3/gm" ' + homedir + '\\kinto-new.ahk')
if default > 0 and default < 5:
stvscode = yn_choice(bcolors.CYELLOW2 + "Would you like to use Sublime Text 3 keymaps in VS Code?\n" + bcolors.ENDC)
print("\nWill now install Ubuntu Terminal Theme as default...")
os.system("regedit " + path + "\\windows\\theme_ubuntu.reg")
if(stvscode):
os.system('perl -pi -e "s/(; )(.*)(; ST2CODE)/$2$3/g" ./windows/kinto-new.ahk')
os.system('copy /Y ' + path + '\\windows\\kinto-start.vbs "%userprofile%\\.kinto\\kinto-start.vbs"')
os.system('copy /Y ' + path + '\\windows\\usb.vbs "%userprofile%\\.kinto\\usb.vbs"')
os.system('copy /Y ' + path + '\\windows\\usb.vbs "%userprofile%\\.kinto\\detectUSB.vbs"')
os.system('mklink "%userprofile%\\Start Menu\\Programs\\Startup\\kinto-start.vbs" "%userprofile%\\.kinto\\kinto-start.vbs"')
os.system('cp '+ path + '\\windows\\NoShell.vbs "%userprofile%\\.kinto\\NoShell.vbs"')
os.system('cp '+ path + '\\windows\\toggle_kb.bat "%userprofile%\\.kinto\\toggle_kb.bat"')
os.system('cp '+ path + '\\windows\\kinto-new.ahk "%userprofile%\\.kinto\\kinto.ahk"')
os.system('robocopy '+ path + '\\assets "%userprofile%\\.kinto\\assets" /E')
os.system("del /f .\\windows\\kinto-new.ahk")
os.system("del \"C:\\ProgramData\\Microsoft\\Windows\\Start Menu\\Programs\\StartUp\\kinto.ahk\"")
os.system("%userprofile%\\AppData\\Roaming\\Microsoft\\Windows\\STARTM~1\\Programs\\Startup\\kinto-start.vbs")
os.system('regedit "' + path + '\\windows\\theme_ubuntu.reg"')
os.system('robocopy "'+ path + '\\assets" "%userprofile%\\.kinto\\assets" /E')
if (stvscode and (default > 0 or default < 3)):
os.system('C:\\Strawberry\\perl\\bin\\perl.exe -pi -e "s/(; )(.*)(; Default - ST2CODE)/$2$3/gm" ' + homedir + '\\kinto-new.ahk')
elif (stvscode and (default == 3 or default == 4 )):
os.system('C:\\Strawberry\\perl\\bin\\perl.exe -pi -e "s/(; )(.*)(; CB/IBM - ST2CODE)/$2$3/gm" ' + homedir + '\\kinto-new.ahk')
os.system('copy /Y "' + path + '\\windows\\kinto-start.vbs" "%userprofile%\\.kinto\\kinto-start.vbs"')
os.system('C:\\Strawberry\\perl\\bin\\perl.exe -pi -e "s/{kbtype}/' + kbtype + '/gm" "%userprofile%\\.kinto\\kinto-start.vbs"')
os.system('copy /Y "' + path + '\\windows\\usb.vbs" "%userprofile%\\.kinto\\usb.vbs"')
os.system('copy /Y "' + path + '\\windows\\detectUSB.ahk" "%userprofile%\\.kinto\\detectUSB.ahk"')
os.system('mklink "%userprofile%\\AppData\\Roaming\\Microsoft\\Windows\\STARTM~1\\Programs\\Startup\\kinto-start.vbs" "%userprofile%\\.kinto\\kinto-start.vbs"')
os.system('copy /Y "'+ path + '\\windows\\NoShell.vbs" "%userprofile%\\.kinto\\NoShell.vbs"')
os.system('copy /Y "'+ path + '\\windows\\toggle_kb.bat" "%userprofile%\\.kinto\\toggle_kb.bat"')
os.system('copy /Y "'+ homedir + '\\kinto-new.ahk" "%userprofile%\\.kinto\\kinto.ahk"')
os.system("del /f " + homedir + "\\kinto-new.ahk")
os.system("del \"C:\\ProgramData\\Microsoft\\Windows\\Start Menu\\Programs\\StartUp\\kinto.ahk\" 2> nul")
userpath = cmdline('cmd /c for %A in ("%userprofile%") do @echo %~sA')[:-1]
print('Starting... "' + userpath + '\\AppData\\Roaming\\Microsoft\\Windows\\STARTM~1\\Programs\\Startup\\kinto-start.vbs"')
os.system('"' + userpath + '\\AppData\\Roaming\\Microsoft\\Windows\\STARTM~1\\Programs\\Startup\\kinto-start.vbs"')
# # print("\nPlease log off and back on for changes to take full effect.")
print("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\"")
os.system("(del \"C:\\ProgramData\\Microsoft\\Windows\\Start Menu\\Programs\\StartUp\\kinto.ahk\") 2> nul")
def cmdline(command):
process = Popen(
@@ -67,7 +96,11 @@ def cmdline(command):
)
return process.communicate()[0]
# check_x11 = cmdline("env | grep -i x11").strip()
if platform.system() == 'Windows':
print("\nYou are detected as running Windows.")
windows_setup()
sys.exit()
check_x11 = cmdline("(env | grep -i x11 || loginctl show-session \"$XDG_SESSION_ID\" -p Type) | awk -F= '{print $2}'").strip()
if len(check_x11) == 0:
@@ -80,515 +113,27 @@ if len(check_x11) == 0:
sys.exit()
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("./linux/system-config/dename.sh").replace('"','').strip().split(" ")[0].lower()
run_pkg = ""
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("sudo " + pkgm + " " + run_pkg + "\n")
run_install = yn_choice(bcolors.CYELLOW2 + "Would you like to run it now? (Will require sudo privileges.)\n" + bcolors.ENDC)
if(run_install):
os.system("sudo " + pkgm + run_pkg)
print("\n")
def install_ibus():
global distro
print(bcolors.CYELLOW2 + "You need to set IBus as the default Input Method for full word-wise support and re-run this installer.\n" + bcolors.ENDC)
print(bcolors.CYELLOW2 + "Confirm the IBus Setup by saying Yes and then closing the window.\n" + bcolors.ENDC)
print("ibus-setup\n")
print("im-config -n ibus or im-chooser\n")
run_install = yn_choice(bcolors.CYELLOW2 + "Would you like to run it now? (Will require logoff and logon.)\n" + bcolors.ENDC)
if(run_install):
if distro=="fedora":
os.system("ibus-setup")
os.system("im-chooser")
print("\n")
print("IBus needs to have Input Method set to your language.")
print("im-chooser needs IBus to be selected & closed.")
input("Will need to log off and back on for it take effect...")
else:
os.system("ibus-setup")
os.system("im-config -n ibus")
print("\n")
input("IBus has been set as the default Input Method.\nPress any key to exit and re-run after logoff & logon...")
sys.exit()
def setShortcuts():
global distro
distroVersion = cmdline("awk -F= '$1==\"VERSION_ID\" { print $2 ;}' /etc/os-release").replace('"','').strip()
print("\nIf Kinto is already running it will be stopped...")
print("If you cancel the installer you can re-run Kinto via\n systemctl --user start keyswap")
cmdline("systemctl --user stop keyswap")
print("\nDetected " + distro + " " + distroVersion.strip() + " DE: " + dename + "\n")
addhotkeys = yn_choice("\nDo you want to apply system level shortcuts?")
if(addhotkeys):
distro = distro.lower()
if dename == "gnome" or dename == "mate" or dename == "budgie":
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')
if(kintotype == 1):
cmdline("gsettings set org.gnome.desktop.wm.keybindings switch-applications \"['<Primary>Tools','<Alt>Tab']\"")
cmdline("gsettings set org.gnome.desktop.wm.keybindings switch-applications-backward \"['<Primary><Shift>Tools','<Alt><Shift>Tab']\"")
else:
cmdline("gsettings set org.gnome.desktop.wm.keybindings switch-applications \"['<Primary>F13','<Primary><Shift>F13','<Alt>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']\"")
#
# Leaving run dialog disabled for now
# Too slow on appearing, compared to the app menu
#
# if dename != "budgie":
cmdline("gsettings set org.gnome.desktop.wm.keybindings panel-main-menu \"['<Primary><Shift>Space','<Primary>Space']\"")
# else:
# cmdline("gsettings set org.gnome.desktop.wm.keybindings panel-main-menu \"['<Alt>F1']\"")
# cmdline("gsettings set org.gnome.desktop.wm.keybindings panel-run-dialog \"['<Primary><Shift>Space','<Primary>Space']\"")
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 == "ubuntu" and dename == "budgie") 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-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-right ['']")
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']\"")
elif distro == "pop!_os" and dename == "gnome":
cmdline("gsettings set org.gnome.desktop.wm.keybindings close \"['<Alt>F4','<Super>w']\"")
cmdline("gsettings set org.gnome.desktop.wm.keybindings toggle-maximized \"['<Alt>F10','<Primary><Super>Up']\"")
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 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-left ['']")
cmdline("gsettings set org.gnome.desktop.wm.keybindings switch-to-workspace-right ['']")
elif distro == "elementary" and dename == "gnome":
if(kintotype == 1):
cmdline("gsettings set org.gnome.desktop.wm.keybindings switch-applications \"['<Primary>Tools','<Alt>Tab']\"")
cmdline("gsettings set org.gnome.desktop.wm.keybindings switch-applications-backward \"['<Primary><Shift>Tools','<Alt><Shift>Tab']\"")
else:
cmdline("gsettings set org.gnome.desktop.wm.keybindings switch-applications \"['<Primary>F13','<Primary><Shift>F13','<Alt>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 show-desktop \"['<Super>d','<Super>Down']\"")
cmdline("gsettings set org.gnome.desktop.wm.keybindings toggle-maximized \"['<Alt>F10','<Super>Up']\"")
cmdline("gsettings set org.gnome.desktop.wm.keybindings panel-main-menu \"['<Control><Shift>Space','<Super>Space']\"")
cmdline("gsettings set org.gnome.desktop.wm.keybindings minimize \"['<Super>h','<Alt>F9']\"")
cmdline("gsettings set org.gnome.desktop.wm.keybindings panel-main-menu \"['<Super>Space','<Primary>Space']\"")
cmdline('perl -pi -e "s/(\/\/ )(.*)(\/\/ Elementary cmdtab)/\$2\$3/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/(\w.*)(\/\/ Default cmdtab)/\/\/ \$1\$2/g" ~/.xkb/symbols/mac_gui')
# elif distro == "budgie" and dename == "gnome":
# print("Apply budgie shortcuts here")
elif (dename == "xfce"):
print("Applying xfce shortcuts...")
cmdline('cp ~/.config/xfce4/xfconf/xfce-perchannel-xml/xfce4-keyboard-shortcuts.xml ./xfce4-keyboard-shortcuts_`date +"%Y.%m.%d-%s"`.xml')
# Reset Show desktop
cmdline('xfconf-query --channel xfce4-keyboard-shortcuts --property "/xfwm4/custom/<Primary><Alt>d" --reset')
cmdline('xfconf-query --channel xfce4-keyboard-shortcuts --property "/xfwm4/custom/<Super>d" --create --type string --set "show_desktop_key"')
# Reset App Cycle
cmdline('xfconf-query --channel xfce4-keyboard-shortcuts --property "/xfwm4/custom/<Alt>Tab" --reset')
cmdline('xfconf-query --channel xfce4-keyboard-shortcuts --property "/xfwm4/custom/<Alt><Shift>Tab" --reset')
cmdline('xfconf-query --channel xfce4-keyboard-shortcuts --property "/xfwm4/custom/<Primary>backslash" --create --type string --set "cycle_windows_key"')
cmdline('xfconf-query --channel xfce4-keyboard-shortcuts --property "/xfwm4/custom/<Primary><Shift>backslash" --create --type string --set "cycle_reverse_windows_key"')
# cmdline('xfconf-query --channel xfce4-keyboard-shortcuts --property "/xfwm4/custom/<Super>h" --create --type string --set "hide_window_key"')
# Don't need to undo other maps for menu
cmdline('xfconf-query --channel xfce4-keyboard-shortcuts --property "/commands/custom/<Primary>space" --create --type string --set "xfce4-popup-whiskermenu"')
cmdline('xfconf-query --channel xfce4-keyboard-shortcuts --property "/commands/custom/<Primary><Shift>space" --create --type string --set "xfce4-popup-whiskermenu"')
# Reset move to desktop shortcuts
cmdline('xfconf-query --channel xfce4-keyboard-shortcuts --property "/xfwm4/custom/<Primary><Alt>Home" --reset')
cmdline('xfconf-query --channel xfce4-keyboard-shortcuts --property "/xfwm4/custom/<Primary><Alt>End" --reset')
cmdline('xfconf-query --channel xfce4-keyboard-shortcuts --property "/xfwm4/custom/<Primary><Alt>Left" --reset')
cmdline('xfconf-query --channel xfce4-keyboard-shortcuts --property "/xfwm4/custom/<Primary><Alt>Right" --reset')
os.system('xfconf-query --channel xfce4-keyboard-shortcuts --property "/xfwm4/custom/<Primary><Alt>Left" --create --type string --set "move_window_prev_workspace_key"')
os.system('xfconf-query --channel xfce4-keyboard-shortcuts --property "/xfwm4/custom/<Primary><Alt>Right" --create --type string --set "move_window_next_workspace_key"')
# Reset Change Workspace
cmdline('xfconf-query --channel xfce4-keyboard-shortcuts --property "/xfwm4/custom/<Primary><Alt>Left" --reset')
cmdline('xfconf-query --channel xfce4-keyboard-shortcuts --property "/xfwm4/custom/<Primary><Alt>Right" --reset')
cmdline('xfconf-query --channel xfce4-keyboard-shortcuts --property "/xfwm4/custom/<Super>Left" --create --type string --set "left_workspace_key"')
cmdline('xfconf-query --channel xfce4-keyboard-shortcuts --property "/xfwm4/custom/<Super>Right" --create --type string --set "right_workspace_key"')
print("\nYou may need to run these commands manually to make sure they are set, if you want to move windows between desktops.\n")
print(' xfconf-query --channel xfce4-keyboard-shortcuts --property "/xfwm4/custom/<Primary><Alt>Left" --create --type string --set "move_window_prev_workspace_key"')
print(' xfconf-query --channel xfce4-keyboard-shortcuts --property "/xfwm4/custom/<Primary><Alt>Right" --create --type string --set "move_window_next_workspace_key"\n')
elif distro == "fedora" and dename == "gnome":
cmdline("gsettings set org.gnome.desktop.wm.keybindings show-desktop \"['<Super>d']\"")
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-left ['']")
cmdline("gsettings set org.gnome.desktop.wm.keybindings switch-to-workspace-right ['']")
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.mutter.keybindings toggle-tiled-right \"['<Super><Alt>Right']\"")
cmdline("gsettings set org.gnome.mutter.keybindings toggle-tiled-left \"['<Super><Alt>Left']\"")
# org.gnome.mutter.keybindings toggle-tiled-right ['<Super>Right']
# org.gnome.mutter.keybindings toggle-tiled-left ['<Super>Left']
elif dename == "kde":
# cmdline('kwriteconfig5 --file "$HOME/.config/kglobalshortcutsrc" --group "krunner.desktop" --key "_launch","Alt+Space\tAlt+F2\tSearch,Alt+Space\tAlt+F2\tSearch,KRunner"')
# Remove Alt+F3 Operations Menu - Sublimetext Select-All
cmdline('cp ~/.config/kwinrc ./kwinrc_`date +"%Y.%m.%d-%s"`')
cmdline('cp ~/.config/kglobalshortcutsrc ./kde_kglobalshortcutsrc_`date +"%Y.%m.%d-%s"`')
cmdline('kwriteconfig5 --file "$HOME/.config/kglobalshortcutsrc" --group "kwin" --key "Switch to Previous Desktop" "Meta+Left,Meta+Left,Switch to Previous Desktop"')
cmdline('kwriteconfig5 --file "$HOME/.config/kglobalshortcutsrc" --group "kwin" --key "Window Operations Menu" "none,Alt+F3,Window Operations Menu"')
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 (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:
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 Alternative" "none,none,Walk Through Windows"')
cmdline('kwriteconfig5 --file "$HOME/.config/kglobalshortcutsrc" --group "kwin" --key "Maximize Window" "none,Meta+PgUp,Maximize Window"')
cmdline('kwriteconfig5 --file "$HOME/.config/kglobalshortcutsrc" --group "kwin" --key "Window Maximize" "Meta+Ctrl+F,Alt+F10,Maximize Window"')
cmdline('kwriteconfig5 --file "$HOME/.config/kglobalshortcutsrc" --group "kwin" --key "Minimize Window" "Meta+h,Meta+PgDown,Minimize Window"')
cmdline('kwriteconfig5 --file "$HOME/.config/kglobalshortcutsrc" --group "kwin" --key "Switch to Next Desktop" "Meta+Right,Meta+Right,Switch to Next Desktop"')
os.system('kquitapp5 kglobalaccel && sleep 2s && kglobalaccel5 &')
else:
print('distro: ' + distro + ' de: ' + dename)
print(bcolors.CRED2 + "A supported OS and DE was not found, you may not have full system level shortcuts installed." + bcolors.ENDC)
print(bcolors.CRED2 + "You may want to find your DE or Window Manager settings and manually set Alt-Tab & other OS related shortcuts." + bcolors.ENDC)
if dename == "gnome":
# Apply dconf update to make updates survive reboots
cmdline('dconf dump /org/gnome/desktop/wm/keybindings/ > tempkb.conf')
cmdline('dconf dump /org/gnome/mutter/keybindings/ > tempmt.conf')
cmdline('dconf load /org/gnome/desktop/wm/keybindings/ < tempkb.conf')
cmdline('dconf load /org/gnome/mutter/keybindings/ < tempmt.conf')
cmdline('sleep 1 && rm -f ./tempkb.conf;rm -f ./tempmt.conf')
# cmdline('dconf update')
def Uninstall():
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?")
print("")
if(restore):
if dename == "gnome":
print("Restoring DE hotkeys...")
wmkeys = cmdline('ls | grep -m1 "keybinding"')
mutterkeys = cmdline('ls | grep -m1 "mutter_"')
if len(wmkeys) > 0:
print('dconf load /org/gnome/desktop/wm/keybindings/ < ' + wmkeys)
cmdline('dconf load /org/gnome/desktop/wm/keybindings/ < ' + wmkeys)
else:
print('Gnome Desktop keybindings backup not found...')
if len(mutterkeys) > 0:
print('dconf load /org/gnome/mutter/keybindings/ < ' + mutterkeys)
cmdline('dconf load /org/gnome/mutter/keybindings/ < ' + mutterkeys)
if len(wmkeys) > 0 or len(mutterkeys) > 0:
print("Gnome hotkeys have been successfully restored.")
elif dename == "kde":
print("Restoring DE hotkeys...")
kwinkeys = cmdline('ls | grep -m1 "kwinrc"').strip()
kdekeys = cmdline('ls | grep -m1 "kglobalshortcutsrc"').strip()
cmdline('cp ./' + kdekeys + ' ~/.config/kglobalshortcutsrc')
cmdline('cp ./' + kwinkeys + ' ~/.config/kwinrc')
elif dename == "xfce":
print("Restoring DE hotkeys...")
xfcekeys = cmdline('ls | grep -m1 "xfce4-keyboard"').strip()
cmdline('cp ./' + xfcekeys + ' ~/.config/xfce4/xfconf/xfce-perchannel-xml/xfce4-keyboard-shortcuts.xml')
if dename == "gnome" or dename == "kde" or dename == "xfce":
print("./uninstall.sh\n")
subprocess.check_call(shlex.split("./uninstall.sh"))
print("Done.")
if dename == "kde" or dename == "xfce":
print("Please log off and back on for your original hotkeys to take effect.")
else:
if dename == "gnome":
print("Resetting DE hotkeys...\n")
print("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")
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":
print("Resetting DE hotkeys...\n")
cmdline('mv ~/.config/kwinrc ~/.config/kwinrc.kinto')
cmdline('mv ~/.config/kglobalshortcutsrc ~/.config/kglobalshortcutsrc.kinto')
elif dename == "xfce":
print("Resetting DE hotkeys...\n")
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":
print("./uninstall.sh\n")
subprocess.check_call(shlex.split("./uninstall.sh"))
print("Done.")
if dename == "kde" or dename == "xfce":
print("Please log off and back on for your original DE hotkeys to take effect.")
def kintoImpOne():
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()
if len(pkgm) == 0:
pkgm = cmdline("which dnf 2>/dev/null").strip()
if len(pkgm) > 0:
pkgm += " check-update;sudo dnf install -y "
else:
pkgm += " install -y "
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()
runpkg = 0
global 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:
print(runpkg)
requirements(pkgm)
if not os.path.exists(homedir + '/.config/ibus/bus') and cmdline("ls ~/.config/ibus/bus -1rt") == "":
install_ibus()
try:
f = open("defaults.json")
except IOError:
print("defaults.json file is missing. Will exit.\n")
exit()
f.close()
try:
f = open("defaults.json")
except IOError:
print("defaults.json file is missing. Will exit.\n")
exit()
f.close()
try:
f = open("user_config.json")
except IOError:
print("user_config.json file is missing. Will exit.\n")
exit()
f.close()
if os.path.isdir(homedir + "/.config/kinto") == False:
os.mkdir(homedir + "/.config/kinto")
time.sleep(0.5)
with open('defaults.json') as json_file:
data = json.load(json_file)
cmdline("git fetch")
color_arr = [bcolors.CBEIGE,bcolors.CRED2,bcolors.CGREEN,bcolors.CYELLOW ]
print("\nKinto - Type in Linux like it's a Mac.\n")
kintover = cmdline('echo "$(git describe --tag --abbrev=0 | head -n 1)" "build" "$(git rev-parse --short HEAD)"')
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("")
if(kintotype == 1):
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()
print("\nKinto " + kintover + "Type in Linux like it's a Mac.\n")
if(kintotype == 3):
if args.uninstall:
subprocess.check_call(shlex.split("./xkeysnail_service.sh uninstall"))
exit()
if(kintotype == 4):
Uninstall()
exit()
subprocess.check_call(shlex.split("./xkeysnail_service.sh"))
kintoImpOne()
for index, item in enumerate(data['defaulttypes']):
ossym = ""
if item == "windows":
ossym = u'\u2756'
elif item == "mac":
ossym = u'\u2318'
elif item == "chromebook":
ossym = u'\u2707'
print("%s %i. %s %s %s" % (color_arr[index], index+1, ossym, item.capitalize(), bcolors.ENDC))
print("%s %i. Uninstall %s" % (color_arr[3], len(data['defaulttypes'])+1, bcolors.ENDC))
default = 0
while not int(default) in range(1,len(data['defaulttypes'])+2):
default = int(input(bcolors.CYELLOW2 + "\nPlease enter your keyboard type (1 - " + str(len(data['defaulttypes'])) + ") : " + bcolors.ENDC))
print("")
if default == len(data['defaulttypes'])+1:
Uninstall()
exit()
try:
f = open(homedir + "/.config/kinto/user_config.json")
rewrite = yn_choice("~/.config/kinto/user_config.json already exists. Do you want to overwrite it with a new config?")
print("")
if(rewrite):
copyfile("user_config.json", homedir + "/.config/kinto/user_config.json")
else:
exit()
except IOError:
pass
copyfile("user_config.json", homedir + "/.config/kinto/user_config.json")
finally:
f.close()
keyboardconfigs = [obj for obj in data['defaults'] if(obj['type'] == data['defaulttypes'][default-1])]
# for k in keyboardconfigs:
for index, k in enumerate(keyboardconfigs):
print(color_arr[default-1] + bcolors.BOLD + str(index+1) + '. ' + k['name'] + bcolors.ENDC)
print(bcolors.CYELLOW2 + 'Description: ' + k['description'] + bcolors.ENDC)
print("")
defaultkb = 0
while not int(defaultkb) in range(1,len(keyboardconfigs)+1):
defaultkb = int(input(bcolors.CYELLOW2 + "Please enter your keyboard config (1 - " + str(len(keyboardconfigs)) + ") : " + bcolors.ENDC))
print("")
if 'hack' in keyboardconfigs[defaultkb-1]:
print(bcolors.CYELLOW2 + "You have selected a keyboard config that needs the following command to be ran.\n" + bcolors.ENDC)
print(keyboardconfigs[defaultkb-1]['hack'].replace(";", "\n") + "\n")
runhack = yn_choice(bcolors.CYELLOW2 + "Would you like to run it now? (Will require sudo privileges. Will exit on No.)" + bcolors.ENDC)
if(runhack):
os.system(keyboardconfigs[defaultkb-1]['hack'])
# Setup the selected keyboards config
os.system("cp -TRv ./.xkb ~/.xkb/")
if os.path.isdir(homedir + "/.xkb/keymap") == False:
os.mkdir(homedir + "/.xkb/keymap")
time.sleep(0.5)
os.system('setxkbmap -option')
os.system('setxkbmap -print > ~/.xkb/keymap/kbd.mac.gui')
os.system('setxkbmap -print > ~/.xkb/keymap/kbd.mac.gui.chrome')
os.system('setxkbmap -print > ~/.xkb/keymap/kbd.mac.gui.browsers')
os.system('setxkbmap -print > ~/.xkb/keymap/kbd.mac.term')
time.sleep(0.5)
symbols_line = cmdline("cat ~/.xkb/keymap/kbd.mac.gui | grep -n 'xkb_symbols' | cut -f1 -d:").strip()
types_line = cmdline("cat ~/.xkb/keymap/kbd.mac.gui | grep -n 'xkb_types' | cut -f1 -d:").strip()
cmdline('sed -i '' -e "' + symbols_line + 's/\\"/' + keyboardconfigs[defaultkb-1]['xkb_symbols_gui'] + '\\"/2" ~/.xkb/keymap/kbd.mac.gui')
cmdline('sed -i '' -e "' + types_line + 's/\\"/' + keyboardconfigs[defaultkb-1]['xkb_types_gui'] + '\\"/2" ~/.xkb/keymap/kbd.mac.gui')
cmdline('sed -i '' -e "' + symbols_line + 's/\\"/' + keyboardconfigs[defaultkb-1]['xkb_symbols_term'] + '\\"/2" ~/.xkb/keymap/kbd.mac.term')
cmdline('sed -i '' -e "' + types_line + 's/\\"/' + keyboardconfigs[defaultkb-1]['xkb_types_term'] + '\\"/2" ~/.xkb/keymap/kbd.mac.term')
# Set chrome file accordingly for chromebooks or normal
if default != 3:
cmdline('sed -i '' -e "' + symbols_line + 's/\\"/' + keyboardconfigs[defaultkb-1]['xkb_symbols_gui'].replace("+mac_gui(mac_levelssym)+mac_gui(mac_appcycle)","+mac_gui(mac_levelssym)+mac_gui(mac_browsers)") + '\\"/2" ~/.xkb/keymap/kbd.mac.gui.browsers')
cmdline('sed -i '' -e "' + symbols_line + 's/\\"/' + keyboardconfigs[defaultkb-1]['xkb_symbols_gui'].replace("+mac_gui(mac_levelssym)+mac_gui(mac_appcycle)","+mac_gui(mac_browsers)+mac_gui(mac_chrome)") + '\\"/2" ~/.xkb/keymap/kbd.mac.gui.chrome')
else:
# Fix multicursor in mac_gui
cmdline('perl -pi -e "s/(\/\/ )(.*)(\/\/ Chromebook multicursor)/\$2\$3/g" ~/.xkb/symbols/mac_gui')
cmdline('perl -pi -e "s/(\w.*)(\/\/ Default multicursor)/\/\/ \$1\$2/g" ~/.xkb/symbols/mac_gui')
# Fix browsers
cmdline('sed -i '' -e "' + symbols_line + 's/\\"/' + keyboardconfigs[defaultkb-1]['xkb_symbols_gui'].replace("+mac_gui(mac_levelssym)+mac_gui(mac_appcycle_chromebook)","+mac_gui(mac_levelssym)+mac_gui(mac_browsers_chromebook)") + '\\"/2" ~/.xkb/keymap/kbd.mac.gui.browsers')
cmdline('sed -i '' -e "' + symbols_line + 's/\\"/' + keyboardconfigs[defaultkb-1]['xkb_symbols_gui'].replace("+mac_gui(mac_levelssym)+mac_gui(mac_appcycle_chromebook)","+mac_gui(mac_browsers_chromebook)+mac_gui(mac_chrome)") + '\\"/2" ~/.xkb/keymap/kbd.mac.gui.chrome')
if dename == "kde":
# Fix maximize shortcut
cmdline('perl -pi -e "s/(\/\/ )(.*)(\/\/ KDE maximize)/\$2\$3/g" ~/.xkb/symbols/mac_gui')
# term app switching
cmdline('perl -pi -e "s/(\/\/ )(.*)(\/\/ KDE cmdtab)/\$2\$3/g" ~/.xkb/symbols/mac_term')
else:
# Fix maximize shortcut
cmdline('perl -pi -e "s/(\/\/ )(.*)(\/\/ Default maximize)/\$2\$3/g" ~/.xkb/symbols/mac_gui')
# term app switching
cmdline('perl -pi -e "s/(\/\/ )(.*)(\/\/ Default cmdtab)/\$2\$3/g" ~/.xkb/symbols/mac_term')
cmdline('sed -i '' -e "' + types_line + 's/\\"/' + keyboardconfigs[defaultkb-1]['xkb_types_gui'] + '\\"/2" ~/.xkb/keymap/kbd.mac.gui.browsers')
cmdline('sed -i '' -e "' + types_line + 's/\\"/' + keyboardconfigs[defaultkb-1]['xkb_types_gui'] + '\\"/2" ~/.xkb/keymap/kbd.mac.gui.chrome')
setShortcuts()
user_file = homedir + '/.config/kinto/user_config.json'
with open(user_file, 'r') as f:
user_config = json.load(f)
onetime = yn_choice("\nOne time initialization tweaks are available. Would you like to view them?")
print("")
if(onetime):
intents = [obj for obj in user_config['de'] if(obj['intent'] == "init")]
for index, k in enumerate(intents):
print(color_arr[default-1] + bcolors.BOLD + str(index+1) + '. ' + k['name'] + bcolors.ENDC)
print(bcolors.CYELLOW2 + 'Description: ' + k['description'] + bcolors.ENDC)
print(bcolors.CYELLOW2 + 'run: ' + k['run'].replace(";", "\n") + bcolors.ENDC + '\n')
print(bcolors.CYELLOW2 + "Please enter your init tweak(s) (eg 1 or 1 2 3 - leave blank to skip): " + bcolors.ENDC)
defaultinit = [int(i) for i in input().split()]
if len(defaultinit) != 0:
user_config['init'] = [intents[defaultinit[0]-1]['id']]
print("\nDynamic shortcut tweaks\n")
intents = [obj for obj in user_config['de'] if(obj['intent'] == "gui_term")]
tweaks = []
tweaks_selected = []
for index, k in enumerate(intents):
print(color_arr[default-1] + bcolors.BOLD + str(index+1) + '. ' + k['name'] + bcolors.ENDC)
print(bcolors.CYELLOW2 + 'Description: ' + k['description'] + bcolors.ENDC)
print(bcolors.CYELLOW2 + 'run in gui mode: ' + k['run_gui'].replace(";", "\n") + bcolors.ENDC)
print(bcolors.CYELLOW2 + 'run in terminal mode: ' + k['run_term'].replace(";", "\n") + bcolors.ENDC + '\n')
tweaks.append(k['id'])
print(bcolors.CYELLOW2 + "Please enter your dynamic shortcut tweak(s) (eg 1 or 1 2 3 - leave blank to skip): " + bcolors.ENDC)
defaultde = [int(i) for i in input().split()]
for d in defaultde:
user_config['de'][tweaks[d-1]]['active'] = True
tweaks_selected.append(tweaks[d-1])
if len(defaultde) != 0:
# gui
user_config['config'][0]['de'] = tweaks_selected
# term
user_config['config'][1]['de'] = tweaks_selected
# firefox
user_config['config'][2]['de'] = tweaks_selected
# chrome
user_config['config'][3]['de'] = tweaks_selected
user_config['config'][0]['run'] = keyboardconfigs[defaultkb-1]['gui']
user_config['config'][1]['run'] = keyboardconfigs[defaultkb-1]['term']
user_config['config'][2]['run'] = keyboardconfigs[defaultkb-1]['gui'].replace("kbd.mac.gui","kbd.mac.gui.browsers")
user_config['config'][3]['run'] = keyboardconfigs[defaultkb-1]['gui'].replace("kbd.mac.gui","kbd.mac.gui.chrome")
os.remove(user_file)
with open(user_file, 'w') as f:
json.dump(user_config, f, indent=4)
print("Saved configuration to ~/.config/kinto/user_config.json\n")
print("Now running keyswap_service.sh to setup the keyswap service...")
print("Keyswap will be configured to run on user login\n")
print("You may start, stop, restart or view the status of the service with following commands\n")
print("systemctl --user start keyswap")
print("systemctl --user stop keyswap")
print("systemctl --user restart keyswap")
print("systemctl --user status keyswap")
os.system("./keyswap_service.sh")

Binary file not shown.

Before

Width:  |  Height:  |  Size: 40 KiB

View File

@@ -1,7 +0,0 @@
"xdotool key --delay 0 --clearmodifiers Alt+Left"
Control + Left + Release
#Home + release
"xdotool key --delay 0 --clearmodifiers Alt+Right"
Control + Right + Release
#End + release

View File

@@ -1,5 +0,0 @@
"xdotool key --delay 0 --clearmodifiers Home"
Control + Left + Release
"xdotool key --delay 0 --clearmodifiers End"
Control + Right + Release

View File

@@ -1,7 +0,0 @@
#"xte 'keydown Control_L' 'key bracketleft' 'keyup Control_L'"
"xdotool key --delay 0 --clearmodifiers Control_L+bracketleft"
Home + Release
#"xte 'keydown Control_R' 'key bracketright' 'keyup Control_R'"
"xdotool key --delay 0 --clearmodifiers Control_L+bracketright"
End + Release

View File

@@ -1 +0,0 @@
3cd35e15350ca7dac0c3cbfce1c661f7 /usr/bin/budgie-daemon

View File

@@ -1 +0,0 @@
8660c2f8e0a9d3cff896254f6c0f9159 /usr/bin/budgie-desktop

View File

@@ -1,10 +0,0 @@
#!/bin/bash
mkdir -p /tmp/kinto
IBUSADD=$(cat ~/.config/ibus/bus/`ls ~/.config/ibus/bus -1rt | tail -n1` | awk -F'IBUS_ADDRESS=' '{print $2}' | xargs)
dbus-monitor --address $IBUSADD "path='/org/freedesktop/IBus/Panel',interface='org.freedesktop.IBus.Panel',member='FocusOut'" 2> /dev/null | grep --line-buffered -o -P '(?<=object path \"/org/freedesktop/IBus/InputContext_).*(?=[\"])' |
while read ln
do
printf '%s\n' "$ln" > /tmp/kinto/caret
done

View File

@@ -1,78 +0,0 @@
#!/bin/bash
for pid in $(pidof -x caret_status_xkey.sh); do
if [ $pid != $$ ]; then
echo "[$(date)] : caret_status_xkey.sh : Process is already running with PID $pid"
exit 1
fi
done
mkdir -p /tmp/kinto/xkeysnail
echo "0" > /tmp/kinto/caret
millitime=`date +%s%3N`
echo "$millitime" > /tmp/kinto/millitime
IBUSADD=$(cat ~/.config/ibus/bus/`ls ~/.config/ibus/bus -1rt | tail -n1` | awk -F'IBUS_ADDRESS=' '{print $2}' | xargs)
dbus-monitor --address $IBUSADD "path='/org/freedesktop/IBus/Panel',interface='org.freedesktop.IBus.Panel',member='FocusOut'" 2> /dev/null | grep --line-buffered -o -P '(?<=object path \"/org/freedesktop/IBus/InputContext_).*(?=[\"])' |
while read ln
do
newtime=`date +%s%3N`
difftime=$(( newtime - millitime ))
millitime="$newtime"
echo "$millitime" > /tmp/kinto/millitime
appname=$(xprop -id `xprop -root | grep "_NET_ACTIVE_WINDOW(WINDOW)" | awk '{print $5}'` | grep "WM_CLASS(STRING)" | awk '{print substr($4,2,length($4)-2)}')
if [ "${ln}" == "1" ]; then
appname=$(xprop -id `xprop -root | grep "_NET_ACTIVE_WINDOW(WINDOW)" | awk '{print $5}'` | grep "WM_CLASS(STRING)" | awk '{print substr($4,2,length($4)-2)}')
if [ "${appname}" == "Firefox" ]; then
# echo "ff ww"
printf 'ff ww %s\n' "1" > /tmp/kinto/caret
elif [ "${appname}" == "Chromium" ] || [ "${appname}" == "Chromium-browser" ] || [ "${appname}" == "Google-chrome" ] || [ "${appname}" == "Epiphany" ]; then
# echo "chrome ww"
printf 'chrome ww %s\n' "1" > /tmp/kinto/caret
else
echo "reset" > /tmp/kinto/caret
fi
else
if [ "${appname}" == "Firefox" ]; then
# echo "ff nw"
printf 'ff nw\n' > /tmp/kinto/caret
elif [ "${appname}" == "Chromium" ] || [ "${appname}" == "Chromium-browser" ] || [ "${appname}" == "Google-chrome" ] || [ "${appname}" == "Epiphany" ]; then
# echo "chrome nw"
printf 'chrome nw\n' > /tmp/kinto/caret
else
echo "reset" > /tmp/kinto/caret
fi
fi
done&
while (true);do
sleep 0.2
appname2=$(xprop -id `xprop -root | grep "_NET_ACTIVE_WINDOW(WINDOW)" | awk '{print $5}'` | grep "WM_CLASS(STRING)" | awk '{print substr($4,2,length($4)-2)}')
check=$(cat /tmp/kinto/caret)
millitime=$(cat /tmp/kinto/millitime)
newtime=`date +%s%3N`
difftime=$(( newtime - millitime ))
if (( $difftime > 200 )); then
if [ "${check}" == "ff nw" ] && [ "${lastcheck}" != 1 ]; then
echo "firefox no wordwise"
# Sets new config
perl -pi -e "s/[^\n]\s{3}(K.*)(# Chrome-nw)/ # \$1\$2/g;s/[^\n]\s{3}#\s(K.*)(# Firefox-nw)/ \$1\$2/g;s/[^\n]\s{3}(K.*)(# Beginning of Line)/ # \$1\$2/g;s/[^\n]\s{3}(K.*)(# End of Line)/ # \$1\$2/g" /tmp/kinto/xkeysnail/kinto.py 2>/dev/null
lastcheck=1
ww=0
elif [ "${check}" == "chrome nw" ] && [ "${lastcheck}" != 2 ]; then
echo "chrome no wordwise"
# Sets new config
perl -pi -e "s/[^\n]\s{3}(K.*)(# Firefox-nw)/ # \$1\$2/g;s/[^\n]\s{3}(K.*)(# Beginning of Line)/ # \$1\$2/g;s/[^\n]\s{3}(K.*)(# End of Line)/ # \$1\$2/g;s/[^\n]\s{3}#\s(K.*)(# Chrome-nw)/ \$1\$2/g" /tmp/kinto/xkeysnail/kinto.py 2>/dev/null
lastcheck=2
ww=0
elif ([ "${check}" != "chrome nw" ] && [ "${check}" != "ff nw" ] && [ "${lastcheck}" != 3 ]) || ([ "${appname2}" != "Firefox" ] && [ "${appname2}" != "Chromium" ] && [ "${appname2}" != "Chromium-browser" ] && [ "${appname2}" != "Google-chrome" ] && [ "${appname2}" != "Epiphany" ] && [ "${check}" == "reset" ] && [ "${lastcheck}" != 3 ]); then
echo "wordwise"
# Sets original config
perl -pi -e "s/[^\n]\s{3}(K.*)(# Firefox-nw)/ # \$1\$2/g;s/[^\n]\s{3}#\s(K.*)(# Beginning of Line)/ \$1\$2/g;s/[^\n]\s{3}#\s(K.*)(# End of Line)/ \$1\$2/g;s/[^\n]\s{3}(K.*)(# Chrome-nw)/ # \$1\$2/g" /tmp/kinto/xkeysnail/kinto.py 2>/dev/null
# cp /home/ryan/.config/kinto/kinto.py /tmp/kinto/xkeysnail/kinto.py
lastcheck=3
fi
fi
done

View File

@@ -1,10 +0,0 @@
#!/bin/bash
setxkbmap -option
# force command to run silently and report true
killall xbindkeys > /dev/null 2>&1 || :
# rm /tmp/kinto/caret
gsettings set org.gnome.desktop.wm.keybindings switch-applications "['<Alt>Tab']"
gsettings set org.gnome.desktop.wm.keybindings switch-applications-backward "['<Shift><Alt>Tab']"
pkill -f /.config/kinto/xactive.sh

File diff suppressed because it is too large Load Diff

View File

@@ -1,16 +0,0 @@
[Unit]
Description=keyswap for Terminal and GUI
PartOf=graphical-session.target
[Service]
Type=simple
Restart=always
# eg DISPLAY=:0.0
#Environment=DISPLAY={displayid}
RestartSec=1
WorkingDirectory={homedir}/.config/kinto
ExecStart=/bin/bash -c "{homedir}/.config/kinto/xactive.sh carrots"
ExecStop=/bin/bash {homedir}/.config/kinto/cleanup.sh
[Install]
WantedBy=default.target

View File

@@ -1,11 +0,0 @@
# keyswap.timer
[Unit]
Description=Runs the keyswap.service 5 seconds after boot up
[Timer]
#OnBootSec=5s
OnActiveSec=5s
Unit=keyswap.service
[Install]
WantedBy=default.target

View File

@@ -1,40 +0,0 @@
#!/bin/bash
# Manual keyswap
systemtype=$1
internalid=$2
usbid=$3
swapbehavior=$4
swapcmd_term="setxkbmap -option;setxkbmap -option altwin:swap_alt_win"
fallbackcmd_gui=""
if [[ "$systemtype" == "windows" || "$systemtype" == "mac" ]]; then
swapcmd_gui="setxkbmap -option;xkbcomp -w0 -I$HOME/.xkb ~/.xkb/keymap/kbd.mac.gui $DISPLAY"
elif [[ "$systemtype" == "mac_only" ]]; then
swapcmd_gui="setxkbmap -option;xkbcomp -w0 -I$HOME/.xkb ~/.xkb/keymap/kbd.mac.gui $DISPLAY"
# Chromebook keyboard options
elif [[ "$swapbehavior" == "both_mac" ]]; then
swapcmd_gui="setxkbmap -option;setxkbmap -option ctrl:swap_lwin_lctl; xkbcomp -w0 -i $internalid -I$HOME/.xkb ~/.xkb/keymap/kbd.chromebook.gui $DISPLAY"
swapcmd_term="setxkbmap -option;setxkbmap -device $internalid -option 'altwin:swap_alt_win'"
elif [[ "$swapbehavior" == "both_win" ]]; then
swapcmd_gui="setxkbmap -option;xkbcomp -w0 -I$HOME/.xkb ~/.xkb/keymap/kbd.chromebook.gui $DISPLAY; setxkbmap -device $usbid -option altwin:ctrl_alt_win"
fallbackcmd_gui="setxkbmap -option;xkbcomp -w0 -I$HOME/.xkb ~/.xkb/keymap/kbd.chromebook.gui $DISPLAY"
elif [[ "$swapbehavior" == "none" ]]; then
swapcmd_gui="setxkbmap -option;xkbcomp -w0 -I$HOME/.xkb ~/.xkb/keymap/kbd.chromebook.gui $DISPLAY"
fi
if [[ "$systemtype" == "mac_only" ]]; then
check=`setxkbmap -query | grep -c 'alt_super_win'`
elif [[ "$swapbehavior" == "both_win" ]]; then
check=`setxkbmap -query | grep -q 'ctrl_alt_win'; echo $?`
else
check=`setxkbmap -query | grep -c 'swap_alt_win'`
fi
echo $check
if [ $check -eq 0 ]; then
echo "internal gui to term"
eval "$swapcmd_term"
else
echo "internal term to gui"
eval "$swapcmd_gui"
fi

View File

@@ -1,10 +0,0 @@
#!/bin/bash
if [ $# -eq 0 ]
then
# No arguments
./kintox11
else
./caret_status.sh &
./kintox11
fi

View File

@@ -1,19 +0,0 @@
#!/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 disable keyswap
systemctl --user stop keyswap.timer 2>/dev/null
systemctl --user disable keyswap.timer
rm ~/.config/systemd/user/keyswap.service
rm ~/.config/systemd/user/keyswap.timer
rm -rf ~/.config/autostart/kinto.desktop
rm -rf ~/.config/kinto
rm -rf ~/.xkb
sudo systemctl daemon-reload
sed -i '/xkb/d' ~/.Xsession 2>/dev/null
exit 0

View File

@@ -1,76 +0,0 @@
{"config":[{
"name":"gui",
"run":"",
"run_onInput":"",
"run_offInput": "killall xbindkeys > /dev/null 2>&1",
"symbols":"",
"types":"",
"de":[],
"appnames":[ "" ]
},
{
"name":"term",
"run":"",
"run_onInput":"",
"run_offInput": "killall xbindkeys > /dev/null 2>&1",
"symbols":"",
"types":"",
"de":[],
"appnames":[ "Gnome-terminal","konsole","io.elementary.terminal","terminator","sakura","guake","tilda","xterm","eterm","kitty","alacritty","mate-terminal","tilix","xfce4-terminal" ]
},
{
"name": "firefox",
"run": "",
"run_onInput": "pkill -f ~/.config/kinto/.firefox-nw",
"run_offInput": "xbindkeys -f $HOME/.config/kinto/.firefox-nw",
"symbols": "",
"types": "",
"de": [],
"appnames": [ "Firefox" ]
},
{
"name": "chrome",
"run": "",
"run_onInput": "xkbcomp -w0 -I$HOME/.xkb ~/.xkb/keymap/kbd.mac.gui $DISPLAY",
"run_offInput": "xkbcomp -w0 -I$HOME/.xkb ~/.xkb/keymap/kbd.mac.gui.chrome $DISPLAY",
"symbols": "",
"types": "",
"de": [],
"appnames": [ "Chromium","Chromium-browser","Google-chrome","Epiphany" ]
}],
"init": [],
"detypes":["gnome2","gnome3","kde4","kde5","xfce","i3wm"],
"de":[{
"id": 1,
"type": ["gnome3"],
"active": false,
"intent":"init",
"name":"gnome-init",
"description":"Gnome - Remove Superkey Overlay keybinding to Activities Overview",
"run":"gsettings set org.gnome.mutter overlay-key ''",
"run_term":"",
"run_gui":""
},
{
"id": 2,
"type": ["gnome3"],
"active": false,
"intent":"gui_term",
"name":"Gnome Activities Overview",
"description":"Cmd+Space activates Activities Overview",
"run":"",
"run_term":"gsettings set org.gnome.desktop.wm.keybindings panel-main-menu \"['<Control><Shift>Space']\"",
"run_gui":"gsettings set org.gnome.desktop.wm.keybindings panel-main-menu \"['<Ctrl>Space']\""
},
{
"id": 3,
"type": ["kde5"],
"active": false,
"intent":"init",
"name":"kde-init",
"description":"KDE Plasma 5 - Removes Superkey Overlay from the Launcher Menu",
"run":"kwriteconfig5 --file ~/.config/kwinrc --group ModifierOnlyShortcuts --key Meta \"\";qdbus org.kde.KWin /KWin reconfigure",
"run_term":"",
"run_gui":""
}]
}

Binary file not shown.

View File

@@ -1,15 +1,22 @@
$testchoco = powershell choco -v
if(-not($testchoco)){
if(-not(Get-Command "choco" -errorAction SilentlyContinue)){
Write-Output "Seems Chocolatey is not installed, installing now"
Set-ExecutionPolicy Bypass -Scope Process -Force; iex ((New-Object System.Net.WebClient).DownloadString('https://chocolatey.org/install.ps1'))
refreshenv
}
else{
Write-Output "Chocolatey Version $testchoco is already installed"
Write-Output "Chocolatey is already installed"
}
if(-not(test-path "C:\Program Files\AutoHotkey\AutoHotkey.exe")){
choco install autohotkey.install
}
else{
Write-Output "Autohotkey is already installed"
}
if(-not(test-path "C:\Strawberry\")){
choco install strawberryperl
refreshenv
}
else{
Write-Output "Perl is already installed"
}

View File

@@ -11,13 +11,12 @@ WinHide % "ahk_id " DllCall("GetConsoleWindow", "ptr")
notify_change(wParam, lParam, msg, hwnd)
{
global lastkb
; kbtype = % ComObjCreate("WScript.Shell").Exec("cscript /nologo usb.vbs").StdOut.ReadAll()
DetectHiddenWindows On
Run %ComSpec%,, Hide, pid
WinWait ahk_pid %pid%
DllCall("AttachConsole", "UInt", pid)
WshShell := ComObjCreate("Wscript.Shell")
exec := WshShell.Exec("cscript /nologo usb.vbs")
exec := WshShell.Exec("cscript /nologo ""%userprofile%\.kinto\usb.vbs""")
kbtype := exec.StdOut.ReadAll()
DllCall("FreeConsole")
Process Close, %pid%
@@ -27,11 +26,11 @@ notify_change(wParam, lParam, msg, hwnd)
if InStr(kbtype, "Apple")
{
; MsgBox, Apple
Run, %A_ScriptDir%\NoShell.vbs %A_ScriptDir%\toggle_kb.bat mac, %A_ScriptDir%
Run, "%A_ScriptDir%\NoShell.vbs" "%A_ScriptDir%\toggle_kb.bat" mac, "%A_ScriptDir%"
}
else{
; MsgBox, Windows
Run, %A_ScriptDir%\NoShell.vbs %A_ScriptDir%\toggle_kb.bat win, %A_ScriptDir%
Run, "%A_ScriptDir%\NoShell.vbs" "%A_ScriptDir%\toggle_kb.bat" win, "%A_ScriptDir%"
}
; MsgBox % kbtype
}

View File

@@ -2,6 +2,6 @@ Set oShell = CreateObject("Shell.Application")
Set wShell = WScript.CreateObject("WScript.Shell")
Set fso = CreateObject("Scripting.FileSystemObject")
path = wShell.ExpandEnvironmentStrings("%userprofile%")
strFolder = fso.BuildPath(path, "\.kinto\kinto.ahk")
path = wShell.ExpandEnvironmentStrings("""%userprofile%")
strFolder = fso.BuildPath( path, "\.kinto\kinto.ahk"" {kbtype}")
oShell.ShellExecute "C:\Program Files\AutoHotkey\AutoHotkey.exe", strFolder, , "runas", 0

File diff suppressed because it is too large Load Diff

View File

@@ -2,20 +2,63 @@
IF "%1"=="mac" goto mac
IF "%1"=="win" goto win
IF "%1"=="chrome" goto chrome
IF "%1"=="ibm" goto ibm
IF "%1"=="auto" goto auto
echo Not found.
goto commonexit
:auto
C:\Strawberry\perl\bin\perl.exe -pi -e "s/^(;)( )(.*)(; Autodetect)|^(?!; )(.*)(; )(Autodetect)/$6$5$6$7$3$4/g" "%userprofile%\.kinto\kinto.ahk"
"%userprofile%\.kinto\kinto-start.vbs"
goto commonexit
:win
perl -pi -e "s/(; )(.*)(; WinModifiers)/$2$3/g" "%userprofile%\.kinto\kinto.ahk"
perl -pi -e "s/^(?!;)(.*)(; MacModifiers)/; $1$2/gm" "%userprofile%\.kinto\kinto.ahk"
"C:\Program Files\AutoHotkey\AutoHotkey.exe" "%userprofile%\.kinto\kinto.ahk"
C:\Strawberry\perl\bin\perl.exe -pi -e "s/(; )(.*)(; WinModifiers)/$2$3/g" "%userprofile%\.kinto\kinto.ahk"
C:\Strawberry\perl\bin\perl.exe -pi -e "s/(; )(.*)(; Default)/$2$3/g" "%userprofile%\.kinto\kinto.ahk"
C:\Strawberry\perl\bin\perl.exe -pi -e "s/^(?!;)(.*)(; MacModifiers)/; $1$2/gm" "%userprofile%\.kinto\kinto.ahk"
C:\Strawberry\perl\bin\perl.exe -pi -e "s/^(?!;)(.*)(; CB\/IBM)/; $1$2/gm" "%userprofile%\.kinto\kinto.ahk"
C:\Strawberry\perl\bin\perl.exe -pi -e "s/^(?!;)(.*)(; Chromebook)/; $1$2/gm" "%userprofile%\.kinto\kinto.ahk"
C:\Strawberry\perl\bin\perl.exe -pi -e "s/^(?!;)(.*)(; IBM)/; $1$2/gm" "%userprofile%\.kinto\kinto.ahk"
C:\Strawberry\perl\bin\perl.exe -pi -e "s/(ahk\"\" )(\w*)/$1win/gm" "%userprofile%\.kinto\kinto-start.vbs"
"C:\Program Files\AutoHotkey\AutoHotkey.exe" "%userprofile%\.kinto\kinto.ahk" win
goto commonexit
:mac
perl -pi -e "s/(; )(.*)(; MacModifiers)/$2$3/g" "%userprofile%\.kinto\kinto.ahk"
perl -pi -e "s/^(?!;)(.*)(; WinModifiers)/; $1$2/gm" "%userprofile%\.kinto\kinto.ahk"
"C:\Program Files\AutoHotkey\AutoHotkey.exe" "%userprofile%\.kinto\kinto.ahk"
C:\Strawberry\perl\bin\perl.exe -pi -e "s/(; )(.*)(; MacModifiers)/$2$3/g" "%userprofile%\.kinto\kinto.ahk"
C:\Strawberry\perl\bin\perl.exe -pi -e "s/(; )(.*)(; Default)/$2$3/g" "%userprofile%\.kinto\kinto.ahk"
C:\Strawberry\perl\bin\perl.exe -pi -e "s/^(?!;)(.*)(; WinModifiers)/; $1$2/gm" "%userprofile%\.kinto\kinto.ahk"
C:\Strawberry\perl\bin\perl.exe -pi -e "s/^(?!;)(.*)(; CB\/IBM)/; $1$2/gm" "%userprofile%\.kinto\kinto.ahk"
C:\Strawberry\perl\bin\perl.exe -pi -e "s/^(?!;)(.*)(; Chromebook)/; $1$2/gm" "%userprofile%\.kinto\kinto.ahk"
C:\Strawberry\perl\bin\perl.exe -pi -e "s/^(?!;)(.*)(; IBM)/; $1$2/gm" "%userprofile%\.kinto\kinto.ahk"
C:\Strawberry\perl\bin\perl.exe -pi -e "s/(ahk\"\" )(\w*)/$1mac/gm" "%userprofile%\.kinto\kinto-start.vbs"
"C:\Program Files\AutoHotkey\AutoHotkey.exe" "%userprofile%\.kinto\kinto.ahk" mac
goto commonexit
:chrome
C:\Strawberry\perl\bin\perl.exe -pi -e "s/^(?!; )(.*)(; Autodetect)/; $1$2/gm" "%userprofile%\.kinto\kinto.ahk"
C:\Strawberry\perl\bin\perl.exe -pi -e "s/^(?!;)(.*)(; WinModifiers)/; $1$2/gm" "%userprofile%\.kinto\kinto.ahk"
C:\Strawberry\perl\bin\perl.exe -pi -e "s/^(?!;)(.*)(; MacModifiers)/; $1$2/gm" "%userprofile%\.kinto\kinto.ahk"
C:\Strawberry\perl\bin\perl.exe -pi -e "s/^(?!;)(.*)(; Default)/; $1$2/gm" "%userprofile%\.kinto\kinto.ahk"
C:\Strawberry\perl\bin\perl.exe -pi -e "s/(; )(.*)(; Chromebook)/$2$3/g" "%userprofile%\.kinto\kinto.ahk"
C:\Strawberry\perl\bin\perl.exe -pi -e "s/(; )(.*)(; WinModifiers\/CB)/$2$3/g" "%userprofile%\.kinto\kinto.ahk"
C:\Strawberry\perl\bin\perl.exe -pi -e "s/(; )(.*)(; CB\/IBM)/$2$3/g" "%userprofile%\.kinto\kinto.ahk"
C:\Strawberry\perl\bin\perl.exe -pi -e "s/(ahk\"\" )(\w*)/$1chrome/gm" "%userprofile%\.kinto\kinto-start.vbs"
"C:\Program Files\AutoHotkey\AutoHotkey.exe" "%userprofile%\.kinto\kinto.ahk" chrome
goto commonexit
:ibm
C:\Strawberry\perl\bin\perl.exe -pi -e "s/^(?!; )(.*)(; Autodetect)/; $1$2/gm" "%userprofile%\.kinto\kinto.ahk"
C:\Strawberry\perl\bin\perl.exe -pi -e "s/^(?!;)(.*)(; WinModifiers)/; $1$2/gm" "%userprofile%\.kinto\kinto.ahk"
C:\Strawberry\perl\bin\perl.exe -pi -e "s/^(?!;)(.*)(; Chromebook)/; $1$2/gm" "%userprofile%\.kinto\kinto.ahk"
C:\Strawberry\perl\bin\perl.exe -pi -e "s/^(?!;)(.*)(; MacModifiers)/; $1$2/gm" "%userprofile%\.kinto\kinto.ahk"
C:\Strawberry\perl\bin\perl.exe -pi -e "s/^(?!;)(.*)(; Default)/; $1$2/gm" "%userprofile%\.kinto\kinto.ahk"
C:\Strawberry\perl\bin\perl.exe -pi -e "s/(; )(.*)(; IBM)/$2$3/g" "%userprofile%\.kinto\kinto.ahk"
C:\Strawberry\perl\bin\perl.exe -pi -e "s/(; )(.*)(; WinModifiers\/CB\/IBM)/$2$3/g" "%userprofile%\.kinto\kinto.ahk"
C:\Strawberry\perl\bin\perl.exe -pi -e "s/(; )(.*)(; CB\/IBM)/$2$3/g" "%userprofile%\.kinto\kinto.ahk"
C:\Strawberry\perl\bin\perl.exe -pi -e "s/(ahk\"\" )(\w*)/$1ibm/gm" "%userprofile%\.kinto\kinto-start.vbs"
"C:\Program Files\AutoHotkey\AutoHotkey.exe" "%userprofile%\.kinto\kinto.ahk" ibm
goto commonexit
:commonexit

View File

@@ -1,5 +1,5 @@
Option Explicit
Dim oWMISrv, collDvcs, iUSBDvc , iDvc, sDvcID, sPID, sVID
Dim oWMISrv, collDvcs, iUSBDvc , iDvc, sDvcID, sPID, sVID, deviceID
' add item to array
Function AddItem(arr, val)
@@ -49,21 +49,23 @@ Dim nonApple: nonApple = 0
Dim i
If vcount = 1 Then
deviceID = deviceVID(0)
If StrComp(deviceVID(0), "05AC") = 0 Then
Wscript.Echo "Apple"
Wscript.Echo "Apple " & deviceID
Else
Wscript.Echo "Windows"
Wscript.Echo "Windows " & deviceID
End If
Else
For i = 0 To counter-1
deviceID = deviceVID(i)
If StrComp(deviceVID(i), "05AC") = -1 Then
nonApple = 1
End If
Next
If nonApple = 1 Then
Wscript.Echo "Windows"
Wscript.Echo "Windows " & deviceID
Else
Wscript.Echo "Apple"
Wscript.Echo "Apple " & deviceID
End If
End If

View File

@@ -1,300 +0,0 @@
# -*- coding: utf-8 -*-
import re
from xkeysnail.transform import *
# 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]
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
define_conditional_modmap(lambda wm_class: wm_class.casefold() not in terminals,{
# # Chromebook
# Key.LEFT_ALT: Key.RIGHT_CTRL, # Chromebook
# Key.LEFT_CTRL: Key.LEFT_ALT, # Chromebook
# Key.RIGHT_ALT: Key.RIGHT_CTRL, # Chromebook
# Key.RIGHT_CTRL: Key.RIGHT_ALT, # Chromebook
# # Default Mac/Win
# Key.LEFT_ALT: Key.RIGHT_CTRL, # WinMac
# Key.LEFT_META: Key.LEFT_ALT, # WinMac
# Key.LEFT_CTRL: Key.LEFT_META, # WinMac
# Key.RIGHT_ALT: Key.RIGHT_CTRL, # WinMac
# Key.RIGHT_META: Key.RIGHT_ALT, # WinMac
# Key.RIGHT_CTRL: Key.RIGHT_META, # WinMac
# # Mac Only
# Key.LEFT_META: Key.RIGHT_CTRL, # Mac
# Key.LEFT_CTRL: Key.LEFT_META, # Mac
# Key.RIGHT_META: Key.RIGHT_CTRL, # Mac
# Key.RIGHT_CTRL: Key.RIGHT_META, # Mac
})
# [Conditional modmap] Change modifier keys in certain applications
define_conditional_modmap(re.compile(termStr, re.IGNORECASE), {
# # Chromebook
# Key.LEFT_ALT: Key.RIGHT_CTRL, # Chromebook
# # Left Ctrl Stays Left Ctrl
# Key.LEFT_META: Key.LEFT_ALT, # Chromebook
# Key.RIGHT_ALT: Key.RIGHT_CTRL, # Chromebook - Multi-language (Remove)
# Key.RIGHT_CTRL: Key.RIGHT_ALT, # Chromebook
# # Right Meta does not exist on chromebooks
# # Default Mac/Win
# Key.LEFT_ALT: Key.RIGHT_CTRL, # WinMac
# Key.LEFT_META: Key.LEFT_ALT, # WinMac
# Key.LEFT_CTRL: Key.LEFT_CTRL, # WinMac
# Key.RIGHT_ALT: Key.RIGHT_CTRL, # WinMac - Multi-language (Remove)
# Key.RIGHT_META: Key.RIGHT_ALT, # WinMac
# Key.RIGHT_CTRL: Key.LEFT_CTRL, # WinMac
# # Mac Only
# Key.LEFT_META: Key.RIGHT_CTRL, # Mac
# # Left Ctrl Stays Left Ctrl
# Key.RIGHT_META: Key.RIGHT_CTRL, # Mac
# Key.RIGHT_CTRL: Key.LEFT_CTRL, # Mac
})
# Keybindings for Nautilus
define_keymap(re.compile("org.gnome.nautilus", re.IGNORECASE),{
K("RC-Up"): K("M-Up"), # Go Up dir
K("RC-Down"): K("M-Down"), # Go Down dir
K("RC-Left"): K("M-Left"), # Go Back
K("RC-Right"): K("M-Right"), # Go Forward
})
define_keymap(None,{
# Basic App hotkey functions
K("RC-Q"): K("Alt-F4"),
K("RC-H"): K("Alt-F9"),
# Cmd Tab - App Switching Default
K("RC-Tab"): K("RC-F13"), # Default not-xfce4
K("RC-Shift-Tab"): K("RC-Shift-F13"), # Default not-xfce4
K("RC-Grave"): K("M-F6"), # Default not-xfce4
K("RC-Shift-Grave"): K("M-Shift-F6"), # Default not-xfce4
# K("RC-Tab"): K("RC-backslash"), # xfce4
# K("RC-Shift-Tab"): K("RC-Shift-backslash"), # xfce4
# K("RC-Grave"): K("RC-Shift-backslash"), # xfce4
# 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-Grave") : K("C-Shift-Tab"), # Chromebook - In-App Tab switching
K("Super-Tab"): K("LC-Tab"), # Default not-chromebook
K("Super-Shift-Tab"): K("LC-Shift-Tab"), # Default not-chromebook
# Wordwise
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-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-Left"): K("C-LEFT_BRACE"), # Firefox-nw - Back
# K("RC-Right"): K("C-RIGHT_BRACE"), # Firefox-nw - Forward
# K("RC-Left"): K("M-LEFT"), # Chrome-nw - Back
# K("RC-Right"): K("M-RIGHT"), # Chrome-nw - Forward
K("RC-Up"): K("C-Home"), # 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-Shift-Down"): K("C-Shift-End"), # Select all to End of File
# 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(""): K(""), #
})
define_keymap(lambda wm_class: wm_class.casefold() not in mscodes,{
# Wordwise remaining - for Everything but VS Code
K("M-Left"): K("C-Left"), # Left of Word
K("M-Shift-Left"): K("C-Shift-Left"), # Select Left of Word
K("M-Right"): K("C-Right"), # Right of Word
K("M-Shift-Right"): K("C-Shift-Right"), # Select Right of Word
K("M-Shift-g"): K("C-Shift-g"), # View source control
# ** VS Code fix **
# Electron issue precludes normal keybinding fix.
# Alt menu auto-focus/toggle gets in the way.
#
# refer to ./xkeysnail-config/vscode_keybindings.json
# **
#
# ** Firefox fix **
# User will need to set "ui.key.menuAccessKeyFocuses"
# under about:config to false.
#
# https://superuser.com/questions/770301/pentadactyl-how-to-disable-menu-bar-toggle-by-alt
# **
#
})
# Keybindings for VS Code
define_keymap(re.compile(codeStr, re.IGNORECASE),{
# Wordwise remaining - for VS Code
# Alt-F19 hack fixes Alt menu activation
K("M-Left"): [K("M-F19"),K("C-Left")], # Left of Word
K("M-Right"): [K("M-F19"),K("C-Right")], # Right 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("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
K("C-g"): pass_through_key, # cancel Go to Line...
K("Super-g"): K("C-g"), # Go to Line...
K("F3"): pass_through_key, # cancel Find next
K("C-h"): pass_through_key, # cancel replace
K("C-M-f"): K("C-h"), # replace
K("C-Shift-h"): pass_through_key, # cancel replace_next
K("C-M-e"): K("C-Shift-h"), # replace_next
K("f3"): pass_through_key, # cancel find_next
K("C-g"): K("f3"), # find_next
K("Shift-f3"): pass_through_key, # cancel find_prev
K("C-Shift-g"): K("Shift-f3"), # find_prev
# K("Super-C-g"): K("C-f2"), # Default - Sublime - find_all_under
# K("C-M-g"): K("C-f2"), # Chromebook - Sublime - find_all_under
# K("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(""): K(""), #
}, "Code")
# Keybindings for Sublime Text
define_keymap(re.compile("Sublime_text", re.IGNORECASE),{
K("C-Super-up"): K("M-o"), # Switch file
K("Super-RC-f"): K("f11"), # toggle_full_screen
K("C-M-v"): [K("C-k"), K("C-v")], # paste_from_history
K("C-up"): pass_through_key, # cancel scroll_lines up
K("Super-M-up"): K("C-up"), # scroll_lines up
K("C-down"): pass_through_key, # cancel scroll_lines down
K("Super-M-down"): K("C-down"), # scroll_lines down
K("Super-Shift-up"): K("M-Shift-up"), # multi-cursor up
K("Super-Shift-down"): K("M-Shift-down"), # multi-cursor down
K("C-PAGE_DOWN"): pass_through_key, # cancel next_view
K("C-PAGE_UP"): pass_through_key, # cancel prev_view
K("C-Shift-left_brace"): K("C-PAGE_DOWN"), # next_view
K("C-Shift-right_brace"): K("C-PAGE_UP"), # prev_view
K("C-M-right"): K("C-PAGE_DOWN"), # next_view
K("C-M-left"): K("C-PAGE_UP"), # prev_view
K("insert"): pass_through_key, # cancel toggle_overwrite
K("C-M-o"): K("insert"), # toggle_overwrite
K("M-c"): pass_through_key, # cancel toggle_case_sensitive
K("C-M-c"): K("M-c"), # toggle_case_sensitive
K("C-h"): pass_through_key, # cancel replace
K("C-M-f"): K("C-h"), # replace
K("C-Shift-h"): pass_through_key, # cancel replace_next
K("C-M-e"): K("C-Shift-h"), # replace_next
K("f3"): pass_through_key, # cancel find_next
K("C-g"): K("f3"), # find_next
K("Shift-f3"): pass_through_key, # cancel find_prev
K("C-Shift-g"): K("Shift-f3"), # find_prev
K("C-f3"): pass_through_key, # cancel find_under
K("Super-M-g"): K("C-f3"), # find_under
K("C-Shift-f3"): pass_through_key, # cancel find_under_prev
K("Super-M-Shift-g"): K("C-Shift-f3"), # find_under_prev
K("M-f3"): pass_through_key, # Default - cancel find_all_under
# K("M-Refresh"): pass_through_key, # Chromebook - cancel find_all_under
# K("M-C-g"): K("M-Refresh"), # Chromebook - find_all_under
K("Super-C-g"): K("M-f3"), # Default - find_all_under
K("C-Shift-up"): pass_through_key, # cancel swap_line_up
K("Super-C-up"): K("C-Shift-up"), # swap_line_up
K("C-Shift-down"): pass_through_key, # cancel swap_line_down
K("Super-C-down"): K("C-Shift-down"), # swap_line_down
K("C-Pause"): pass_through_key, # cancel cancel_build
K("Super-c"): K("C-Pause"), # cancel_build
K("f9"): pass_through_key, # cancel sort_lines case_s false
K("f5"): K("f9"), # sort_lines case_s false
K("Super-f9"): pass_through_key, # cancel sort_lines case_s true
K("Super-f5"): K("Super-f9"), # sort_lines case_s true
K("M-Shift-Key_1"): pass_through_key, # cancel set_layout
K("C-M-Key_1"): K("M-Shift-Key_1"), # set_layout
K("M-Shift-Key_2"): pass_through_key, # cancel set_layout
K("C-M-Key_2"): K("M-Shift-Key_2"), # set_layout
K("M-Shift-Key_3"): pass_through_key, # cancel set_layout
K("C-M-Key_3"): K("M-Shift-Key_3"), # set_layout
K("M-Shift-Key_4"): pass_through_key, # cancel set_layout
K("C-M-Key_4"): K("M-Shift-Key_4"), # set_layout
K("M-Shift-Key_8"): pass_through_key, # cancel set_layout
K("C-M-Shift-Key_2"): K("M-Shift-Key_8"), # set_layout
K("M-Shift-Key_9"): pass_through_key, # cancel set_layout
K("C-M-Shift-Key_3"): K("M-Shift-Key_9"), # set_layout
K("M-Shift-Key_5"): pass_through_key, # cancel set_layout
K("C-M-Shift-Key_5"): K("M-Shift-Key_5"), # set_layout
# K(""): pass_through_key, # cancel
# K(""): K(""), #
}, "Sublime Text")
define_keymap(re.compile("konsole", re.IGNORECASE),{
# Ctrl Tab - In App Tab Switching
K("LC-Tab") : K("Shift-Right"),
K("LC-Shift-Tab") : K("Shift-Left"),
K("LC-Grave") : K("Shift-Left"),
}, "Konsole tab switching")
define_keymap(re.compile("Io.elementary.terminal|kitty", re.IGNORECASE),{
# Ctrl Tab - In App Tab Switching
K("LC-Tab") : K("LC-Shift-Right"),
K("LC-Shift-Tab") : K("LC-Shift-Left"),
K("LC-Grave") : K("LC-Shift-Left"),
}, "Elementary Terminal tab switching")
define_keymap(re.compile(termStr, re.IGNORECASE),{
# Ctrl Tab - In App Tab Switching
K("LC-Tab") : K("LC-PAGE_DOWN"),
K("LC-Shift-Tab") : K("LC-PAGE_UP"),
K("LC-Grave") : K("LC-PAGE_UP"),
# Converts Cmd to use Ctrl-Shift
K("RC-Tab"): K("RC-F13"),
K("RC-Shift-Tab"): K("RC-Shift-F13"),
K("RC-V"): K("C-Shift-V"),
K("RC-MINUS"): K("C-Shift-MINUS"),
K("RC-EQUAL"): K("C-Shift-EQUAL"),
K("RC-BACKSPACE"): K("C-Shift-BACKSPACE"),
K("RC-W"): K("C-Shift-W"),
K("RC-E"): K("C-Shift-E"),
K("RC-R"): K("C-Shift-R"),
K("RC-T"): K("C-Shift-t"),
K("RC-Y"): K("C-Shift-Y"),
K("RC-U"): K("C-Shift-U"),
K("RC-I"): K("C-Shift-I"),
K("RC-O"): K("C-Shift-O"),
K("RC-P"): K("C-Shift-P"),
K("RC-LEFT_BRACE"): K("C-Shift-LEFT_BRACE"),
K("RC-RIGHT_BRACE"): K("C-Shift-RIGHT_BRACE"),
K("RC-A"): K("C-Shift-A"),
K("RC-S"): K("C-Shift-S"),
K("RC-D"): K("C-Shift-D"),
K("RC-F"): K("C-Shift-F"),
K("RC-G"): K("C-Shift-G"),
K("RC-H"): K("C-Shift-H"),
K("RC-J"): K("C-Shift-J"),
K("RC-K"): K("C-Shift-K"),
K("RC-L"): K("C-Shift-L"),
K("RC-SEMICOLON"): K("C-Shift-SEMICOLON"),
K("RC-APOSTROPHE"): K("C-Shift-APOSTROPHE"),
K("RC-GRAVE"): K("C-Shift-GRAVE"),
K("RC-BACKSLASH"): K("C-Shift-BACKSLASH"),
K("RC-Z"): K("C-Shift-Z"),
K("RC-X"): K("C-Shift-X"),
K("RC-C"): K("C-Shift-C"),
K("RC-V"): K("C-Shift-V"),
K("RC-B"): K("C-Shift-B"),
K("RC-N"): K("C-Shift-N"),
K("RC-M"): K("C-Shift-M"),
K("RC-COMMA"): K("C-Shift-COMMA"),
K("RC-DOT"): K("C-Shift-DOT"),
K("RC-SLASH"): K("C-Shift-SLASH"),
K("RC-KPASTERISK"): K("C-Shift-KPASTERISK"),
}, "terminals")

View File

@@ -1,5 +0,0 @@
# /etc/sudoers.d/limitedadmins
%{username} ALL=NOPASSWD: {systemctl} restart xkeysnail
%{username} ALL=NOPASSWD: {systemctl} start xkeysnail
%{username} ALL=NOPASSWD: {systemctl} stop xkeysnail
%{username} ALL=NOPASSWD: {systemctl} status xkeysnail

Some files were not shown because too many files have changed in this diff Show More