Compare commits

...

384 Commits

Author SHA1 Message Date
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
Ben Reaves
1acc948fbc Merge pull request #214 from rbreaves/dev
- Windows auto-keyboard detection, new icon status, Terminus support
2020-06-16 13:35:04 -05:00
Ben Reaves
7174904434 - Added source control remap to VS Code. Closes #191. 2020-06-16 02:37:02 -05:00
Ben Reaves
b5ab41de9d - Added proper disabling of the autodetect feature when program is disabled. 2020-06-16 00:44:44 -05:00
Ben Reaves
86582466cf - Updated uninstaller for Windows to fully remove kinto 2020-06-15 23:13:31 -05:00
Ben Reaves
cc05da2f59 - Added more assets and added suspend and unique windows vs apple keyboard status icons for Windows 2020-06-15 23:01:38 -05:00
Ben Reaves
2b9598c84f - Completed Windows autoset keyboard feature 2020-06-15 01:39:56 -05:00
Ben Reaves
7f9ccabf77 - WIP autoset keyboard type for Windows 2020-06-14 22:20:28 -05:00
Ben Reaves
2249c4538d Merge branch 'dev' into alpha 2020-06-14 15:03:57 -05:00
Ben Reaves
fb630a7d33 Merge branch 'master' into dev 2020-06-14 15:03:12 -05:00
Ben Reaves
28e5141079 Update README.md 2020-06-14 01:15:27 -05:00
Ben Reaves
d29579e0a5 - Fixed posix grouping for Terminus 2020-06-14 00:58:00 -05:00
Ben Reaves
dcd8191bfb Merge pull request #211 from rbreaves/dev
- Sped up installer, improved mac kb & budgie support
2020-06-13 19:30:56 -05:00
Ben Reaves
5b4269fc1f - Allowing galliumOS shortcut keys to apply to any XFCE DE 2020-06-13 19:27:17 -05:00
Ben Reaves
1fc62a54da - Proper Budgie detection, improved mac kb support (hid/spi), installs faster. 2020-06-13 19:25:06 -05:00
Ben Reaves
4c8d8412b8 - converted dename.sh to tabs only 2020-06-13 18:08:55 -05:00
Ben Reaves
6cb66a6b72 Updated resources to include Win10 touchpad driver 2020-06-13 17:22:12 -05:00
Ben Reaves
7c36021642 - Removed another reference to old KintoWin VM Linux 2020-06-13 17:00:29 -05:00
Ben Reaves
3622eeb279 Update README.md 2020-06-13 16:22:54 -05:00
Ben Reaves
a82632fc63 Update README.md 2020-06-13 16:16:15 -05:00
Ben Reaves
3d55b232a9 Merge pull request #210 from rbreaves/dev
- Removed the Windows based Linux VM install option, not needed.
2020-06-13 16:14:02 -05:00
Ben Reaves
d68ca6226c - Removed the Windows based Linux VM install option. No longer needed with registry keyswap removal. 2020-06-13 16:13:07 -05:00
Ben Reaves
9d5ac9142b Merge pull request #209 from rbreaves/dev
- Ubuntu Budgie 20.04 Patch Update
2020-06-13 01:58:25 -05:00
Ben Reaves
87a4c6934d - Updated Budgie patch to use the proper fork for Ubuntu Budgie 20.04 2020-06-13 01:36:36 -05:00
Ben Reaves
7b67a4988e Merge branch 'master' into dev 2020-06-13 01:35:24 -05:00
Ben Reaves
f0404299ac Update README.md 2020-06-12 03:10:27 -05:00
Ben Reaves
894c7b7a69 Update README.md 2020-06-12 02:23:35 -05:00
Ben Reaves
bcabd5d65b Update README.md 2020-06-12 02:20:43 -05:00
Ben Reaves
ffab720b50 Update README.md 2020-06-12 02:18:59 -05:00
Ben Reaves
57d430ae36 Updated readme 2020-06-12 01:38:17 -05:00
Ben Reaves
49613ec470 Merge pull request #208 from rbreaves/windows
- Improved Windows UX, Added System Tray, Kinto icon assets
2020-06-12 01:29:31 -05:00
Ben Reaves
7c1f92db5b - Kinto system tray preview added to readme 2020-06-12 01:29:13 -05:00
Ben Reaves
329e821440 - Improved Windows UX, Added System Tray, Kinto icon assets 2020-06-12 01:18:40 -05:00
Ben Reaves
046eaa05cd Revert "- Proof of concept cheatsheet feature"
This reverts commit cbb60668e3.
2020-06-12 01:16:52 -05:00
Ben Reaves
7c0a431472 Updated readme with logo revision 2020-06-11 03:13:57 -05:00
Ben Reaves
1b2e7ab57b Updated readme with cleaner logo 2020-06-11 03:04:43 -05:00
Ben Reaves
ea78de7909 Updated readme with new logo 2020-06-09 22:13:39 -05:00
Ben Reaves
dae728d04a Merge pull request #205 from japert/issue-204-non-canonical-homedir
Allow non-canonical homedirs in setup.
2020-06-09 17:15:45 -05:00
Janis Peukert
6578065024 Allow non-canonical homedirs in setup. 2020-06-09 13:01:54 -07:00
Ben Reaves
8f22bc63ff - Fixes on paste in terminals for windows 2020-06-08 12:23:50 -05:00
Ben Reaves
1ed7fa5f73 - renamed file and added shortcuts 2020-06-08 02:01:17 -05:00
Ben Reaves
c9f7b81796 - Fixed back tab after new Alt-Tab fix 2020-06-07 19:22:39 -05:00
Ben Reaves
4f259481f4 - Added back vscode keybindings json file 2020-06-07 16:06:25 -05:00
Ben Reaves
3143f11d4b Merge branch 'dev' 2020-06-07 15:36:53 -05:00
Ben Reaves
520ea7683b - Fixed a mismapped fullscreen toggle for st3 2020-06-07 15:35:49 -05:00
Ben Reaves
ba1471e397 - Additional refinements for Apple and Win keyboards for ahk 2020-06-07 15:29:05 -05:00
Ben Reaves
a00998b1e3 - WIP autohotkey update negates need for logoff/reg modification 2020-06-06 21:29:33 -05:00
Ben Reaves
cbb60668e3 - Proof of concept cheatsheet feature 2020-06-06 03:29:47 -05:00
Ben Reaves
1a0c99a763 Merge pull request #197 from rbreaves/dev
- xkb & windows 10 shortcut fixes
2020-06-01 19:24:48 -05:00
Ben Reaves
0275669be1 - Fixed pasting & various shortcut issues under Windows 10 2020-06-01 19:22:19 -05:00
Ben Reaves
e741989128 - Made formatting improvements 2020-06-01 14:49:49 -05:00
Ben Reaves
0adc44907c - Swapped out unstable pynput with xbindkeys 2020-06-01 03:39:16 -05:00
Ben Reaves
7a2aac9d79 - New terminal wizard for Kinto setup. 2020-06-01 01:56:36 -05:00
Ben Reaves
3899fcf596 - Fixed potential problem in the xkb setup 2020-05-31 20:14:26 -05:00
Ben Reaves
f3df35662b Merge pull request #196 from rbreaves/dev
- Added Windows 10 Emoji Panel Ctrl-Cmd-Spacebar
2020-05-31 16:40:18 -05:00
Ben Reaves
20c93600e1 - Added Windows 10 Emoji Panel Ctrl-Cmd-Spacebar 2020-05-31 16:37:01 -05:00
Ben Reaves
1ab00452b0 Merge pull request #195 from rbreaves/dev
- Fixes RCtrl key on Left Cmd position for Windows using VMs & VS Code remaps. Recloses #191
2020-05-30 19:47:49 -05:00
Ben Reaves
c0bfec035f - Fixes RCtrl key on Left Cmd position for Windows using VMs & VS Code remaps. Recloses #191 2020-05-30 19:46:11 -05:00
Ben Reaves
712b2e0e69 Merge pull request #194 from rbreaves/dev
- Fixed shortcuts by re-ordering code (windows)
2020-05-30 00:12:20 -05:00
Ben Reaves
eb576a6217 - Fixed shortcuts by re-ordering code (windows) 2020-05-30 00:10:03 -05:00
Ben Reaves
06180c3517 Update issue templates 2020-05-29 16:15:02 -05:00
Ben Reaves
8b07fb9037 Merge pull request #193 from rbreaves/dev
- Sublime text remaps in VS Code now optional (linux). Closes #191
2020-05-29 16:07:52 -05:00
Ben Reaves
b34dc4e928 - Sublime text remaps in VS Code now optional (linux). Closes #191 2020-05-29 16:06:40 -05:00
Ben Reaves
7a07382d30 Merge pull request #190 from rbreaves/dev
- Added cmd-t/w - open/close tabs to win terminals
2020-05-29 15:35:20 -05:00
Ben Reaves
2ffe639024 - Resolves multi-language support under xkeysnail. Closes #192. 2020-05-29 15:33:53 -05:00
Ben Reaves
8dc05e7ace Update README.md 2020-05-27 15:08:37 -05:00
Ben Reaves
4c5cb36503 - Added cmd-t/w - open/close tabs to win terminals 2020-05-27 02:38:14 -05:00
Ben Reaves
8fdaaf592d Merge pull request #189 from rbreaves/dev
- Added support for Windows 10 Hosts w/ Kinto & running Linux VMs
2020-05-26 22:03:57 -07:00
Ben Reaves
6b4c697dd0 - Added support for Windows 10 Hosts w/ Kinto & running Linux VMs 2020-05-27 00:02:41 -05:00
Ben Reaves
e2a767fbec Merge pull request #188 from rbreaves/dev
- Added proper Ctrl/Alt + Backspace behavior for Linux remap. Closes #187
2020-05-23 16:06:40 -05:00
Ben Reaves
7fe9230b5f - Added proper Ctrl/Alt + Backspace behavior for Linux remap. Closes #187 2020-05-23 16:02:32 -05:00
Ben Reaves
1d088b2e1d Typo correction 2020-05-20 01:29:14 -05:00
Ben Reaves
e63d8ee5b5 Merge pull request #184 from rbreaves/dev
- Adding basic hotkey functions for apps
2020-05-18 14:23:47 -05:00
Ben Reaves
e3d42651b7 - Adding basic hotkey functions for apps 2020-05-18 14:21:31 -05:00
Ben Reaves
42c04d062e Merge pull request #183 from rbreaves/dev
Extension of #182 merge and added mate support
2020-05-18 14:09:51 -05:00
Ben Reaves
ca54bf89d6 - Part of #182 merge, brings back Ctrl-a/e functionality for GUI apps. 2020-05-18 14:03:43 -05:00
Ben Reaves
772413a9c3 Merge pull request #182 from Mahoney-forks/fix-ctl-a-beginning-of-line
Make toggle-application-view shortcut more mac like
2020-05-18 13:44:20 -05:00
Robert Elliot
bbd7b3fc93 Make toggle-application-view shortcut more mac like
Toggle-application-view defaults to `<Super-a>` (virtual)/`<Ctrl-a>` (physical)
This clashed with using `<Ctrl-a>` for move cursor to beginning of line (OS/X).
`LaunchB` seems the closes OS/X analogue - FN-F4.
2020-05-18 11:40:57 +01:00
Ben Reaves
98120062eb - Added linux mint and mate support 2020-05-16 02:52:25 -05:00
Ben Reaves
637a8fecaa Merge pull request #178 from rbreaves/dev
- Improved xfce4 support, added xfce4-terminal. Fixed xkeysnail issue.
2020-05-16 01:03:40 -05:00
Ben Reaves
ad53b7034d - Improved support for xfce4 with Ubuntu, xubuntu, voyager. Fixed In-app switching bug. 2020-05-15 20:49:48 -05:00
Ben Reaves
896c6fd6a1 - Added xfce4-terminal 2020-05-15 20:19:15 -05:00
Ben Reaves
dbaf02f884 Merge pull request #177 from rbreaves/dev
- Setup fixes for xkeynail install
2020-05-15 13:45:15 -05:00
Ben Reaves
79857af79c - Setup fixes for xkeynail install 2020-05-15 13:43:21 -05:00
Ben Reaves
53206855f4 Merge pull request #174 from rbreaves/dev
- Budgie patch for App Switching. Also fixes Ctrl-Tab regression.
2020-05-14 23:52:14 -05:00
Ben Reaves
6298c6c9cc - xkeysnail modifier key persistance regression temp fix. 2020-05-14 20:56:55 -05:00
Ben Reaves
318efcc3fd - Adds additional tab switching to Code/ium. Closes #173 2020-05-14 18:19:03 -05:00
Ben Reaves
2567f5006e - Added support for Ubuntu Budgie. Fixed App Switching bug. 2020-05-13 16:17:57 -05:00
Ben Reaves
fd648d3850 - Added Tilix, default terminal in Ubuntu Budgie 2020-05-12 17:26:13 -05:00
Ben Reaves
ac34350392 Merge pull request #171 from rbreaves/dev
- Added mate-terminal to kinto
2020-05-11 21:55:32 -05:00
Ben Reaves
8df691a52d - Added mate-terminal to kinto 2020-05-11 21:54:05 -05:00
Ben Reaves
11f8e33fdf Merge pull request #170 from rbreaves/dev
- Fixes manjaro install issue (gcc). closes #168.
2020-05-11 19:48:51 -05:00
Ben Reaves
7de111726b - Fixes install issue of kinto xkeysnail implementation on manjaro. Adds gcc check, closes #168. 2020-05-11 19:30:19 -05:00
Ben Reaves
5a12521b58 Merge pull request #165 from rbreaves/dev
- Added optional sublime to vs code keymaps to menu, improved ctrltab for windows
2020-05-10 12:48:02 -05:00
Ben Reaves
ad196c4d6b - Added ST3 keymap match all for VS Code on chromebooks 2020-05-10 02:27:01 -05:00
Ben Reaves
17a877c693 - Improved CtrlTab to work with more apps under Windows 10 2020-05-08 18:24:07 -05:00
Ben Reaves
0c3e03a81b Merge pull request #160 from rbreaves/documentation
- Updated readme to include Fluent Terminal for Windows
2020-05-08 15:00:22 -05:00
Ben Reaves
163117d4fb - Updated readme to include Fluent Terminal for Windows 2020-05-08 14:35:16 -05:00
Ben Reaves
4c8ae68027 - Adds some optional ST3 keymaps to VS Code on Windows (#159)
* - Added commented out sublime text keymaps for VS Code under Windows

* - Added cmd.exe to kinto.ahk for Windows

* - Added support for Fluent Terminal on Windows

* - Firefox paste fix for Windows

* - Added Sublime hotkeys to VS Code to setup for windows

* - Added refresh of environment variables after possible package installs on Windows
2020-05-08 14:18:56 -05:00
Ben Reaves
ed771f4ae4 - Added refresh of environment variables after possible package installs on Windows 2020-05-08 14:12:35 -05:00
Ben Reaves
9d5c7b6230 - Added Sublime hotkeys to VS Code to setup for windows 2020-05-08 14:06:35 -05:00
Ben Reaves
b85b786dcc - Firefox paste fix for Windows 2020-05-08 03:46:34 -05:00
Ben Reaves
7904be6d5c - Added support for Fluent Terminal on Windows 2020-05-08 03:26:11 -05:00
Ben Reaves
df5d2d8c0e - Added cmd.exe to kinto.ahk for Windows 2020-05-08 02:47:00 -05:00
Ben Reaves
a556f1afa9 - Added commented out sublime text keymaps for VS Code under Windows 2020-05-07 22:24:23 -05:00
Ben Reaves
61fe293af8 Merge pull request #158 from rbreaves/dev
- Improved setup.py, added full and region screenshots for Windows
2020-05-07 20:23:31 -05:00
Ben Reaves
3ac264ea99 - Added full and region screenshots to Windows. Updated setup.py for Windows. 2020-05-07 20:16:40 -05:00
Ben Reaves
32111fe5a4 Merge pull request #157 from rbreaves/documentation
- Readme updated with ToC and resources
2020-05-07 16:51:18 -05:00
Ben Reaves
dff590e7df Merge pull request #156 from rbreaves/documentation
- Readme updated with ToC and resources
2020-05-07 16:50:29 -05:00
Ben Reaves
bc27f3c205 - Readme updated with ToC and resources 2020-05-07 16:48:03 -05:00
Ben Reaves
4c820d9f67 Merge branch 'dev' 2020-05-07 13:11:04 -05:00
Ben Reaves
8e6f1962e0 - Added fix for proper restoration of all mutter related keybinds 2020-05-07 13:10:37 -05:00
Ben Reaves
59521772af Merge pull request #155 from rbreaves/dev
- Added terminals & improved uninstaller
2020-05-07 13:00:22 -05:00
Ben Reaves
099b3cea88 - Fixed Uninstaller to better location and improved it. Closes #154 2020-05-07 12:56:56 -05:00
Ben Reaves
e1b3911546 - Added terminal tab switching for kitty 2020-05-06 12:17:26 -05:00
Ben Reaves
7bf3ccdda3 - Added alacritty support for kintox11 2020-05-06 12:08:46 -05:00
Ben Reaves
029d83ad5b - Added alacritty support for xkeysnail 2020-05-06 11:40:27 -05:00
Ben Reaves
5da49257dc Merge pull request #153 from rbreaves/dev
- Fixed Cmd-Tilde to switch within single app context. Closes #151
2020-05-05 23:00:51 -05:00
Ben Reaves
b529a5b14a - Fixed Cmd-Tilde to switch within single app context 2020-05-05 22:56:06 -05:00
Ben Reaves
fcb823bb2f Merge pull request #150 from rbreaves/dev
Allow c code to be detectable to GitHub
2020-05-05 01:31:02 -05:00
Ben Reaves
69acc58487 Allow c code to be detectable to GitHub 2020-05-05 01:30:18 -05:00
Ben Reaves
50e6dfd863 Merge pull request #149 from rbreaves/dev
Updated project to be classified as python over c
2020-05-05 01:28:07 -05:00
Ben Reaves
0843103eda Updated project to be classified as python over c 2020-05-05 01:26:52 -05:00
Ben Reaves
a52bf9959d Merge pull request #148 from rbreaves/dev
Made readme clearer (Terminal Keys Table)
2020-05-05 00:48:48 -05:00
Ben Reaves
fbea226894 Made readme clearer (Terminal Keys Table) 2020-05-05 00:46:31 -05:00
Ben Reaves
e6db6a9726 Merge pull request #147 from rbreaves/dev
Updated readme to be more clear about Manjaro IBus issue
2020-05-04 12:55:13 -05:00
Ben Reaves
05b0694776 Updated readme to be more clear about Manjaro IBus issue 2020-05-04 12:45:57 -05:00
Ben Reaves
d6c98a345c Merge pull request #146 from rbreaves/dev
- Updated shortcuts to install last during xkeysnail install
2020-05-04 11:47:17 -05:00
Ben Reaves
bf84cb3153 - Updated shortcuts to install last during xkeysnail install 2020-05-04 11:45:27 -05:00
Ben Reaves
c98268c287 Merge pull request #145 from rbreaves/dev
- Relocated files not relevant to install under references, deleted others
2020-05-03 22:41:26 -05:00
Ben Reaves
a48246d3e3 - Relocated files not relevant to install under references, deleted others 2020-05-03 22:39:07 -05:00
Ben Reaves
ad35946adb Merge pull request #144 from rbreaves/dev
- Case insensitivity for xkey config. General term tab switching restored. Fixes #143
2020-05-03 12:58:43 -05:00
Ben Reaves
3de9a1dd9d - Added case insensitivity to xkeysnail config. Restored general terminal tab switching, was accidentally commented out 2020-05-03 12:52:26 -05:00
Ben Reaves
6aa77a30a8 Merge pull request #142 from rbreaves/dev
- Minor fix for non-elementary terminal keymap
2020-05-02 22:46:33 -05:00
Ben Reaves
376a7edd6f - Minor fix for non-elementary terminal keymap 2020-05-02 22:45:48 -05:00
Ben Reaves
e22cc5b6c7 Merge pull request #140 from rbreaves/dev
- Xkeysnail added to Production branch
2020-05-02 22:02:14 -05:00
Ben Reaves
a7e6ff2374 Merge pull request #141 from rbreaves/master
- Level out dev branch to be the same as master
2020-05-02 22:01:05 -05:00
Ben Reaves
4cae4d2d6f Updated readme 2020-05-02 20:54:46 -05:00
Ben Reaves
9d3cd94ca0 Updated readme 2020-05-02 20:52:49 -05:00
Ben Reaves
9e379363d0 Merge pull request #139 from rbreaves/alpha
- Distro compatibility update for xkeysnail
2020-05-02 20:41:29 -05:00
Ben Reaves
e6b1793348 - Fixed Elementary Terminal tab switching for xkeysnail 2020-05-02 20:38:36 -05:00
Ben Reaves
ae36d7f955 - Added support for Manjaro Gnome and KDE for xkeysnail 2020-05-02 20:09:42 -05:00
Ben Reaves
af9036ec24 - Updated pacman to auto yes in unipkg script. 2020-05-02 19:27:40 -05:00
Ben Reaves
6a4ad3f92a - Added KDE Neon support for xkeysnail 2020-05-02 19:10:51 -05:00
Ben Reaves
954049a251 - Updated unipkg script to autoinstall packages on apt-get 2020-05-02 18:27:56 -05:00
Ben Reaves
78efb69287 - xkeysnail install improvements wip 2020-05-02 17:55:46 -05:00
Ben Reaves
49d9cee349 - Corrected VS Code wordwise further 2020-05-02 13:25:05 -05:00
Ben Reaves
da711e2421 - Disable experimental features on non-dev or alpha branches. 2020-05-02 13:16:24 -05:00
Ben Reaves
b2dd812f3f - Added uninstall shortcuts function to xkeysnail installer 2020-05-02 13:07:18 -05:00
Ben Reaves
39df46ff5e Merge pull request #138 from rbreaves/hotfix
- Fixed another global variable reference
2020-05-02 10:46:22 -05:00
Ben Reaves
45801d9ff0 Merge pull request #137 from rbreaves/hotfix
- Fixed another global variable reference
2020-05-02 10:45:57 -05:00
Ben Reaves
17db80f54c - Fixed another global variable reference 2020-05-02 10:44:43 -05:00
Ben Reaves
a0cfff7395 Merge pull request #136 from rbreaves/hotfix
- Defining global variable within function
2020-05-02 10:41:38 -05:00
Ben Reaves
650ff78b92 Merge pull request #135 from rbreaves/hotfix
- Defining global variable within function
2020-05-02 10:41:11 -05:00
Ben Reaves
7c0e22e33f - Defining global variable within function 2020-05-02 10:40:27 -05:00
Ben Reaves
48170b9ad7 Merge pull request #133 from rbreaves/hotfix
- Updated IBus setup for Fedora
2020-05-01 23:30:18 -05:00
Ben Reaves
1626443290 Merge pull request #132 from rbreaves/hotfix
- Updated IBus setup for Fedora
2020-05-01 23:28:58 -05:00
Ben Reaves
670d948ab0 - Updated IBus setup for Fedora 2020-05-01 23:27:35 -05:00
Ben Reaves
b5f533a83b - Improved VS Code wordwise to work without any VS Code keybinding modifications required. 2020-05-01 22:45:33 -05:00
Ben Reaves
31d7c736b0 - Better VS Code wordise fix for xkeysnail 2020-05-01 22:05:01 -05:00
Ben Reaves
268a1bdbff - Updated xkeysnail install to refer to my own fork to ensure users have the latest customizations 2020-05-01 21:06:10 -05:00
Ben Reaves
c0b12f1627 Merge pull request #131 from rbreaves/hotfix
- Fixes desktop autostart shortcut for kinto xkb, and cleanup issue
2020-04-30 13:18:25 -05:00
Ben Reaves
76e69ecc25 Merge pull request #130 from rbreaves/hotfix
- Fixed possible issue with Kinto xkb desktop login shortcut
2020-04-30 13:16:29 -05:00
Ben Reaves
bae786c3af - Fixed possible issue with Kinto xkb desktop login shortcut 2020-04-30 13:15:22 -05:00
Ben Reaves
701bf25c69 - Proper closing of kintox11 on logout 2020-04-28 16:53:24 -05:00
Ben Reaves
fc551d265b - Proper closing of kintox11 on logout 2020-04-28 16:44:19 -05:00
Ben Reaves
4e428e79c1 Updated readme to reference older shortcut method 2020-04-28 15:51:47 -05:00
Ryan Reaves
da1e38d751 - Added grave for reverse Ctrl+Tab, GalliumOS. 2020-04-28 02:02:32 -05:00
Ryan Reaves
303023d90f - Corrected Cmd+Tab remaps for GalliumOS 2020-04-28 01:48:48 -05:00
Ben Reaves
e4d710d5ae - Corrected Cmd+Tab remaps for Gnome and KDE w/ xkeysnail 2020-04-28 00:59:29 -05:00
Ben Reaves
3f5064c28c - Added Nautilus Cmd-Arrows hotkeys for traversing directories. Closes #118 2020-04-27 20:13:21 -05:00
Ben Reaves
00cc80036c - Corrected issue that prevented all xkeysnail service related threads from closing after service stops 2020-04-27 20:04:00 -05:00
Ben Reaves
2f3e59b80c Additional key legend for readme 2020-04-27 17:05:22 -05:00
Ben Reaves
ce125d4c1f Additional format and description changes 2020-04-27 17:01:43 -05:00
Ben Reaves
31baab1b34 Fixed formatting in readme 2020-04-27 16:58:44 -05:00
Ben Reaves
c442a0fceb - Corrected typo that broke xkeysnail install. Closes #127 2020-04-27 16:31:54 -05:00
Ben Reaves
bd84ad9cfc - Updated wordwise xkeysnail for word select 2020-04-27 02:03:23 -05:00
Ben Reaves
15f9195da6 - Adds selection based wordwise hotkeys to xkeysnail 2020-04-27 01:37:57 -05:00
Ben Reaves
1743b7d46d Updated readme to include xkeysnail shortcut info 2020-04-27 01:18:27 -05:00
Ben Reaves
496240dfe1 - Resolved inotify support for browsers 2020-04-27 01:11:28 -05:00
Ben Reaves
cb6cf4f886 - Updated service to end additional xkeysnail processes 2020-04-26 23:57:00 -05:00
Ben Reaves
655a5f9027 Updated readme for xkeysnail 2020-04-26 23:33:29 -05:00
Ben Reaves
aff8253831 - Added pip3 to xkeysnail installer 2020-04-26 22:49:10 -05:00
Ben Reaves
1113378617 - Added Kinto xkeysnail to the official setup.py file. Updated installer to use mooz xkeysnail over my own fork of it. 2020-04-26 22:38:05 -05:00
Ben Reaves
6230c189fa - Changed inotify for xkeysnail config to monitor mode 2020-04-26 18:21:33 -05:00
Ben Reaves
ca153cca93 - Proper stop support on caret checking for xkeysnail 2020-04-26 18:08:50 -05:00
Ben Reaves
362c48953e - Added in Chrome buttons for xkeysnail, caret check no detects self to prevent duplicate runs. 2020-04-26 17:28:22 -05:00
Ben Reaves
754b18066f Merge branch 'master' into dev 2020-04-26 17:04:56 -05:00
Ben Reaves
d8b1d2b684 Merge branch 'dev' into alpha 2020-04-26 17:02:31 -05:00
Ben Reaves
5593fdfe5a - Experimental caret checking support for Firefox & Chrome 2020-04-26 16:59:24 -05:00
Ben Reaves
315a6a0541 - Updated xkeysnail installer and permissions 2020-04-26 02:34:57 -05:00
Ben Reaves
0e53a36f99 Merge pull request #123 from rbreaves/dev
- Accepted PR to fix caret check open/close segfault issue.
2020-04-25 15:36:41 -05:00
Ben Reaves
477d276639 - Added new kintox11 binary with caret file check fix 2020-04-25 15:26:18 -05:00
Ben Reaves
406f57e61b Merge pull request #122 from fratajczak/dev
Close streams and check fopen return in check_caret
2020-04-25 15:24:17 -05:00
Ferdinand Ratajczak
4d5aba930f Close streams and check fopen return in check_caret 2020-04-25 19:34:48 +02:00
Ben Reaves
2eb5a33b93 - Corrected some caret check logic, updated autostart for xkeysnail 2020-04-25 03:26:46 -05:00
Ben Reaves
f0f152e21f - More notes about VS Code and Firefox in regards to wordwise 2020-04-24 20:22:37 -05:00
Ben Reaves
696fb6ad7f - Added VS Code wordwise fix for xkeysnail 2020-04-24 20:04:35 -05:00
Ryan Reaves
a66c82d84c - Tweaked caret checking regex to be more specific 2020-04-23 13:57:02 -05:00
Ben Reaves
f134e9d13b - Updated xkey service to use tmp location for config, added wordwise script 2020-04-22 15:41:31 -05:00
Ben Reaves
6eedd8b4f7 - Updated sublimetext hotkeys for xkey and added firefox back/forward hotkeys 2020-04-21 19:09:36 -05:00
Ben Reaves
162aa3e5d0 - Added uninstaller for xkeysnail edition 2020-04-21 18:26:30 -05:00
Ben Reaves
c1e2db9a2e - Updated xkeysnail installer to properly copy desktop autostart and to restart service on config file changes 2020-04-21 18:06:04 -05:00
Ben Reaves
3b802d1d49 - Added xhost fix to the xkey service setup file 2020-04-21 16:17:32 -05:00
Ben Reaves
81ecd3f031 - Added xkeysnail implementation 2020-04-21 02:52:31 -05:00
Ben Reaves
a646ae8227 Merge branch 'dev' into alpha 2020-04-20 19:26:38 -05:00
Ben Reaves
21991b8479 Merge branch 'master' into alpha 2020-04-20 19:26:29 -05:00
Ben Reaves
079cb6e54a - Cleaned up comment formatting for kinto.py xkeysnail config 2020-04-19 16:25:16 -05:00
Ben Reaves
3f493c0472 - Added in wordwise for xkeysnail keymap 2020-04-19 02:51:29 -05:00
Ben Reaves
059f5bea26 - Added more keymaps, most of it sublimetext 2020-04-19 02:03:31 -05:00
Ben Reaves
e1745c0362 - Added xkeysnail config file, intended for use with my fork of xkeysnail 2020-04-18 20:27:00 -05:00
Ben Reaves
08e5a01a89 Merge pull request #114 from rbreaves/dev
- Gnome shortcuts survive reboots, mac_term sets Cmd key better, xbindkeys usage under FF terminates better
2020-04-15 12:55:23 -05:00
Ben Reaves
5e0fccae5d - Adds fix for shortcuts on Gnome DE to survive reboots 2020-04-15 12:51:47 -05:00
Ben Reaves
ac87e8f144 - Resolved Cmd-Tab bug with terminals under KDE 2020-04-15 02:01:00 -05:00
Ben Reaves
4cbc665cd3 Merge pull request #113 from rbreaves/dev
- Cmd-Tab for KDE tweaked to make it work better with Firefox and GUI…
2020-04-14 12:50:04 -05:00
Ben Reaves
d11598077d - Cmd-Tab for KDE tweaked to make it work better with Firefox and GUI apps 2020-04-14 02:03:46 -05:00
Ben Reaves
7197b5bb39 Merge pull request #111 from rbreaves/dev
- Full Uninstaller Added for All DE's in setup.py
2020-04-13 23:45:30 -05:00
Ben Reaves
543a10884d - Added XFCE full uninstaller 2020-04-13 23:43:52 -05:00
Ben Reaves
6c8bcb8d7c - Added KDE backup and restore hotkeys to uninstaller 2020-04-13 23:08:50 -05:00
Ben Reaves
7ec0b0ad7e Merge pull request #110 from rbreaves/dev
- Improved Uninstaller for Gnome, Opens up KDE keymaps better
2020-04-13 01:31:57 -05:00
Ben Reaves
e885fa0033 - Added Uninstaller for Gnome DE, restore and reset hotkey options. 2020-04-12 23:57:25 -05:00
Ben Reaves
97e6ed076a - Terminal under KDE still back cycles with this fix, will need to contact KDE/Task Switcher maintainer to fix. 2020-04-12 19:55:37 -05:00
Ben Reaves
e3d693cfcd - Resetting KDE maximize window to use Ctrl+Cmd+F & Alt+F10 2020-04-12 19:10:41 -05:00
Ben Reaves
a06d983b97 Merge pull request #109 from rbreaves/master
Not really merging anything
2020-04-12 18:52:36 -05:00
Ben Reaves
eb691d5174 - Correcting logic for detecting kde 2020-04-12 18:47:32 -05:00
Ben Reaves
5922e1b5a9 Merge branch 'dev' - KDE Operations shortcut removed for sublimetext selectall 2020-04-12 16:57:28 -05:00
Ben Reaves
f9e000ef23 - Corrected KDE Operations Menu to no longer conflict on Alt+F3 with Sublimetext selectall 2020-04-12 16:56:46 -05:00
Ben Reaves
eb5e77ffd6 Merge branch 'dev' - Bring back FF to GUI fix 2020-04-12 16:48:10 -05:00
Ben Reaves
8ae3d3b792 Merge branch 'hotfix' into dev 2020-04-12 16:47:02 -05:00
Ben Reaves
e36fa9216b Merge branch 'dev' 2020-04-12 16:43:48 -05:00
Ben Reaves
58d3273f3d Merge branch 'dev' 2020-04-12 17:28:06 -05:00
Ben Reaves
0f6cfb95cc - Updated default keymap descriptions for cleaner install 2020-04-12 17:27:45 -05:00
Ben Reaves
d2e5f25c8d Merge branch 'dev' 2020-04-12 17:02:34 -05:00
Ben Reaves
6529d3b909 - Updated script to start kinto immediately after install 2020-04-12 17:02:01 -05:00
Ben Reaves
eeb87d3434 Merge branch 'dev' 2020-04-12 16:58:51 -05:00
Ben Reaves
fe8b0a2027 - Re-added caps_escape PR to dev 2020-04-12 16:53:37 -05:00
Ben Reaves
4be9043f10 - Corrected new KDE commands for CmdTab app switching 2020-04-12 16:43:33 -05:00
Ben Reaves
65df97e8bf - Fixed Cmd+Tab App Switching for KDE 2020-04-12 16:31:55 -05:00
Ben Reaves
9f3b4b0072 - Added possible fix for maximize in KDE 2020-04-12 14:52:27 -05:00
Ben Reaves
e35e92fdbd - Corrected KDE key remap, but maximize is not fully enabled. It could break Cmd+F under KDE. 2020-04-12 14:26:13 -05:00
Ben Reaves
9c87cb2774 - Fullscreen shortcut removed, glitches Cmd+F 2020-04-12 03:17:07 -05:00
Ben Reaves
3bd45bc627 - Resolved instability issue under KDE and xkb keymaps 2020-04-12 02:43:40 -05:00
Ben Reaves
3b9ce890dc - Corrected merge of setup.py 2020-04-12 00:06:40 -05:00
Ben Reaves
a6688ffc44 - Added comments to mac_gui 2020-04-12 00:00:30 -05:00
Ben Reaves
94128f7dbf - Merged master into dev 2020-04-11 23:40:49 -05:00
Ben Reaves
9a451bd93c Merge pull request #107 from indrekj/caps_escape
Add Caps Lock to Escape modifier
2020-04-11 13:20:11 -05:00
Indrek Juhkam
3dd930d1e5 Add Caps Lock to Escape modifier
There already is "swapescape" which swaps caps lock with escape. I
however don't use Caps Lock and all, and so far have binded it to Escape
on all my systems. I think this can be useful for others as well.
2020-04-11 13:35:52 +03:00
Ben Reaves
462ceb578c Merge pull request #106 from rbreaves/hotfix
- Multithreading added, FF to GUI keymap refresh fix, Hyper term added
2020-04-10 15:43:29 -05:00
Ben Reaves
b958668853 Merge branch 'master' into hotfix 2020-04-10 11:27:42 -05:00
Ben Reaves
1ae333f0ed - Switching btwn FF & GUI apps no longer triggers keymap refresh. Resolves latency #69. 2020-04-10 00:05:55 -05:00
Ben Reaves
0baf62a261 - Added multithreading for on/off input field keymaps 2020-04-09 17:15:16 -05:00
Ben Reaves
f35f75bd30 - Added Hyper for Windows 2020-04-06 03:02:09 -05:00
Ben Reaves
e34ff1c86e Merge pull request #105 from rbreaves/hotfix
- Added Windows Terminal Support
2020-04-06 01:26:01 -05:00
Ben Reaves
89500c97c6 - Added Windows Terminal Support 2020-04-06 01:23:26 -05:00
Ben Reaves
d9225a73ef Merge pull request #104 from rbreaves/hotfix
- Added Ctrl-Z to posix terminals for Windows
2020-04-05 17:40:27 -05:00
Ben Reaves
5f75f66852 - Added Ctrl-Z to posix terminals for Windows 2020-04-05 17:39:28 -05:00
Ben Reaves
7e6011a0a9 Merge pull request #103 from rbreaves/hotfix
- Added ConEmu/Cmder, mintty, and powershell support
2020-04-05 17:05:20 -05:00
Ben Reaves
9608ef95ae - Added ConEmu/Cmder, mintty, and powershell support 2020-04-05 17:04:08 -05:00
Ben Reaves
ab637704de Merge pull request #102 from rbreaves/hotfix
- Remapped Start Menu in Windows to Cmd+Space
2020-04-05 03:06:13 -05:00
Ben Reaves
ed7c68a388 - Remapped Start Menu in Windows to Cmd+Space 2020-04-05 03:05:24 -05:00
Ben Reaves
f8f2df0d65 Merge pull request #101 from rbreaves/hotfix
- Added groupings for Windows ahk script
2020-04-05 00:15:15 -05:00
Ben Reaves
ea70936454 - Added groupings for Windows ahk script 2020-04-05 00:14:18 -05:00
Ben Reaves
4849fb55ac Update README.md 2020-04-04 23:28:00 -05:00
Ben Reaves
fb2f6674ad Merge pull request #100 from rbreaves/hotfix
- Corrected comment
2020-04-04 23:10:14 -05:00
Ben Reaves
dc2f9c332d - Corrected comment 2020-04-04 23:09:30 -05:00
Ben Reaves
42218a3172 Merge pull request #99 from rbreaves/hotfix
- Windows 10, wordwise and close app support
2020-04-04 23:08:37 -05:00
Ben Reaves
6965d81c79 - Windows 10, wordwise and close app support 2020-04-04 23:07:49 -05:00
Ben Reaves
74c66d91cc Merge pull request #98 from rbreaves/hotfix
- Windows 10, proper app switching and in-app tab switching
2020-04-04 22:57:37 -05:00
Ben Reaves
08c02c2b8f - Updated Windows 10 to support proper app switching and in-app tab switching 2020-04-04 22:56:18 -05:00
Ben Reaves
05ead51322 Update README.md 2020-04-04 22:14:00 -05:00
Ben Reaves
deac0cfb0a Update README.md 2020-04-04 22:09:30 -05:00
Ben Reaves
087d7a7d0e Update README.md 2020-04-04 22:08:48 -05:00
Ben Reaves
e755c84b27 Update README.md 2020-04-04 22:07:49 -05:00
Ben Reaves
1a07a55fa9 Update README.md 2020-04-04 22:05:43 -05:00
Ben Reaves
192a640e6c Update README.md 2020-04-04 22:02:27 -05:00
Ben Reaves
ccc081adba Update README.md 2020-04-04 22:00:24 -05:00
Ben Reaves
336d883b03 Merge pull request #97 from rbreaves/hotfix
- Added uninstall option for Windows
2020-04-04 21:36:38 -05:00
Ben Reaves
61e357b5da - Added uninstall option for Windows 2020-04-04 21:35:43 -05:00
Ben Reaves
407f781af0 Merge pull request #96 from rbreaves/hotfix
- Added reg file for keyswap removal
2020-04-04 21:27:06 -05:00
Ben Reaves
4250967d5a - Added reg file for keyswap removal 2020-04-04 21:26:11 -05:00
Ben Reaves
c0785ac045 Merge pull request #95 from rbreaves/hotfix
- Windows 10 & WSL Support Added
2020-04-04 21:19:42 -05:00
Ben Reaves
c57b5a3603 - Updated readme to reflect Windows 10 Support 2020-04-04 21:17:49 -05:00
Ben Reaves
4d423de14b - Added Windows 10 Support 2020-04-04 21:12:16 -05:00
Ben Reaves
ca4f9be6ee - Added sharpkeys config and autohotkey script for mac on Windows parity 2020-04-04 16:29:10 -05:00
Ben Reaves
a144a47836 Merge pull request #93 from rbreaves/hotfix
- Minor changes to NextEvent filter and added capslock options
2020-04-03 17:19:50 -05:00
Ben Reaves
afcb4c3a73 Merge pull request #92 from rbreaves/hotfix
- Minor changes to NextEvent filter and added capslock options
2020-04-03 17:18:40 -05:00
Ben Reaves
2846125c23 - Added more capslock options in response to #91 2020-04-03 17:15:43 -05:00
Ben Reaves
25ce34a2fc - Updated kintox11 to limit window checks to status ConfigureNotify 22 2020-04-02 17:32:39 -05:00
Ben Reaves
e1226afad8 Merge pull request #89 from rbreaves/hotfix
- Partial update for uninstaller
2020-04-02 13:25:45 -05:00
Ben Reaves
ead90abf94 - Partial update for uninstaller 2020-04-02 13:25:03 -05:00
Ben Reaves
5bf6b06917 Merge pull request #88 from indrekj/kitty
Add kitty to terminal emulators list
2020-04-02 10:09:42 -05:00
Indrek Juhkam
e892f045f5 Add kitty to terminal emulators list
See: https://sw.kovidgoyal.net/kitty/
2020-04-02 14:58:47 +03:00
Ben Reaves
00cfd67996 Merge pull request #85 from rbreaves/hotfix
- Updated kintox11 to streamline debug output more
2020-04-01 15:31:02 -05:00
Ben Reaves
c1c473c097 Merge pull request #84 from rbreaves/hotfix
- Updated kintox11 to streamline debug output more
2020-04-01 15:30:24 -05:00
Ben Reaves
969b74adda - Updated kintox11 to streamline debug output more 2020-04-01 15:25:41 -05:00
Ben Reaves
7e6f872983 Update issue templates 2020-04-01 02:38:30 -05:00
Ben Reaves
b50522c5b1 Update issue templates 2020-04-01 02:32:41 -05:00
Ben Reaves
6a887ebdea Update issue templates 2020-04-01 02:27:53 -05:00
Ben Reaves
d7433092ff Update issue templates 2020-04-01 02:25:29 -05:00
Ben Reaves
d670579db8 Update issue templates 2020-04-01 02:21:03 -05:00
Ben Reaves
3389c512e2 - Updated readme to include debug mode 2020-04-01 02:08:47 -05:00
Ben Reaves
703f6131d4 Merge pull request #83 from rbreaves/hotfix
- Added debug parameter
2020-04-01 01:50:57 -05:00
Ben Reaves
f3ab1e043b Merge pull request #82 from rbreaves/hotfix
- Added debug parameter
2020-04-01 01:48:22 -05:00
Ben Reaves
78e537ac71 - Added debug parameter 2020-04-01 01:46:44 -05:00
Ben Reaves
b1851316de - Prep work for proper KDE Plasma 5 hotkey support in KDE Neon 2020-03-30 23:13:35 -05:00
Ben Reaves
812d2a4bcd - Merged hotfixes for konsole fix, ibus, kde-init, and display env 2020-03-30 22:52:36 -05:00
Ben Reaves
997d2dd39f Merge pull request #81 from rbreaves/hotfix
- 3 Fixes, ibus install logic, kde-init, display env set
2020-03-30 22:45:15 -05:00
Ben Reaves
39c40bc315 - 3 Fixes, ibus install logic, kde-init not applying, display will always be set in systemd. 2020-03-30 22:43:21 -05:00
Ben Reaves
16f8b237d5 Merge pull request #78 from rbreaves/hotfix
- Updated defaults.json to resolve konsole intermittent input issue
2020-03-30 21:24:29 -05:00
Ben Reaves
7013d81686 - Updated defaults.json to resolve konsole intermittent input issue 2020-03-30 21:19:52 -05:00
Ben Reaves
daaa1fd352 Merge pull request #76 from rbreaves/hotfix
Updates binary to the latest
2020-03-30 18:55:30 -05:00
Ben Reaves
87ca8e7566 Merge pull request #75 from rbreaves/hotfix
- Recompiled kintox11.c a 2nd time
2020-03-30 18:49:20 -05:00
Ben Reaves
0e4160622f - Recompiled kintox11.c a 2nd time 2020-03-30 18:47:10 -05:00
Ben Reaves
47037d9619 Merge pull request #74 from rbreaves/hotfix
- Recompiled binary with static json-c
2020-03-30 17:25:28 -05:00
Ben Reaves
564360e9fa Merge pull request #73 from rbreaves/hotfix
- Recompiled binary with static json-c
2020-03-30 17:25:02 -05:00
Ben Reaves
91e692c76b - Recompiled binary with static json-c 2020-03-30 17:24:23 -05:00
Ben Reaves
ce31232015 Merge pull request #72 from rbreaves/hotfix
Hotfix
2020-03-30 16:27:20 -05:00
Ben Reaves
6c46696bd4 Merge pull request #71 from rbreaves/hotfix
- Fixed BadWindow errors caused by Destroy and UnmapNotify in Xlib
2020-03-30 16:25:22 -05:00
Ben Reaves
40c8d20513 - Fixed BadWindow errors caused by Destroy and UnmapNotify in Xlib 2020-03-30 16:10:00 -05:00
Ben Reaves
6b6e448e76 Updated readme with arrows to make it more clear. 2020-03-29 01:26:29 -05:00
Ben Reaves
f73a2c8420 Updated readme to include new animation 2020-03-29 00:52:18 -05:00
Ben Reaves
c6605c68cf - Fixes Kinto startup delay on cold boots. Closes #65 2020-03-28 16:04:15 -05:00
Ben Reaves
557ba01eac - Merged hotfix for xbkcomp error message 2020-03-10 13:24:56 -05:00
Ben Reaves
21bfb6faae - Merged hotfix branch with dev 2020-03-09 18:13:56 -05:00
Ben Reaves
b904235653 - Separating xkb types to avoid select-all chrome bug on Super(ctrl)+a 2020-03-09 17:59:46 -05:00
Ben Reaves
1d59d8d643 - Closes ticket #52, adds Ctrl+a/e begin/end to gui 2020-03-07 14:26:37 -06:00
Ben Reaves
df9b8d974e - Fixed workspace switching shortcut for ubuntu and elementaryos 2020-03-06 13:43:51 -06:00
Ben Reaves
4078094e33 - Updated files for fedora and gnome compatibility 2020-03-02 03:24:00 -06:00
Ben Reaves
c8ab5eb4ba - Fixed tab switching issue under elementary Pantheon Terminal 2020-03-02 02:16:05 -06:00
Ben Reaves
2c1fb05920 - Added ibus-setup since it sometimes needs to be ran if it is not set already, also added elementary epiphany browser. Fixed elementary shortcut install trigger. 2020-03-01 20:15:53 -06:00
Ben Reaves
48b3d3f7bd - Fixed workspace switching shortcut 2020-03-01 18:57:28 -06:00
Ben Reaves
68a2d95b72 - Added removal of workspace left and right shortcuts for pop!_os, workspaces move up and down so the hotkeys go there now 2020-03-01 18:38:50 -06:00
Ben Reaves
89beeb427b - Fixed issue related to the F key trigger Control like behavior when shift is held on terminal. Also updated keymap profiles to be set properly on all installs - chromebook update broke it. 2020-03-01 18:09:24 -06:00
Ryan Reaves
d45b8e29dc - Added multicursor fix, particularly for sublime text 2020-03-01 00:03:04 -06:00
Ryan Reaves
7cb14dfbf3 - Added proper shortcuts for browser tab and app switching, updated installer. Chromebook related, galliumOS, xfce. 2020-02-29 23:37:56 -06:00
Ryan Reaves
19381a5528 - Updated files to support app switching on chromebooks with xfce 2020-02-29 17:48:55 -06:00
Ryan Reaves
4a9ced9478 - Removed Cmd+W from closing an app, should and already closes tabs 2020-02-29 14:33:16 -06:00
Ben Reaves
51e86149bc - Fixed workspace change on pop! os, need to apply to rest 2020-02-29 03:59:01 -06:00
Ben Reaves
f9647a5476 - Added notes about Cmd+H not being enabled and added sublime text replace hotkey 2020-02-29 03:34:44 -06:00
Ben Reaves
92b4315da7 Merge branch 'master' into dev 2020-02-29 03:13:22 -06:00
Ben Reaves
5003d6fa9b - Added all shortcuts but minimize and change workspace due to conflict issues 2020-02-29 03:07:50 -06:00
Ben Reaves
4140a06d53 - Updated mac_gui and setup for app cycle 2020-02-29 00:38:09 -06:00
Ben Reaves
3cf480d724 - Fixed broken wordwise, skip by word. 2020-02-28 23:59:16 -06:00
Ben Reaves
2a467f2a26 - Removed unneeded files 2020-02-28 23:49:41 -06:00
Ben Reaves
d695c3f734 - Added App Cycle tab switcher 2020-02-28 21:57:50 -06:00
Ben Reaves
8c2c53cdcd - Updated setup.py with DE hotkey defaults 2020-02-28 13:26:08 -06:00
Ben Reaves
0f064360a4 - All initial system level shortcuts documented 2020-02-28 00:36:49 -06:00
Ben Reaves
998c9bdf28 - Added more shortcut notes 2020-02-27 23:39:24 -06:00
Ryan Reaves
393f45d1d3 - Added shortcut notes for galliumOS/xfce 2020-02-27 22:59:12 -06:00
Ben Reaves
e8a8c0ed56 - Updated mac_gui and term files to better map keys that only concern shift and/or control. 2020-02-26 20:54:23 -06:00
Ben Reaves
c4db31bdf0 - Added early support for app switching on Gnome 2020-02-26 18:15:46 -06:00
Ben Reaves
c6292ee34a - Disabled Alt mod keymap on terminals for now, causing issues with numerics 2020-02-25 02:21:22 -06:00
Ben Reaves
470541d5f8 - Added script for detecting OS and updated xactive.sh for debug reasons 2020-02-25 00:12:44 -06:00
Ben Reaves
5152c0ee6e - Corrected backslash for mac_gui 2020-02-24 01:31:50 -06:00
Ben Reaves
9b97bd9ea6 - Updated mac_term for the changes in added GUI and DE support 2020-02-24 00:02:40 -06:00
Ben Reaves
3f4b5241eb - Added 7 more levels for mac_gui symbols, app switching wip, added G remap for sublime text. 2020-02-23 22:49:18 -06:00
Ben Reaves
324e4d83c6 - Added file that contains references to symbol names 2020-02-23 17:16:49 -06:00
Ben Reaves
eb49a4859f - Fixed apt-get to update before installing packages 2020-02-22 22:36:21 -06:00
85 changed files with 9596 additions and 627 deletions

4
.gitattributes vendored
View File

@@ -1,3 +1,3 @@
*.py linguist-detectable=false
*.py linguist-detectable=true
*.json liguist-detectable=false
*.c linguist-detectable=true
*.c linguist-detectable=true

37
.github/ISSUE_TEMPLATE/bug_report.md vendored Normal file
View File

@@ -0,0 +1,37 @@
---
name: Bug report
about: Create a report to help us improve
title: ''
labels: bug
assignees: rbreaves
---
**Describe the bug**
A clear and concise description of what the bug is.
**Expected behavior**
A clear and concise description of what you expected to happen.
**Install Type:** Bare Metal or VM
**Distro:** Name + Version
**DE:** Gnome, XFCE, KDE
**Branch:** master, dev
**Commit:** git rev-parse --short HEAD
Logs and status if relevant
```
# xkeysnail
sudo systemctl status xkeysnail
sudo journalctl --unit=xkeysnail.service -b
# xkb
systemctl --user status keyswap
journalctl --user-unit=keyswap.service -b
```
**Screenshots**
If applicable, add screenshots to help explain your problem.
**Additional context**
Add any other context about the problem here.

View File

@@ -0,0 +1,20 @@
---
name: Feature request
about: Suggest an idea for this project
title: ''
labels: enhancement
assignees: rbreaves
---
**Is your feature request related to a problem? Please describe.**
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
**Describe the solution you'd like**
A clear and concise description of what you want to happen.
**Describe alternatives you've considered**
A clear and concise description of any alternative solutions or features you've considered.
**Additional context**
Add any other context or screenshots about the feature request here.

10
.github/ISSUE_TEMPLATE/gratitude.md vendored Normal file
View File

@@ -0,0 +1,10 @@
---
name: Gratitude
about: Just wants to give a shout out!
title: ''
labels: gratitude
assignees: rbreaves
---

10
.github/ISSUE_TEMPLATE/question.md vendored Normal file
View File

@@ -0,0 +1,10 @@
---
name: Question
about: Question about Kinto functionality
title: ''
labels: question
assignees: rbreaves
---

3
.gitignore vendored
View File

@@ -1,3 +1,6 @@
.env/
.DS_Store
__pycache__/
xkeysnail/
keybindings_*
mutter_*

View File

@@ -1,74 +1,455 @@
// 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" {
// LEFT to Begin Line or Beginning of word
replace key <LEFT> {
type[Group1]= "ONE_LEVEL_CTRL",
symbols[Group1]= [ Left, Left, NoSymbol,NoSymbol,Left ],
actions[Group1]= [
NoAction(),
RedirectKey(key=<LEFT>,modifiers=Control,clearmods=Mod1),
RedirectKey(key=<HOME>,clearmods=Control),
RedirectKey(key=<HOME>,modifiers=Shift,clearmods=Control+Mod1),
RedirectKey(key=<LEFT>,modifiers=Shift+Control,clearmods=Mod1)
]
};
// Right to End of Line or end of word
replace key <RGHT> {
type[Group1]= "ONE_LEVEL_CTRL",
symbols[Group1]= [ Right, Right, NoSymbol, NoSymbol,Right ],
actions[Group1]= [
NoAction(),
RedirectKey(key=<RGHT>,modifiers=Control,clearmods=Mod1),
RedirectKey(key=<END>,clearmods=Control),
RedirectKey(key=<END>,modifiers=Shift,clearmods=Control+Mod1),
RedirectKey(key=<RGHT>,modifiers=Shift+Control,clearmods=Mod1)
]
};
// Up to Mac Home
replace key <UP> {
type[Group1]= "ONE_LEVEL_CTRL",
// // 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]= [
Up,
Up,
// Base
a,
// Shift
A,
// Super
NoSymbol,
// Shift Super
NoSymbol
],
actions[Group1]= [
NoAction(),
NoAction(),
RedirectKey(key=<HOME>)
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,
NoSymbol
// Alt
Down,
// Shift Alt
Down,
// Control
NoSymbol,
// Shift Control
NoSymbol,
// Super
Down,
// Shift Super
Down
],
actions[Group1]= [
// Base
NoAction(),
// Shift
NoAction(),
RedirectKey(key=<END>)
// 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,
NoSymbol
],
actions[Group1]= [
NoAction(),
RedirectKey(key=<DELE>,clearmods=Mod1),
NoAction()
]
type[Group1]= "ONE_LEVEL_CTRL",
symbols[Group1]= [
BackSpace,
BackSpace,
BackSpace
],
actions[Group1]= [
NoAction(),
NoAction(),
RedirectKey(key=<DELE>,clearmods=Mod1)
]
};
// // Full Print Screen
// // GalliumOS
@@ -99,6 +480,252 @@ default partial xkb_symbols "mac_levelssym" {
// 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> {
@@ -106,11 +733,20 @@ partial xkb_symbols "mac_chrome" {
symbols[Group1]= [
Left,
Left,
NoSymbol,
NoSymbol,
Left
],
actions[Group1]= [
// Base
NoAction(),
RedirectKey(key=<UP>),
// Shift
NoAction(),
// Alt
RedirectKey(key=<FK18>),
// Alt
RedirectKey(key=<FK18>),
// Control
RedirectKey(key=<LEFT>,modifiers=Mod1,clearmods=Control)
]
};
@@ -118,13 +754,27 @@ partial xkb_symbols "mac_chrome" {
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(),
RedirectKey(key=<DOWN>),
// Shift
NoAction(),
// Alt
RedirectKey(key=<FK18>),
// Shift Alt
RedirectKey(key=<FK18>),
// Control
RedirectKey(key=<RGHT>,modifiers=Mod1,clearmods=Control)
]
};

View File

@@ -2,14 +2,14 @@ default partial xkb_symbols "mac_apple" {
key <LWIN> {
repeat= no,
type= "ONE_LEVEL",
symbols[Group1]= [ Hyper_L ],
actions[group1]=[ SetMods(modifiers=Shift+Control) ]
symbols[Group1]= [ Control_L ],
actions[group1]=[ SetMods(modifiers=Control+Shift) ]
};
key <RWIN> {
repeat= no,
type= "ONE_LEVEL",
symbols[Group1]= [ Hyper_R ],
actions[group1]=[ SetMods(modifiers=Shift+Control) ]
symbols[Group1]= [ Control_R ],
actions[group1]=[ SetMods(modifiers=Control+Shift) ]
};
};
partial xkb_symbols "mac_win" {
@@ -27,19 +27,110 @@ partial xkb_symbols "mac_win" {
};
};
partial xkb_symbols "mac_global" {
// Page Up
replace key <UP> {
// // 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]= [
Up,
Up,
NoSymbol ],
q,
Q,
F4
],
actions[Group1]= [
NoAction(),
NoAction(),
RedirectKey(key=<PGUP>,clearmods=Shift+Control)
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",
@@ -56,36 +147,40 @@ partial xkb_symbols "mac_global" {
};
// HOME
replace key <LEFT> {
type[Group1]= "ONE_LEVEL_CTRL",
type[Group1]= "ONE_LEVEL_CMD",
symbols[Group1]= [
Left,
Left,
NoSymbol
NoSymbol,
Left
],
actions[Group1]= [
NoAction(),
NoAction(),
RedirectKey(key=<HOME>,clearmods=Shift+Control)
RedirectKey(key=<HOME>,clearmods=Shift+Control),
RedirectKey(key=<LEFT>,mods=Super,clearmods=Control)
]
};
// END
replace key <RGHT> {
type[Group1]= "ONE_LEVEL_CTRL",
type[Group1]= "ONE_LEVEL_CMD",
symbols[Group1]= [
Right,
Right,
NoSymbol
NoSymbol,
Right
],
actions[Group1]= [
NoAction(),
NoAction(),
RedirectKey(key=<END>,clearmods=Shift+Control)
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_CTRL",
type[Group1]= "ONE_LEVEL_CMD",
symbols[Group1]= [
3,
numbersign,
@@ -100,7 +195,7 @@ partial xkb_symbols "mac_global" {
// Region Print Screen
// Standard Ubuntu
replace key <AE04> {
type[Group1]= "ONE_LEVEL_CTRL",
type[Group1]= "ONE_LEVEL_CMD",
symbols[Group1]= [
4,
dollar,

View File

@@ -1,15 +1,53 @@
default partial xkb_types "addmac_levels" {
Virtual_modifiers Super;
type "ONE_LEVEL_CTRL" {
modifiers= Mod1+Control+Shift;
map[Mod1]= Level2;
map[Control]= Level3;
map[Mod1+Control]= Level3;
map[Shift+Control]= Level4;
map[Shift+Mod1] = Level5;
level_name[Level1]= "Base";
level_name[Level2]= "Alt";
level_name[Level3]= "Control";
level_name[Level4]= "Shift with Control";
level_name[Level5] = "Shift Alt";
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,10 +1,53 @@
default partial xkb_types "addmac_levels" {
Virtual_modifiers Super;
type "ONE_LEVEL_CTRL" {
modifiers= Shift+Control;
map[Shift]= Level2;
map[Shift+Control]= Level3;
level_name[Level1]= "Base";
level_name[Level2]= "Alt";
level_name[Level3]= "With Control";
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";
};
};

680
README.md
View File

@@ -1,34 +1,85 @@
# Kinto
![alt text](https://raw.githubusercontent.com/rbreaves/kinto/master/Kinto.png)
![kinto-color-132](https://user-images.githubusercontent.com/10969616/84361571-7d5bd780-ab91-11ea-81bc-4d3a2ca51c4e.png)
[![GitHub release](https://img.shields.io/github/release/rbreaves/kinto.svg)](https://github.com/rbreaves/kinto/releases/latest)
![alt text](https://github.com/rbreaves/kinto/blob/master/splash.png)
\- Type in Linux & Windows like it's a Mac. \-
\- Type in Linux like it's a Mac. \-
Seamless copy and paste with all apps and terminals. The zero effort solution.
Seamless copy and paste with all apps and terminals. Also the only linux remapper that is aware of your cursor/caret status - meaning it avoids shortcut conflicts within an app versus wordwise shortcuts when a text field is in use.
## Table of Contents
[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 (Linux)](#How-to-install-Linux)
[How to install (Windows)](#How-to-install-Windows)
[Shortcut Creation (Xkeysnail)](#Shortcut-Creation-Xkeysnail)
[Shortcut Creation (Autohotkey)](#Shortcut-Creation-Autohotkey)
[Other Notes Related to Install](#Other-Notes-Related-to-Install)
[How to Upgrade/Control Kinto](#How-to-Upgrade-Kinto)
[Troubleshooting](#Troubleshooting)
[Language Support](#Language-Support)
[Related or Useful Resources](#Related-or-Useful-Resources)
[Contributing](#Contributing)
[More information about Kinto](#More-information-about-Kinto)
[License](#License)
[Credits and Contributions](#Credits-and-Contributions)
## What does this do exactly?
Kinto works for standard Windows, Apple and Chromebook keyboards. The following however describes the dynamic rebinding based on a standard Windows keyboard. (Alt location is Cmd for Apple keyboards)
- Normal apps - Alt will be Ctrl, Win/Super will be Alt, Ctrl will be Win/Super
- Terminal apps - Alt will be Ctrl+Shift, Win/Super will be Alt, Ctrl will be Ctrl
Kinto works for standard Windows, Apple and Chromebook keyboards. The following however describes the dynamic rebinding based on a standard Windows/Mac keyboard.
- Cursor/word-wise shortcut keys have been added to align with macOS keyboard shortcuts.
**GUI**
|**Physical**| Ctrl | Win/Alt | Alt/Cmd | Spacebar|
|---|---|---|---|---|
|**Virtual**| Win/Super* | Alt | RCtrl |Spacebar|
*Win/Super will properly remap to LCtrl when needed to fully support expected keymaps.
**Terminal**
|**Physical**| Ctrl | Win/Alt | Alt/Cmd | Spacebar|
|---|---|---|---|---|
|**Virtual**| LCtrl | Alt | RCtrl |Spacebar|
## 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 thousand papercuts from trying to support every shortcut key under the sun.
It also retains some of the most commonly used system level shortcut keys, such as Cmd-C/V, Cmd-Tab, and Ctrl-Tab among others. You will keep seamless copy & paste between all apps, ability to switch Windows while still using the physical Cmd/Alt key position; switch tabs in your favorite terminals, code editors, or web browsers. Depending on your OS and/or Desktop Environment you may also be able to switch Virtual Desktop environments the same way as well and other basic system level shortcuts.
If your OS and macOS have similar functionality on the system level, but only differ by a slight difference of a shortcut command then Kinto likely supports it already. If Kinto doesn't have what you need then you can open up a support ticket and it will be added. You can also fork the project to add the fix and I will merge it via a PR you make.
Additionally, if you are using a cross-platform app and if it happens to have a few shortcut keys that differ then that can very easily be added to either the kinto.py or kinto.ahk configuration files which on Windows is located here `~/.kinto/kinto.ahk` and on Linux it can be found here `~/.config/kinto/kinto.py`. More info can be found here [Shortcut Creation (Xkeysnail)](#Shortcut-Creation-Xkeysnail) for Linux.
## What does Kinto require?
- Python (initial install only)
- Python
- systemd
- x11
- IBus*
- Fedora/RHEL/Manjaro/Arch/Debian/Ubuntu based distro 16.04+
Binary is included and will be installed, but you can also compile kintox11.c on your system. You will need to compile and install json-c first as its libraries will be required to compile and run the program.
- 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.
@@ -36,7 +87,28 @@ On most distros you can confirm navigate to your "Language Support" and set "Key
Wayland support is planned, but not ready yet.
## How to install
### Kinto for Windows 10 Requirements
- [Git for Windows](https://git-scm.com/download/win)
- Powershell - run as Administrator
- [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.
Users can now hotswap between Apple and Windows based keyboards without having to logoff and back on, and Windows is currently the only implementation with a system tray (but this feature is coming to Budgie, XFCE, Mate, Gnome, and lastly KDE).
<img src="https://user-images.githubusercontent.com/10969616/84471498-100c7d00-ac4b-11ea-972d-60c1907831ec.png" width="50%">
<img src="https://user-images.githubusercontent.com/10969616/84471501-10a51380-ac4b-11ea-9e0e-c19a7ebfad6d.png" width="50%">
## How to install (Linux)
1. clone this repo
```
@@ -58,12 +130,123 @@ sudo apt install python3
To Uninstall Kinto
```
./uninstall.sh
./setup.py
```
## How to Install (Windows)
Video Tutorial: [How to Install Kinto.sh on Windows 10](https://youtu.be/sRk8A8krz40)
1. Open Powershell (Right click and Run as Administrator)
2. clone this repo
```
git clone https://github.com/rbreaves/kinto.git
cd kinto
```
3. Install - Select keyboard type
```
py setup.py
```
4. How to make Kinto stay visible in system tray (optional)
<img src="https://user-images.githubusercontent.com/10969616/85195077-2f338c00-b295-11ea-8aa3-e6aa06a9a279.png" width="50%" height="50%">
<img src="https://user-images.githubusercontent.com/10969616/85195079-30fd4f80-b295-11ea-8bcd-257990b77dcb.png" width="50%" height="50%">
<img src="https://user-images.githubusercontent.com/10969616/85195082-322e7c80-b295-11ea-8c81-320dab424c3c.png" width="50%" height="50%">
To Uninstall Kinto - Select Uninstall
```
py setup.py
```
## Shortcut Creation (Xkeysnail)
**GUI Keys**
| Value| Description|Mac/Kinto Equivalent|
| ----- |:--------:|:--------:|
|C,Ctrl|Control|Cmd|
|M,Alt| Alt/Option|Alt/Option|
|Super | Win/Super|Ctrl|
**Terminal Keys**
| Value| Description|Mac/Kinto Equivalent|
| ----- |:--------:|:--------:|
|RC,RCtrl|Right Control → Left & Right Alt/Cmd key|Cmd|
|M,Alt|Alt/Option|Alt/Option|
|LC,LCtrl |Left Control|Ctrl|
You can define new keymaps for your specific app via this method. You also do not have to cancel out the original keybinding if you do not need or want to, but you can do so with "pass_through_key".
### Defining Keymaps Per App
```
# Keybindings for Sublime Text
define_keymap(re.compile("Sublime_text"),{
K("C-h"): pass_through_key, # cancel replace
K("Ctrl-Alt-f"): K("Ctrl-h"), # replace
K("C-M-v"): [K("C-k"), K("C-v")], # paste_from_history
}
```
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.
```
sudo systemctl restart xkeysnail
```
More information can be seen on the readme page of [xkeysnail](https://github.com/mooz/xkeysnail).
## Shortcut Creation (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 have only ran into a single UWP app, and most developers seem to be shying away from it. Kinto currently support "Fluent Terminal" which is a UWP app, but it is also being grouped together with other Terminal apps for hotkey remapping. You may take a look at that, but you may also create 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.**
**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.
@@ -96,325 +279,44 @@ git pull origin master
Under systemd this is how you control Kinto.
Kinto (xkb/x11) = keyswap
Kinto (udev/xkeysnail/x11) = xkeysnail
Status
```
systemctl --user status keyswap
sudo systemctl status xkeysnail
```
Stop (your keymap will return to normal)
```
systemctl --user stop keyswap
sudo systemctl stop xkeysnail
```
Start
```
systemctl --user start keyswap
sudo systemctl start xkeysnail
```
Restart
```
systemctl --user restart keyswap
sudo systemctl restart xkeysnail
```
Enable
```
systemctl --user enable keyswap
sudo systemctl enable xkeysnail
```
Disable
```
systemctl --user disable keyswap
```
## How to Add Setxkbmap Option inside Kinto
To summarize you'll need to pull the partial out of the symbols file the option resides in and then add that to the mac_gui file and lastly reference it in the keymap file(s) you want it in.
symbols directory
```
/usr/share/X11/xkb/symbols/
```
symbols file
```
~/.xkb/symbols/mac_gui
```
keymap files
```
~/.xkb/keymap/kbd.mac.gui
~/.xkb/keymap/kbd.mac.term
```
A more detailed explaination is here.
https://github.com/rbreaves/kinto/issues/50#issuecomment-595953373
## How to Add or Change keymaps for Applications
Note: All of the following is already done in Kinto (but may also change as improvements are made). The following is purely for documentation and example sake as they are real examples of how to leverage the json config to support additional keymaps.
**First it is important to understand how Kinto operates.**
1. It listens for any focus/active window changes
2. It applies the proper keymap based on the programs name.
3. It may monitor your caret/cursor input status, if the app is known to cause shortcut conflicts with wordwise
4. It runs anywhere from 1 to 3 commands to fully remap your computer.
Ok great, we've covered the basics, now what are your options on modifying functionality?
It depends.
Do you want to remap keys using xkb or xbindkeys with xdotool, or something else entirely?
The choice is yours, but I'd recommend xbindkeys with xdotool for anyone that doesn't want to spend the time or learn xkb. I prefer xkb but it completely remaps your keyboard and it could break things if done poorly.
**How to Remap using XBindKeys with Xdotool - Firefox**
1. By default Firefox is mapped with the standard gui based xkb config, and only if no input has focus does it then run xbindkeys to map the Cmd+Left/Right arrow key location to the Back and Forwards functionality you'd expect.
2. The xbindkeys script takes into account the xkb mapping being the base because it is actually remapping Home and End to Back and Forwards as there is no real reason to reload an entire xkb layout.
~/.config/kinto/user_config.json
```
...
{
"name": "firefox",
"run": "setxkbmap -option;xkbcomp -w0 -I$HOME/.xkb ~/.xkb/keymap/kbd.mac.gui $DISPLAY",
"run_onInput": "killall xbindkeys > /dev/null 2>&1",
"run_offInput": "killall xbindkeys > /dev/null 2>&1;xbindkeys -f $HOME/.config/kinto/.firefox-nw",
"symbols": "",
"types": "",
"de": [
2
],
"appnames": [
"Firefox"
]
},
...
```
~/.config/kinto/.firefox-nw
```
"xdotool key --delay 0 --clearmodifiers Control_L+bracketleft"
// Alt/Cmd + Left
Home + Release
"xdotool key --delay 0 --clearmodifiers Control_L+bracketright"
// Alt/Cmd + Right
End + Release
# Note additional keymaps can easily be added to this file and I will accept any PR's with keymaps that align with macs
```
Once you have made your changes you can restart the Kinto service and the changes will take affect.
```
systemctl --user restart keyswap
```
Under normal circumstances this keymap would not have worked well had Firefox not included 2 keymap options for going forwards or back. In the next example, Chrome, you will see how to solve this very same problem but in xkb format and it is the only way to fix it for Chrome due to conflicting with wordwise shortcuts.
Also the choice of xdotool over something like xte (xautomation) was explicit, xdotool allows you to hold down a modifier and continue to repeat the action(s) and xte does not.
**How to Remap Using XKB - Chrome**
This gets to be a little more complicated, but this is what you have to do to accomplish the same on the xkb level.
**Summary**
1. Copy ~/.xkb/keymap/kbd.mac.gui and append the name of the app. (e.g. chrome)
2. Edit ~/.xkb/keymap/kbd.mac.gui.chrome
3. Add new keybindings to ~/.xkb/symbols/mac_gui
4. Only edit types if you absolutely need to add another modifier level (~/.xkb/types/mac_gui)
Understand that as you add or modify the ~/.xkb/symbols/ files that these two groups **symbols[Group1]** and **actions[Group1]** will be following the order of the modifier levels that are configured in the related ~/.xkb/types/mac_gui or mac_term file.
Also you will have to discover the proper xkb names for keys and that they will often follow *two different* labels/names. eg RGHT vs Right ... **replace key \<RGHT\>** vs **symbols[Group1]= [ Right, ...**.
A good place to get the proper names/labels are these two files.
```
/usr/share/X11/xkb/symbols/us
/usr/share/X11/xkb/symbols/inet
```
Ok, so here are the detailed instructions.
1. cp ~/.xkb/keymap/kbd.mac.gui ~/.xkb/keymap/kbd.mac.gui.chrome
2. nano ~/.xkb/keymap/kbd.mac.gui.chrome
```
# Change mac_gui(mac_levelssym)
...
xkb_symbols { include "pc+us+us:2+inet(evdev)+ctrl(swap_lwin_lctl)+ctrl(swap_rwin_rctl)+mac_gui(mac_levelssym)" };
...
# To +mac_gui(mac_chrome)
xkb_symbols { include "pc+us+us:2+inet(evdev)+ctrl(swap_lwin_lctl)+ctrl(swap_rwin_rctl)+mac_gui(mac_chrome)" };
...
};
```
3. Add your new "partial xkb_symbols" via nano ~/.xkb/symbols/mac_gui
```
partial xkb_symbols "mac_chrome" {
// Back Button
replace key <LEFT> {
type[Group1]= "ONE_LEVEL_CTRL",
symbols[Group1]= [
Left,
Left,
Left
],
actions[Group1]= [
NoAction(),
RedirectKey(key=<UP>),
RedirectKey(key=<LEFT>,modifiers=Mod1,clearmods=Control)
]
};
// Forwards Button
replace key <RGHT> {
type[Group1]= "ONE_LEVEL_CTRL",
symbols[Group1]= [
Right,
Right,
Right
],
actions[Group1]= [
NoAction(),
RedirectKey(key=<DOWN>),
RedirectKey(key=<RGHT>,modifiers=Mod1,clearmods=Control)
]
};
```
~/.config/kinto/user_config.json
```
{
"name": "chrome",
"run": "setxkbmap -option;xkbcomp -w0 -I$HOME/.xkb ~/.xkb/keymap/kbd.mac.gui.chrome $DISPLAY",
"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": [
2
],
"appnames": [
"Chromium",
"Chromium-browser",
"Google-chrome"
]
}
```
4. Not making changes to types but it looks like this. It contains 5 levels of modifiers, Base, Alt, Control, Shift+Control, and Shift+Alt. Additional Levels can and may be added later, but please do not change the order of the Levels or existing symbols files will break!! You can add new levels however without issue.
```
default partial xkb_types "addmac_levels" {
type "ONE_LEVEL_CTRL" {
modifiers= Mod1+Control+Shift;
map[Mod1]= Level2;
map[Control]= Level3;
map[Mod1+Control]= Level3;
map[Shift+Control]= Level4;
map[Shift+Mod1] = Level5;
level_name[Level1]= "Base";
level_name[Level2]= "Alt";
level_name[Level3]= "Control";
level_name[Level4]= "Shift with Control";
level_name[Level5] = "Shift Alt";
};
};
```
Once you have made your changes you can restart the Kinto service and the changes will take affect.
```
systemctl --user restart keyswap
```
## JSON config files
Features
- Unlimited keyboard configurations per App/category (user_config.json - config -> create app object)
- Dynamic Desktop Environment shortcut capabilities (user_config.json - de -> create DE tweak/remap)
Located at ~/.config/kinto/ you will find user_config.json which will look like the following after an install. You can modify the defaults.json file in the root directory of kinto to create additional keyboard layout types/support without needing to modify any of the underlying Kinto code.
You can also add additional Desktop Environment related tweaks to user_config.json in the install directory as well and the installer will prompt you to install them. You may also fork and submit any json or additional .xkb configurations to me for approval if you believe it makes Linux more like typing on a Mac.
```
{"config":[
//
// Each config category contains the category name, and references to the de tweaks
// And contains the default run commands plus what behavior they should exhibit for
// input fields on/off focus, if any.
// Symbols and types are not currently used - may later replace the need for static
// files with xkbcomp.
//
// If you use xbindkeys outside of Kinto then you may want to remove xbindkeys from
// this config after setup or rewrite the command to exclude your own xbindkeys.
//
{
"name":"gui",
"run":"setxkbmap -option;xkbcomp -w0 -I$HOME/.xkb ~/.xkb/keymap/kbd.mac.gui $DISPLAY",
"de":[2],
"appnames":[ "" ],
"run_onInput":"",
"run_offInput": "killall xbindkeys > /dev/null 2>&1",
"symbols":"",
"types":"",
"de":[],
"appnames":[ "" ]
},
{
"name":"term",
"run":"setxkbmap -option;xkbcomp -w0 -I$HOME/.xkb ~/.xkb/keymap/kbd.mac.term $DISPLAY",
"de":[2],
"appnames":[ "Gnome-terminal","konsole","io.elementary.terminal","terminator","sakura","guake","tilda","xterm","eterm" ],
"run_onInput":"",
"run_offInput": "killall xbindkeys > /dev/null 2>&1",
"symbols":"",
"types":"",
"de":[],
"appnames":[ "" ]
}],
// Init - Array that references de objects by their ID and runs the "run" command
// when the app initially runs.
"init": [1],
// detypes - DE's with support or planned support
"detypes":["gnome2","gnome3","kde4","kde5","xfce","i3wm"],
// de - tweak objects and initial command to be ran on start.
//
// Intent - init or gui_term, to signify what type of tweak it is.
// run, run_term, run_gui - run is only relevant for init, and the
// other two relate to gui_term and running under those modes.
"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":""
}]
}
sudo systemctl disable xkeysnail
```
## Learning macOS style hotkeys on Linux
@@ -430,13 +332,25 @@ systemctl --user stop keyswap && setxkbmap -option;setxkbmap -option altwin:swap
### 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.
@@ -448,6 +362,8 @@ echo $DISPLAY
```
nano ~/.config/systemd/user/keyswap.service
sudo nano /etc/systemd/system/xkeysnail.service
```
...
[Service]
@@ -461,18 +377,26 @@ If you continue to have issues then open a ticket and send me the info.
### Keyswap is not occurring, but it was working.
Now that Kinto 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.
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.
@@ -481,12 +405,144 @@ cd ~/.config/kinto
./kintox11
```
## Debug (Linux - xkb method only)
If all else fails you can now run Kinto in debug mode as of 1.0.6-2. The output will become more verbose and I'd recommend running this directly after stopping the service.
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
[mac-precision-touchpad](https://github.com/imbushuo/mac-precision-touchpad) by imbushuo
Windows 10 touchpad to precision touchpad driver
[fusuma](https://github.com/iberianpig/fusuma) by iberianpig
Multitouch gestures with libinput driver on Linux
[Facetime HD Camera for Linux](https://github.com/patjak/bcwc_pcie) by patjak
Linux driver for Facetime HD on macbooks
[Fluent Terminal - Windows only](https://github.com/felixse/FluentTerminal) by felixse
A Terminal Emulator based on UWP and web technologies.
[PowerToys - Windows only](https://github.com/microsoft/PowerToys) by microsoft
Windows system utilities to maximize productivity
[AutoHotKey - Windows only](https://github.com/AutoHotkey/AutoHotkey) by AutoHotkey
AutoHotkey is a powerful and easy to use scripting language for desktop automation on Windows.
[pykeymacs](https://github.com/zhanghai/pykeymacs) by zhanghai
Emacs style keyboard macros implemented in Python
[Dynamic Wallpapers](https://github.com/adi1090x/dynamic-wallpaper) by adi1090x
Simple bash script to set a Dynamic Wallpaper according to certain conditions.
[macify-linux](https://github.com/Jonchun/macify-linux) by JonChun
Automated setup scripts to transform Linux into macOS. (Uses Kinto for key remaps)
[ibus-typing-booster](https://github.com/mike-fabian/ibus-typing-booster) by mike-fabian
ibus-typing-booster is a completion input method for faster typing
[twemoji color font](https://github.com/eosrei/twemoji-color-font) by eosrei
Twitter Unicode 12 emoji color SVGinOT font for Linux/MacOS/Windows
[iTerm2 Color Schemes](https://github.com/mbadolato/iTerm2-Color-Schemes) by mbadolato
Over 225 terminal color schemes/themes for iTerm/iTerm2. Includes ports to Terminal, Konsole, PuTTY, Xresources, XRDB, Remmina, Termite, XFCE, Tilda, FreeBSD VT, Terminator, Kitty...
[espanso](https://github.com/federico-terzi/espanso) by federico-terzi
Cross-platform Text Expander written in Rust
[GalliumOS](https://github.com/GalliumOS/galliumos-distro) by GalliumOS
Docs, issues, and artwork sources for GalliumOS
[eOS-X](https://github.com/ipproductions/eOS-X) by ipproductions
Dark & Light Theme w/ OSX controls for Elementary OS
[Autorandr](https://github.com/phillipberndt/autorandr) by phillipberndt
Auto-detect the connected display hardware and load the appropriate X11 setup using xrandr
[Barrier](https://github.com/debauchee/barrier) by debauchee
Open-source KVM software
[Synergy Free Binaries](https://github.com/amankhoza/synergy-binaries) by amankhoza
The latest freely available Synergy binaries
[Synergy Official](https://symless.com/) by Symless
Latest Official Synergy
[Karabiner-Elements](https://github.com/pqrs-org/Karabiner-Elements) by pqrs-org
Karabiner-Elements is a powerful utility for keyboard customization on macOS Sierra (10.12) or later.
[mbpfan](https://github.com/linux-on-mac/mbpfan) by linux-on-mac
A simple daemon to control fan speed on all MacBook/MacBook Pros (probably all Apple computers) for Linux Kernel 3 and newer
[vala-panel](https://github.com/rilian-la-te/vala-panel) by rilian-la-te
Vala rewrite of SimplePanel - GitHub mirror (Global Menu for XFCE)
## Contributing
I welcome any and all contributors who want to contribute something to this project.
@@ -508,7 +564,7 @@ GPL v2
I would just like to thank a few people here directly that have helped me tremendously with completing this project and without their support, direct, indirect or otherwise I would have had difficulty completing this undertaking. I will list these things off in chronological order mostly.
First off I'd like to thank the Stackoverflow and Stackexchange community. I have probably rubbed some mods the wrong way over there, but the people from the community in general are extremely helpful and gracious and without their contributions would have made this much more difficult. The person I'd like to thank most though from over there is Glen Whitney. Without his detailed explaining of how to rebind keys in xkb this would not have come together at all, as every other remapping solution were non-starters as complexity increases.
First off I'd like to thank the Stackoverflow and Stackexchange community. I have probably rubbed some mods the wrong way over there, but the people from the community in general are extremely helpful and gracious and without their contributions would have made this much more difficult. The person I'd like to thank most though from over there is Glen Whitney. Without his detailed explaining of how to rebind keys in xkb this would not have come together at all, as every other remapping solution were non-starters as complexity increases. *Kinto today no longer uses xkb, but Glen Whitney did provide the basis of a workable method that helped me pursue this method and think it was a worthwhile project to pursue, so for that I thank him.*
Secondarily I'd like to thank Christian Eriksson*, as he provided information that kept me up at night.. literally. Even after I implemented a similar bash script to one he had suggested I knew that fully implementing a c/c++ solution was where Kinto needed to head to and his explaination was better than I remember it being now that I have gone back to read it again. He also never provided a full implementation of a c/c++ solution - he did hit on the pain points pretty well of what one would need to do and watch out for. I am not sure where I got the first example code of implementing a c based solution, but he definitely went over it well.
@@ -517,8 +573,14 @@ Kui and his gist file** was really the c based solution that I found had the few
Lastly these four people were also very helpful to me as well. @probonopd for being one of the first people to install and use Kinto and gave me the initial feedback to include wordwise support! He also has really great articles*** posted on HackerNews & Medium about UI/UX design. Another person I'd like to thank is @owzim, his feedback allowed me to rapidly iterate and fix several bugs to support additional platforms better. The last two are members of the #ubuntu channel in IRC on freenode, tarzeau ( @alexmyczko ) and sarnold. Alex contributing a proper Makefile, so the project can be packaged properly, and sarnold help me find that IBus could resolve an issue I was having with needing to detect the caret status.
**Updated 6/13/2020**
I would also like to thank Jonathan Chun for his patience in helping me work through a very difficult problem related to Alt-Tab switching, which led to the current xkeysnail iteration of Kinto for Linux that far exceeds the original xkb implementation. There are also several others that have created issue tickets that have contributed greatly.
If I left anyone out then I apologize, that was not intentional. I am happy to say that this project is at a state of completion. Bug fixes will primarily be the only activity happening going forward and possibly a rewrite for Wayland at some point. Contributions as mentioned above are welcomed, and will be merged into master if they help with the goal of making typing on linux more like a mac.
*https://askubuntu.com/questions/1010276/can-i-act-on-the-event-that-a-window-opens-without-polling
**https://gist.github.com/kui/2622504
***https://medium.com/@probonopd/make-it-simple-linux-desktop-usability-part-1-5fa0fb369b42

Binary file not shown.

After

Width:  |  Height:  |  Size: 99 KiB

BIN
assets/kinto-black.ico Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 102 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 105 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 106 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 104 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 102 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 105 KiB

BIN
assets/kinto-color.ico Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 106 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 101 KiB

BIN
assets/kinto-white.ico Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 102 KiB

View File

@@ -1,6 +1,6 @@
{"defaultapps":[{
"name":"term",
"appnames":[ "Gnome-terminal","konsole","io.elementary.terminal","terminator","sakura","guake","tilda","xterm","eterm" ]
"appnames":[ "Gnome-terminal","konsole","io.elementary.terminal","terminator","sakura","guake","tilda","xterm","eterm","kitty" ]
}],
"defaulttypes":["windows","mac","chromebook"],
"defaults":[{
@@ -9,9 +9,9 @@
"type":"windows",
"active": false,
"description":"Standard Windows 104 Keyboards",
"gui":"setxkbmap -option;xkbcomp -w0 -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":"+altwin(ctrl_alt_win)+mac_gui(mac_levelssym)",
"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)"
@@ -22,9 +22,9 @@
"type":"mac",
"active": false,
"description":"Standard Mac Keyboards with Apple driver",
"gui":"setxkbmap -option;xkbcomp -w0 -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":"+altwin(ctrl_alt_win)+mac_gui(mac_levelssym)",
"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)",
@@ -36,49 +36,49 @@
"type":"mac",
"active": true,
"description":"Standard Mac Keyboards",
"gui":"setxkbmap -option;xkbcomp -w0 -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":"+ctrl(swap_lwin_lctl)+ctrl(swap_rwin_rctl)+mac_gui(mac_levelssym)",
"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",
"name":"Chromebook (xfce)",
"type":"chromebook",
"active": false,
"description":"Standard Chromebook Keyboards",
"gui":"setxkbmap -option;xkbcomp -w0 -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)",
"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 - Windows",
"name":"Chromebook (xfce) - Windows",
"type":"chromebook",
"active": false,
"description":"Chromebook with Windows 104 Keyboard",
"gui":"setxkbmap -option;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":"setxkbmap -option;xkbcomp -w0 -I$HOME/.xkb ~/.xkb/keymap/kbd.mac.term $DISPLAY 2>&1 | grep -v XF86FullScreen",
"fallbackgui":"setxkbmap -option;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)",
"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 - Mac",
"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)",
"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)"

344
keycheck.py Executable file
View File

@@ -0,0 +1,344 @@
#!/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

@@ -16,11 +16,11 @@ 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
# 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.timer
systemctl --user start keyswap

Binary file not shown.

View File

@@ -2,4 +2,4 @@ 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 -o kintox11
$(CC) kintox11.c $(CFLAGS) $(LDFLAGS) -lm -lpthread -o kintox11

View File

@@ -13,8 +13,11 @@
// 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>
@@ -25,52 +28,54 @@
#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);
}
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);
gettimeofday(&tv,NULL);
return (((long long)tv.tv_sec)*1000)+(tv.tv_usec/1000);
}
int XNextEventTimeout(Display *d, XEvent *e, double seconds, long long event_ts, int last_event, long long *event_ts_ptr, int *last_event_ptr)
{
if (XPending(d) || wait_fd(ConnectionNumber(d),seconds)) {
while (1) {
XNextEvent(d, e);
bool debug;
bool input_check = 0;
long long int event_ts;
int last_event;
long long int new_ts = timeInMilliseconds();
Display* d;
Window w;
XEvent e;
// Make sure window dragging or resizing is not occuring
if(!(e->type == 22 && (e->type == last_event) && timeInMilliseconds()-event_ts < 419)){
*event_ts_ptr = new_ts;
*last_event_ptr = e->type;
break;
}
*event_ts_ptr = new_ts;
*last_event_ptr = e->type;
}
return 0;
} else {
return 1;
}
// 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
}
Bool xerror = False;
char *trimwhitespace(char *str)
{
char *trimwhitespace(char *str){
char *end;
// Trim leading space
while(isspace((unsigned char)*str)) str++;
@@ -84,8 +89,7 @@ char *trimwhitespace(char *str)
return str;
}
int check_caret()
{
int check_caret(){
int caretint;
char * fpname;
fpname = malloc(sizeof(char)*20);
@@ -94,6 +98,9 @@ int check_caret()
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);
@@ -102,6 +109,7 @@ int check_caret()
buffer[size] = '\0';
trimwhitespace(buffer);
caretint = atoi(buffer);
fclose(fp);
if(caretint == 1){
// printf("caret: %s\n", buffer);
return 1;
@@ -115,8 +123,85 @@ int check_caret()
}
}
int in_int(int a[],int size,int item)
{
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++)
{
@@ -139,8 +224,7 @@ int in(const char **arr, int len, char *target) {
return -1;
}
int strcicmp(char const *a, char const *b)
{
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)
@@ -175,15 +259,26 @@ int handle_error(Display* display, XErrorEvent* error){
return 1;
}
Window get_focus_window(Display* d){
Window get_focus_window(Display* d, int etype, char const *eventName, char const *current_app, bool debug){
Window w;
int revert_to;
XGetInputFocus(d, &w, &revert_to); // see man
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\n");
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\n");
printf("*no focus window, e.type: %d, current_app: %s\n",etype,current_app);
exit(1);
}
@@ -194,40 +289,68 @@ Window get_focus_window(Display* d){
// 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){
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,");
while (parent != root && parent != 0) {
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\n",w);
exit(1);
printf("*fail to get top window: %ld, e.type: %d, current_app: %s\n",w,etype,current_app);
break;
}
// printf(" get parent (window: %d)\n", (int)w);
}
// printf("success (window: %d)\n", (int)w);
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){
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);
@@ -258,7 +381,17 @@ const char * str_window_class(Display* d, Window w, char *prior_app ){
}
}
int main(void){
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];
@@ -397,8 +530,6 @@ int main(void){
system(de_run_array[de_id_idx]);
}
Display* d;
Window w;
char *name;
// for XmbTextPropertyToTextList
@@ -430,18 +561,17 @@ int main(void){
printf("Starting keyswap...\n");
// get active window
w = get_focus_window(d);
w = get_top_window(d, w);
w = get_named_window(d, w);
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",str_window_class(d, w,prior_app));
printf("First window name: %s \n\n",str_window_class(d, w,prior_app));
int breakouter;
int last_event=0;
Bool ran_onInput = 0;
long long int event_ts = timeInMilliseconds();
last_event=0;
event_ts = timeInMilliseconds();
for (;;)
{
@@ -480,13 +610,21 @@ int main(void){
}
}
}
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);
// printf("run: %s\n",run_array[category_idx]);
system(run_array[category_idx]);
// 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]);
ran_onInput = 0;
strcpy(run_onInput,run_oninput_array[category_idx]);
strcpy(run_offInput,run_offinput_array[category_idx]);
system(run_offInput);
@@ -494,11 +632,15 @@ int main(void){
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){
// printf("Running de term command: %s\n",de_runterm_array[de_id_idx]);
if(debug == true){
printf("Running de term command: %s\n",de_runterm_array[de_id_idx]);
}
system(de_runterm_array[de_id_idx]);
}
else{
// printf("Running de gui command: %s\n",de_rungui_array[de_id_idx]);
if(debug == true){
printf("Running de gui command: %s\n",de_rungui_array[de_id_idx]);
}
system(de_rungui_array[de_id_idx]);
}
}
@@ -514,40 +656,39 @@ int main(void){
strcpy(prior_app,current_app);
strcpy(prior_category,current_category);
// printf("run_onInput: %ld\n",strlen(run_onInput));
XEvent e;
if(strlen(run_onInput) > 0){
while(XNextEventTimeout(d, &e, .5, event_ts, last_event, &event_ts, &last_event)){
if(check_caret() && ran_onInput == 0){
// printf("run_onInput: %s\n",run_onInput);
system(run_onInput);
ran_onInput = 1;
}
else if(!check_caret() && ran_onInput == 1){
// printf("run_offInput: %s\n",run_offInput);
system(run_offInput);
ran_onInput = 0;
}
}
input_check = 1;
}
else{
while (1) {
XNextEvent(d, &e);
// Make sure window dragging or resizing is not occuring
if(!(e.type == 22 && (e.type == last_event) && timeInMilliseconds()-event_ts < 300)){
// printf("%d == %d\n",e.type, last_event);
// printf("Timestamp: %lld\n",timeInMilliseconds()-event_ts);
event_ts = timeInMilliseconds();
last_event = e.type;
break;
}
event_ts = timeInMilliseconds();
last_event = e.type;
}
input_check = 0;
}
w = get_focus_window(d);
w = get_top_window(d, w);
w = get_named_window(d, w);
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);
}
}

View File

@@ -0,0 +1,432 @@
{"scancode":"01",
"eventcode":1,
"eventname":"ESC"},
{"scancode":"02",
"eventcode":2,
"eventname":"1"},
{"scancode":"03",
"eventcode":3,
"eventname":"2"},
{"scancode":"04",
"eventcode":4,
"eventname":"3"},
{"scancode":"05",
"eventcode":5,
"eventname":"4"},
{"scancode":"06",
"eventcode":6,
"eventname":"5"},
{"scancode":"07",
"eventcode":7,
"eventname":"6"},
{"scancode":"08",
"eventcode":8,
"eventname":"7"},
{"scancode":"09",
"eventcode":9,
"eventname":"8"},
{"scancode":"0a",
"eventcode":10,
"eventname":"9"},
{"scancode":"0b",
"eventcode":11,
"eventname":"0"},
{"scancode":"0c",
"eventcode":12,
"eventname":"MINUS"},
{"scancode":"0d",
"eventcode":13,
"eventname":"EQUAL"},
{"scancode":"0e",
"eventcode":14,
"eventname":"BACKSPACE"},
{"scancode":"0f",
"eventcode":15,
"eventname":"TAB"},
{"scancode":"10",
"eventcode":16,
"eventname":"Q"},
{"scancode":"11",
"eventcode":17,
"eventname":"W"},
{"scancode":"12",
"eventcode":18,
"eventname":"E"},
{"scancode":"13",
"eventcode":19,
"eventname":"R"},
{"scancode":"14",
"eventcode":20,
"eventname":"T"},
{"scancode":"15",
"eventcode":21,
"eventname":"Y"},
{"scancode":"16",
"eventcode":22,
"eventname":"U"},
{"scancode":"17",
"eventcode":23,
"eventname":"I"},
{"scancode":"18",
"eventcode":24,
"eventname":"O"},
{"scancode":"19",
"eventcode":25,
"eventname":"P"},
{"scancode":"1a",
"eventcode":26,
"eventname":"LEFTBRACE"},
{"scancode":"1b",
"eventcode":27,
"eventname":"RIGHTBRACE"},
{"scancode":"1c",
"eventcode":28,
"eventname":"ENTER"},
{"scancode":"1d",
"eventcode":29,
"eventname":"LEFTCTRL"},
{"scancode":"1e",
"eventcode":30,
"eventname":"A"},
{"scancode":"1f",
"eventcode":31,
"eventname":"S"},
{"scancode":"20",
"eventcode":32,
"eventname":"D"},
{"scancode":"21",
"eventcode":33,
"eventname":"F"},
{"scancode":"22",
"eventcode":34,
"eventname":"G"},
{"scancode":"23",
"eventcode":35,
"eventname":"H"},
{"scancode":"24",
"eventcode":36,
"eventname":"J"},
{"scancode":"25",
"eventcode":37,
"eventname":"K"},
{"scancode":"26",
"eventcode":38,
"eventname":"L"},
{"scancode":"27",
"eventcode":39,
"eventname":"SEMICOLON"},
{"scancode":"28",
"eventcode":40,
"eventname":"APOSTROPHE"},
{"scancode":"29",
"eventcode":41,
"eventname":"GRAVE"},
{"scancode":"2a",
"eventcode":42,
"eventname":"LEFTSHIFT"},
{"scancode":"2b",
"eventcode":43,
"eventname":"BACKSLASH"},
{"scancode":"2c",
"eventcode":44,
"eventname":"Z"},
{"scancode":"2d",
"eventcode":45,
"eventname":"X"},
{"scancode":"2e",
"eventcode":46,
"eventname":"C"},
{"scancode":"2f",
"eventcode":47,
"eventname":"V"},
{"scancode":"30",
"eventcode":48,
"eventname":"B"},
{"scancode":"31",
"eventcode":49,
"eventname":"N"},
{"scancode":"32",
"eventcode":50,
"eventname":"M"},
{"scancode":"33",
"eventcode":51,
"eventname":"COMMA"},
{"scancode":"34",
"eventcode":52,
"eventname":"DOT"},
{"scancode":"35",
"eventcode":53,
"eventname":"SLASH"},
{"scancode":"36",
"eventcode":54,
"eventname":"RIGHTSHIFT"},
{"scancode":"37",
"eventcode":55,
"eventname":"KPASTERISK"},
{"scancode":"38",
"eventcode":56,
"eventname":"LEFTALT"},
{"scancode":"39",
"eventcode":57,
"eventname":"SPACE"},
{"scancode":"40",
"eventcode":58,
"eventname":"CAPSLOCK"},
{"scancode":"41",
"eventcode":59,
"eventname":"F1"},
{"scancode":"42",
"eventcode":60,
"eventname":"F2"},
{"scancode":"43",
"eventcode":61,
"eventname":"F3"},
{"scancode":"44",
"eventcode":62,
"eventname":"F4"},
{"scancode":"45",
"eventcode":63,
"eventname":"F5"},
{"scancode":"46",
"eventcode":64,
"eventname":"F6"},
{"scancode":"47",
"eventcode":65,
"eventname":"F7"},
{"scancode":"48",
"eventcode":66,
"eventname":"F8"},
{"scancode":"49",
"eventcode":67,
"eventname":"F9"},
{"scancode":"50",
"eventcode":68,
"eventname":"F10"},
{"scancode":"51",
"eventcode":69,
"eventname":"NUMLOCK"},
{"scancode":"52",
"eventcode":70,
"eventname":"SCROLLLOCK"},
{"scancode":"53",
"eventcode":71,
"eventname":"KP7"},
{"scancode":"54",
"eventcode":72,
"eventname":"KP8"},
{"scancode":"55",
"eventcode":73,
"eventname":"KP9"},
{"scancode":"56",
"eventcode":74,
"eventname":"KPMINUS"},
{"scancode":"57",
"eventcode":75,
"eventname":"KP4"},
{"scancode":"58",
"eventcode":76,
"eventname":"KP5"},
{"scancode":"59",
"eventcode":77,
"eventname":"KP6"},
{"scancode":"5A",
"eventcode":78,
"eventname":"KPPLUS"},
{"scancode":"5B",
"eventcode":79,
"eventname":"KP1"},
{"scancode":"5C",
"eventcode":80,
"eventname":"KP2"},
{"scancode":"5D",
"eventcode":81,
"eventname":"KP3"},
{"scancode":"5E",
"eventcode":82,
"eventname":"KP0"},
{"scancode":"5F",
"eventcode":83,
"eventname":"KPDOT"},
{"scancode":"60",
"eventcode":85,
"eventname":"ZENKAKUHANKAKU"},
{"scancode":"61",
"eventcode":86,
"eventname":"102ND"},
{"scancode":"62",
"eventcode":87,
"eventname":"F11"},
{"scancode":"63",
"eventcode":88,
"eventname":"F12"},
{"scancode":"64",
"eventcode":89,
"eventname":"RO"},
{"scancode":"65",
"eventcode":90,
"eventname":"KATAKANA"},
{"scancode":"66",
"eventcode":91,
"eventname":"HIRAGANA"},
{"scancode":"67",
"eventcode":92,
"eventname":"HENKAN"},
{"scancode":"68",
"eventcode":93,
"eventname":"KATAKANAHIRAGANA"},
{"scancode":"69",
"eventcode":94,
"eventname":"MUHENKAN"},
{"scancode":"6A",
"eventcode":95,
"eventname":"KPJPCOMMA"},
{"scancode":"6B",
"eventcode":96,
"eventname":"KPENTER"},
{"scancode":"6C",
"eventcode":97,
"eventname":"RIGHTCTRL"},
{"scancode":"6D",
"eventcode":98,
"eventname":"KPSLASH"},
{"scancode":"6E",
"eventcode":99,
"eventname":"SYSRQ"},
{"scancode":"6F",
"eventcode":100,
"eventname":"RIGHTALT"},
{"scancode":"70",
"eventcode":102,
"eventname":"HOME"},
{"scancode":"71",
"eventcode":103,
"eventname":"UP"},
{"scancode":"72",
"eventcode":104,
"eventname":"PAGEUP"},
{"scancode":"73",
"eventcode":105,
"eventname":"LEFT"},
{"scancode":"74",
"eventcode":106,
"eventname":"RIGHT"},
{"scancode":"75",
"eventcode":107,
"eventname":"END"},
{"scancode":"76",
"eventcode":108,
"eventname":"DOWN"},
{"scancode":"77",
"eventcode":109,
"eventname":"PAGEDOWN"},
{"scancode":"78",
"eventcode":110,
"eventname":"INSERT"},
{"scancode":"79",
"eventcode":111,
"eventname":"DELETE"},
{"scancode":"7A",
"eventcode":112,
"eventname":"MACRO"},
{"scancode":"7B",
"eventcode":113,
"eventname":"MUTE"},
{"scancode":"7C",
"eventcode":114,
"eventname":"VOLUMEDOWN"},
{"scancode":"7D",
"eventcode":115,
"eventname":"VOLUMEUP"},
{"scancode":"7E",
"eventcode":116,
"eventname":"POWER"},
{"scancode":"7F",
"eventcode":117,
"eventname":"KPEQUAL"},
{"scancode":"80",
"eventcode":118,
"eventname":"KPPLUSMINUS"},
{"scancode":"81",
"eventcode":119,
"eventname":"PAUSE"},
{"scancode":"82",
"eventcode":121,
"eventname":"KPCOMMA"},
{"scancode":"83",
"eventcode":122,
"eventname":"HANGUEL"},
{"scancode":"84",
"eventcode":123,
"eventname":"HANJA"},
{"scancode":"85",
"eventcode":124,
"eventname":"YEN"},
{"scancode":"86",
"eventcode":125,
"eventname":"LEFTMETA"},
{"scancode":"87",
"eventcode":126,
"eventname":"RIGHTMETA"},
{"scancode":"88",
"eventcode":127,
"eventname":"COMPOSE"},
{"scancode":"89",
"eventcode":128,
"eventname":"STOP"},
{"scancode":"8A",
"eventcode":140,
"eventname":"CALC"},
{"scancode":"8B",
"eventcode":142,
"eventname":"SLEEP"},
{"scancode":"8C",
"eventcode":143,
"eventname":"WAKEUP"},
{"scancode":"8D",
"eventcode":155,
"eventname":"MAIL"},
{"scancode":"8E",
"eventcode":156,
"eventname":"BOOKMARKS"},
{"scancode":"8F",
"eventcode":157,
"eventname":"COMPUTER"},
{"scancode":"90",
"eventcode":158,
"eventname":"BACK"},
{"scancode":"91",
"eventcode":159,
"eventname":"FORWARD"},
{"scancode":"92",
"eventcode":163,
"eventname":"NEXTSONG"},
{"scancode":"93",
"eventcode":164,
"eventname":"PLAYPAUSE"},
{"scancode":"94",
"eventcode":165,
"eventname":"PREVIOUSSONG"},
{"scancode":"95",
"eventcode":166,
"eventname":"STOPCD"},
{"scancode":"96",
"eventcode":172,
"eventname":"HOMEPAGE"},
{"scancode":"97",
"eventcode":173,
"eventname":"REFRESH"},
{"scancode":"98",
"eventcode":183,
"eventname":"F13"},
{"scancode":"99",
"eventcode":184,
"eventname":"F14"},
{"scancode":"9A",
"eventcode":185,
"eventname":"F15"},
{"scancode":"9B",
"eventcode":217,
"eventname":"SEARCH"},
{"scancode":"9C",
"eventcode":226,
"eventname":"MEDIA"}

75
references/shortcuts Normal file
View File

@@ -0,0 +1,75 @@
# 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 &

1411
references/symbol_names.txt Normal file

File diff suppressed because it is too large Load Diff

521
setup.py
View File

@@ -1,11 +1,66 @@
#!/usr/bin/env python3
import json, time, os, sys
import json, time, os, sys, subprocess, shlex, platform
from shutil import copyfile
from subprocess import PIPE, Popen
from prekinto import *
homedir = os.path.expanduser("~")
def windows_setup():
keymaps = ["Apple keyboard standard", "Windows keyboard standard","Uninstall"]
for index, item in enumerate(keymaps):
print(" %i. %s" % (index+1, item.capitalize()))
default = 0
while not int(default) in range(1,len(keymaps)+1):
default = int(input("\nPlease enter your desired keymap (1 - " + str(len(keymaps)) + ") : "))
print("")
# Short DOS path notation
path= cmdline('echo %cd%')[:-1]
if default > 0 and default < 3:
print("Will now install chocolatey and autohotkey with elevated privileges...")
print("This install will fail if you are not running with elevated privileges")
os.system('powershell -executionpolicy bypass ".\\windows\\autohotkey.ps1"')
print("Copying autohotkey combinations for Terminals & Editors...")
os.system("copy /Y " + path + "\\windows\\kinto.ahk " + path + "\\windows\\kinto-new.ahk")
if default == 1:
os.system('C:\\Strawberry\\perl\\bin\\perl.exe -pi -e "s/(; )(.*)(; MacModifiers)/$2$3/g" .\\windows\\kinto-new.ahk')
elif default == 2:
os.system('C:\\Strawberry\\perl\\bin\\perl.exe -pi -e "s/(; )(.*)(; WinModifiers)/$2$3/g" .\\windows\\kinto-new.ahk')
elif default == 3:
print("Removing any old registry keys from prior versions...")
p = subprocess.Popen(['powershell.exe', "Remove-ItemProperty -Path HKLM:'SYSTEM\CurrentControlSet\Control\Keyboard Layout' -Name 'Scancode Map' -ErrorAction SilentlyContinue"], stdout=sys.stdout)
print("Removing Kinto from Startup folder...")
os.system("(del \"C:\\ProgramData\\Microsoft\\Windows\\Start Menu\\Programs\\StartUp\\kinto.ahk\") 2> nul")
os.system('(del "%userprofile%\\AppData\\Roaming\\Microsoft\\Windows\\STARTM~1\\Programs\\Startup\\kinto-start.vbs") 2> nul')
print("Ending any running Kinto tasks...")
os.system("(taskkill /IM autohotkey.exe) 2> nul")
print("Removing Kinto from users profile directory...")
os.system('(rd /s /q %userprofile%\\.kinto) 2> nul')
print("")
print("Uninstall of Kinto is Complete.")
if default > 0 and default < 3:
stvscode = yn_choice(bcolors.CYELLOW2 + "Would you like to use Sublime Text 3 keymaps in VS Code?\n" + bcolors.ENDC)
print("\nWill now install Ubuntu Termimnal Theme as default...")
os.system("regedit " + path + "\\windows\\theme_ubuntu.reg")
os.system('robocopy '+ path + '\\assets "%userprofile%\\.kinto\\assets" /E')
if(stvscode):
os.system('C:\\Strawberry\\perl\\bin\\perl.exe -pi -e "s/(; )(.*)(; ST2CODE)/$2$3/g" .\\windows\\kinto-new.ahk')
os.system('copy /Y ' + path + '\\windows\\kinto-start.vbs "%userprofile%\\.kinto\\kinto-start.vbs')
os.system('copy /Y ' + path + '\\windows\\usb.vbs "%userprofile%\\.kinto\\usb.vbs"')
os.system('copy /Y ' + path + '\\windows\\detectUSB.ahk "%userprofile%\\.kinto\\detectUSB.ahk"')
os.system('mklink "%userprofile%\\Start Menu\\Programs\\Startup\\kinto-start.vbs" "%userprofile%\\.kinto\\kinto-start.vbs"')
os.system('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 '+ path + '\\windows\\kinto-new.ahk "%userprofile%\\.kinto\\kinto.ahk"')
os.system("del /f .\\windows\\kinto-new.ahk")
os.system("del \"C:\\ProgramData\\Microsoft\\Windows\\Start Menu\\Programs\\StartUp\\kinto.ahk\" 2> nul")
os.system("%userprofile%\\AppData\\Roaming\\Microsoft\\Windows\\STARTM~1\\Programs\\Startup\\kinto-start.vbs")
# # 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\") 2> nul")
def cmdline(command):
process = Popen(
args=command,
@@ -15,81 +70,310 @@ def cmdline(command):
)
return process.communicate()[0]
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:
if os.name != 'nt':
print("You are not using x11, please logout and back in using x11/Xorg")
sys.exit()
else:
print("\nYou are detected as running Windows.")
windows_setup()
sys.exit()
distro = cmdline("awk -F= '$1==\"NAME\" { print $2 ;}' /etc/os-release").replace('"','').strip().split(" ")[0]
dename = cmdline("./system-config/dename.sh").replace('"','').strip().split(" ")[0].lower()
run_pkg = ""
def requirements(pkgm):
print(bcolors.CYELLOW + "You need to install some packages, " +run_pkg+ ", for Kinto to fully remap browsers during input focus.\n" + bcolors.ENDC)
print(bcolors.CYELLOW2 + "You need to install some packages, " +run_pkg+ ", for Kinto to fully remap browsers during input focus.\n" + bcolors.ENDC)
print("sudo " + pkgm + " " + run_pkg + "\n")
run_install = yn_choice(bcolors.CYELLOW + "Would you like to run it now? (Will require sudo privileges.)\n" + bcolors.ENDC)
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():
print(bcolors.CYELLOW + "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.CYELLOW + "Confirm the IBus Setup by saying Yes and then closing the window.\n" + bcolors.ENDC)
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\n")
run_install = yn_choice(bcolors.CYELLOW + "Would you like to run it now? (Will require logoff and logon.)\n" + bcolors.ENDC)
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):
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...")
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()
# check_x11 = cmdline("env | grep -i x11").strip()
check_x11 = cmdline("env | grep -i x11 || loginctl show-session \"$XDG_SESSION_ID\" -p Type | awk -F= '{print $2}'").strip()
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")
if len(check_x11) == 0:
print("You are not using x11, please logout and back in using x11/Xorg")
sys.exit()
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')
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()
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.")
pkgm = cmdline("which apt-get 2>/dev/null").strip()
def kintoImpOne():
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 += " update; sudo apt-get install -y "
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()
if len(pkgm) == 0:
pkgm = cmdline("which pacman 2>/dev/null").strip()
if len(pkgm) > 0:
pkgm += " -Syy; sudo pacman -S "
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()
if len(pkgm) == 0:
print("No supported package manager found. Exiting...")
sys.exit()
runpkg = 0
run_pkg = ""
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:
requirements(pkgm)
if os.path.exists(homedir + '/.config/ibus/bus') and cmdline("ls ~/.config/ibus/bus -1rt") == "":
install_ibus()
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")
@@ -116,6 +400,59 @@ 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)
color_arr = [bcolors.CBEIGE,bcolors.CRED2,bcolors.CGREEN,bcolors.CYELLOW ]
print("\nKinto - Type in Linux like it's a Mac.\n")
kintotype = int(input(color_arr[2] +
"1) Kinto - xkeysnail (udev/x11) - Recommended\n" + color_arr[0] +
"2) Kinto - Original xkb/x11 implementation\n" + 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()
if(kintotype == 3):
subprocess.check_call(shlex.split("./xkeysnail_service.sh uninstall"))
exit()
if(kintotype == 4):
Uninstall()
exit()
kintoImpOne()
for index, item in enumerate(data['defaulttypes']):
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?")
@@ -130,45 +467,23 @@ except IOError:
finally:
f.close()
with open('defaults.json') as json_file:
data = json.load(json_file)
color_arr = [bcolors.CBLUE,bcolors.CRED,bcolors.CGREEN]
print("\nKinto - Type in Linux like it's a Mac.\n")
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))
default = 0
while not int(default) in range(1,len(data['defaulttypes'])+1):
default = int(input(bcolors.CYELLOW + "\nPlease enter your keyboard type (1 - " + str(len(data['defaulttypes'])) + ") : " + bcolors.ENDC))
print("")
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.CYELLOW + 'Description: ' + k['description'] + 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.CYELLOW + "Please enter your keyboard config (1 - " + str(len(keyboardconfigs)) + ") : " + bcolors.ENDC))
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.CYELLOW + "You have selected a keyboard config that needs the following command to be ran.\n" + bcolors.ENDC)
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.CYELLOW + "Would you like to run it now? (Will require sudo privileges. Will exit on No.)" + bcolors.ENDC)
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'])
@@ -179,8 +494,8 @@ if os.path.isdir(homedir + "/.xkb/keymap") == False:
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.nw')
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)
@@ -192,30 +507,50 @@ cmdline('sed -i '' -e "' + types_line + 's/\\"/' + keyboardconfigs[defaultkb-1][
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')
cmdline('sed -i '' -e "' + symbols_line + 's/\\"/' + keyboardconfigs[defaultkb-1]['xkb_symbols_gui'].replace("+mac_gui(mac_levelssym)","") + '\\"/2" ~/.xkb/keymap/kbd.mac.gui.nw')
cmdline('sed -i '' -e "' + symbols_line + 's/\\"/' + keyboardconfigs[defaultkb-1]['xkb_symbols_gui'].replace("+mac_gui(mac_levelssym)","+mac_gui(mac_chrome)") + '\\"/2" ~/.xkb/keymap/kbd.mac.gui.chrome')
cmdline('sed -i '' -e "' + types_line + 's/\\"/' + keyboardconfigs[defaultkb-1]['xkb_types_gui'] + '\\"/2" ~/.xkb/keymap/kbd.mac.gui.nw')
# 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("One time initialization tweaks are available. Would you like to view them?")
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.CYELLOW + 'Description: ' + k['description'] + bcolors.ENDC)
print(bcolors.CYELLOW + 'run: ' + k['run'].replace(";", "\n") + bcolors.ENDC + '\n')
print(bcolors.CYELLOW2 + 'Description: ' + k['description'] + bcolors.ENDC)
print(bcolors.CYELLOW2 + 'run: ' + k['run'].replace(";", "\n") + bcolors.ENDC + '\n')
print(bcolors.CYELLOW + "Please enter your init tweak(s) (eg 1 or 1 2 3 - leave blank to skip): " + bcolors.ENDC)
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'] = defaultinit
user_config['init'] = [intents[defaultinit[0]-1]['id']]
print("\nDynamic shortcut tweaks\n")
@@ -225,12 +560,12 @@ tweaks_selected = []
for index, k in enumerate(intents):
print(color_arr[default-1] + bcolors.BOLD + str(index+1) + '. ' + k['name'] + bcolors.ENDC)
print(bcolors.CYELLOW + 'Description: ' + k['description'] + bcolors.ENDC)
print(bcolors.CYELLOW + 'run in gui mode: ' + k['run_gui'].replace(";", "\n") + bcolors.ENDC)
print(bcolors.CYELLOW + 'run in terminal mode: ' + k['run_term'].replace(";", "\n") + bcolors.ENDC + '\n')
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.CYELLOW + "Please enter your dynamic shortcut tweak(s) (eg 1 or 1 2 3 - leave blank to skip): " + bcolors.ENDC)
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:
@@ -249,7 +584,7 @@ if len(defaultde) != 0:
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']
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)

View File

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

View File

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

View File

@@ -0,0 +1,78 @@
#!/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

@@ -4,3 +4,7 @@ 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

182
system-config/dename.sh Executable file
View File

@@ -0,0 +1,182 @@
#!/bin/bash
function detect_budgie()
{
ps -e | grep -E '^.* budgie-wm' > /dev/null
if [ $? -ne 0 ];
then
return 0
fi
VERSION=`dpkg-query -l | grep budgie-core | awk '{print $3}'`
DESKTOP="budgie"
return 1
}
function detect_gnome()
{
ps -e | grep -E '^.* gnome-session' > /dev/null
if [ $? -ne 0 ];
then
return 0
fi
VERSION=`gnome-session --version | awk '{print $2}'`
DESKTOP="gnome"
return 1
}
function detect_kde4()
{
ps -e | grep -E '^.* kded4$' > /dev/null
if [ $? -ne 0 ];
then
return 0
else
VERSION=`kded4 --version | grep -m 1 'KDE' | awk -F ':' '{print $2}' | awk '{print $1}'`
DESKTOP="KDE"
return 1
fi
}
function detect_kde()
{
ps -e | grep -E '^.* kded5$' > /dev/null
if [ $? -ne 0 ];
then
return 0
else
VERSION=`kded5 --version | grep -m 1 'KDE' | awk -F ':' '{print $2}' | awk '{print $1}'`
DESKTOP="KDE"
return 1
fi
}
function detect_unity()
{
ps -e | grep -E 'unity-panel' > /dev/null
if [ $? -ne 0 ];
then
return 0
fi
VERSION=`unity --version | awk '{print $2}'`
DESKTOP="unity"
return 1
}
function detect_xfce()
{
ps -e | grep -E '^.* xfce4-session$' > /dev/null
if [ $? -ne 0 ];
then
return 0
fi
VERSION=`xfce4-session --version | grep xfce4-session | awk '{print $2}'`
DESKTOP="xfce"
return 1
}
function detect_cinnamon()
{
ps -e | grep -E '^.* cinnamon$' > /dev/null
if [ $? -ne 0 ];
then
return 0
fi
VERSION=`cinnamon --version | awk '{print $2}'`
DESKTOP="cinnamon"
return 1
}
function detect_mate()
{
ps -e | grep -E '^.* mate-panel$' > /dev/null
if [ $? -ne 0 ];
then
return 0
fi
VERSION=`mate-about --version | awk '{print $4}'`
DESKTOP="mate"
return 1
}
function detect_lxde()
{
ps -e | grep -E '^.* lxsession$' > /dev/null
if [ $? -ne 0 ];
then
return 0
fi
# We can detect LXDE version only thru package manager
which apt-cache > /dev/null 2> /dev/null
if [ $? -ne 0 ];
then
which yum > /dev/null 2> /dev/null
if [ $? -ne 0 ];
then
VERSION='unknown'
else
# For Fedora
VERSION=`yum list lxde-common | grep lxde-common | awk '{print $2}' | awk -F '-' '{print $1}'`
fi
else
# For Lubuntu and Knoppix
VERSION=`apt-cache show lxde-common /| grep 'Version:' | awk '{print $2}' | awk -F '-' '{print $1}'`
fi
DESKTOP="lxde"
return 1
}
function detect_sugar()
{
if [ "$DESKTOP_SESSION" == "sugar" ];
then
VERSION=`python -c "from jarabe import config; print config.version"`
DESKTOP="sugar"
else
return 0
fi
}
DESKTOP="unknown"
if detect_unity;
then
if detect_kde;
then
if detect_kde4;
then
if detect_budgie;
then
if detect_gnome;
then
if detect_xfce;
then
if detect_cinnamon;
then
if detect_mate;
then
if detect_lxde;
then
detect_sugar
fi
fi
fi
fi
fi
fi
fi
fi
fi
if [ "$1" == '-v' ];
then
echo $VERSION
else
if [ "$1" == '-n' ];
then
echo $DESKTOP
else
echo $DESKTOP $VERSION
fi
fi

3630
system-config/keyboard.ids Normal file

File diff suppressed because it is too large Load Diff

View File

@@ -8,9 +8,9 @@ Restart=always
# eg DISPLAY=:0.0
#Environment=DISPLAY={displayid}
RestartSec=1
WorkingDirectory=/home/{username}/.config/kinto
ExecStart=/bin/bash -c "/home/{username}/.config/kinto/xactive.sh carrots"
ExecStop=/bin/bash /home/{username}/.config/kinto/cleanup.sh
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

@@ -2,7 +2,7 @@
Name=Kinto
GenericName=Kinto
Comment=Make Linux Type Like it's a Mac
Exec=/bin/sleep 5 /usr/bin/systemctl --user start keyswap
Exec=/bin/bash -c "/bin/sleep 5 && /usr/bin/systemctl --user start keyswap"
Terminal=false
Type=Application
X-GNOME-Autostart-enabled=true

21
system-config/unipkg.sh Executable file
View File

@@ -0,0 +1,21 @@
#!/bin/bash
if pkgmgr="$( which apt-get )" 2> /dev/null; then
echo "Debian"
$pkgmgr update
$pkgmgr --yes --force-yes install $1
elif pkgmgr="$( which dnf )" 2> /dev/null; then
echo "dnf"
$pkgmgr check-update; $pkgmgr install -y $1
elif pkgmgr="$( which pacman )" 2> /dev/null; then
echo "Arch-based"
$pkgmgr -Syy;yes | $pkgmgr -S $1
else
echo "Package manager not found, please install $1" >&2
exit 1
fi
if [[ 1 -ne $# ]]; then
echo "Syntax: $0 PACKAGE"
exit 1
fi
exit $?

View File

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

View File

@@ -1,9 +1,19 @@
#!/bin/bash
systemctl --user stop keyswap
# 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
sed -i '/xkb/d' ~/.Xsession
sudo systemctl daemon-reload
sed -i '/xkb/d' ~/.Xsession 2>/dev/null
exit 0

View File

@@ -16,13 +16,13 @@
"symbols":"",
"types":"",
"de":[],
"appnames":[ "Gnome-terminal","konsole","io.elementary.terminal","terminator","sakura","guake","tilda","xterm","eterm" ]
"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": "killall xbindkeys > /dev/null 2>&1",
"run_offInput": "killall xbindkeys > /dev/null 2>&1;xbindkeys -f $HOME/.config/kinto/.firefox-nw",
"run_onInput": "pkill -f ~/.config/kinto/.firefox-nw",
"run_offInput": "xbindkeys -f $HOME/.config/kinto/.firefox-nw",
"symbols": "",
"types": "",
"de": [],
@@ -73,4 +73,4 @@
"run_term":"",
"run_gui":""
}]
}
}

14
windows/NoShell.vbs Normal file
View File

@@ -0,0 +1,14 @@
If WScript.Arguments.Count >= 1 Then
ReDim arr(WScript.Arguments.Count-1)
prog = WScript.Arguments(0)
For i = 1 To WScript.Arguments.Count-1
Arg = WScript.Arguments(i)
If InStr(Arg, " ") > 1 Then Arg = """" & Arg & """"
arr(i) = Arg
Next
RunCmd = Join(arr)
' CreateObject("Wscript.Shell").Run RunCmd, 0, True
Set oShell = CreateObject("Shell.Application")
oShell.ShellExecute prog, RunCmd, , "runas", 0
End If

22
windows/autohotkey.ps1 Normal file
View File

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

39
windows/detectUSB.ahk Normal file
View File

@@ -0,0 +1,39 @@
#SingleInstance, force
#NoTrayIcon
OnMessage(0x219, "notify_change")
Return
lastkb = ""
DllCall("AllocConsole")
WinHide % "ahk_id " DllCall("GetConsoleWindow", "ptr")
notify_change(wParam, lParam, msg, hwnd)
{
global lastkb
; kbtype = % ComObjCreate("WScript.Shell").Exec("cscript /nologo usb.vbs").StdOut.ReadAll()
DetectHiddenWindows On
Run %ComSpec%,, Hide, pid
WinWait ahk_pid %pid%
DllCall("AttachConsole", "UInt", pid)
WshShell := ComObjCreate("Wscript.Shell")
exec := WshShell.Exec("cscript /nologo usb.vbs")
kbtype := exec.StdOut.ReadAll()
DllCall("FreeConsole")
Process Close, %pid%
if lastkb != %kbtype%
{
if InStr(kbtype, "Apple")
{
; MsgBox, Apple
Run, %A_ScriptDir%\NoShell.vbs %A_ScriptDir%\toggle_kb.bat mac, %A_ScriptDir%
}
else{
; MsgBox, Windows
Run, %A_ScriptDir%\NoShell.vbs %A_ScriptDir%\toggle_kb.bat win, %A_ScriptDir%
}
; MsgBox % kbtype
}
lastkb = %kbtype%
}

7
windows/kinto-start.vbs Normal file
View File

@@ -0,0 +1,7 @@
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")
oShell.ShellExecute "C:\Program Files\AutoHotkey\AutoHotkey.exe", strFolder, , "runas", 0

359
windows/kinto.ahk Normal file
View File

@@ -0,0 +1,359 @@
#SingleInstance force
#NoEnv
#Persistent
DetectHiddenWindows, On
Run, %A_ScriptDir%\detectUSB.ahk
; I_Icon = %A_ScriptDir%\assets\kinto-white.ico ; MacModifiers
; IfExist, %I_Icon% ; MacModifiers
; Menu, Tray, Icon, %I_Icon%,, 1 ; MacModifiers
; Menu, Tray, Tip, Mac - Kinto ; MacModifiers
; I_Icon = %A_ScriptDir%\assets\kinto-white-invert.ico ; WinModifiers
; IfExist, %I_Icon% ; WinModifiers
; Menu, Tray, Icon, %I_Icon%,, 1 ; WinModifiers
; Menu, Tray, Tip, Windows - Kinto ; WinModifiers
; Set Tray menu
; Menu, Tray, Standard
Menu, Tray, NoStandard ; to remove default menu
Menu, Tray, Add, Set Windows Keyboard, winkb
Menu, Tray, Add, Set Apple Keyboard, mackb
Menu, Tray, Add, Suspend Kinto, tray_suspend
Menu, Tray, Add, Returns to Desktop, min
Menu, Tray, Add
Menu, Tray, Add, Close, Exit
Menu, Tray, Click, 1
winkb(){
Run, %A_ScriptDir%\NoShell.vbs %A_ScriptDir%\toggle_kb.bat win, %A_ScriptDir%
}
mackb(){
Run, %A_ScriptDir%\NoShell.vbs %A_ScriptDir%\toggle_kb.bat mac, %A_ScriptDir%
}
min(){
; Refocus last active Window
Send {LAlt down}{tab}{LAlt up}
}
tray_suspend(){
suspend toggle
if (a_isSuspended = 1){
menu, tray, check , Suspend Kinto
I_Icon = %A_ScriptDir%\assets\kinto-color-invert.ico
Menu, Tray, Icon, %I_Icon%,, 1
Menu, Tray, Tip, Suspended - Kinto
IfWinExist, detectUSB.ahk
WinClose
}
else{
menu, tray, unCheck, Suspend Kinto
; I_Icon = %A_ScriptDir%\assets\kinto-white.ico ; MacModifiers
; I_Icon = %A_ScriptDir%\assets\kinto-white-invert.ico ; WinModifiers
Menu, Tray, Icon, %I_Icon%,,1
Run, %A_ScriptDir%\detectUSB.ahk
}
; Refocus last active Window
Send {LAlt down}{tab}{LAlt up}
}
Exit() {
IfWinExist, detectUSB.ahk
WinClose
ExitApp
}
SetTitleMatchMode, 2
GroupAdd, terminals, ahk_exe ubuntu.exe
GroupAdd, terminals, ahk_exe ConEmu.exe
GroupAdd, terminals, ahk_exe ConEmu64.exe
GroupAdd, terminals, ahk_exe powershell.exe
GroupAdd, terminals, ahk_exe WindowsTerminal.exe
GroupAdd, terminals, ahk_exe Hyper.exe
GroupAdd, terminals, ahk_exe Cmd.exe
GroupAdd, terminals, ahk_exe Terminus.exe
GroupAdd, terminals, Fluent Terminal ahk_class ApplicationFrameWindow
GroupAdd, posix, ahk_exe ubuntu.exe
GroupAdd, posix, ahk_exe ConEmu.exe
GroupAdd, posix, ahk_exe ConEmu64.exe
GroupAdd, posix, ahk_exe Hyper.exe
GroupAdd, posix, ahk_exe mintty.exe
GroupAdd, posix, ahk_exe Terminus.exe
GroupAdd, posix, Fluent Terminal ahk_class ApplicationFrameWindow
GroupAdd, ConEmu, ahk_exe ConEmu.exe
GroupAdd, ConEmu, ahk_exe ConEmu64.exe
GroupAdd, ConEmu, ahk_exe WindowsTerminal.exe
GroupAdd, editors, ahk_exe sublime_text.exe
GroupAdd, editors, ahk_exe VSCodium.exe
GroupAdd, editors, ahk_exe Code.exe
GroupAdd, vscode, ahk_exe VSCodium.exe
GroupAdd, vscode, ahk_exe Code.exe
GroupAdd, vstudio, ahk_exe devenv.exe
; New AltTab and CtrlTab fix
*tab::
{
; Tertiary
if (GetKeyState("LCtrl", "P") AND GetKeyState("LShift", "P") = false) {
; Secondary
; Send {LCtrl down}{Secondary up}{tab}
; Send {LCtrl down}{LWin up}{tab} ; WinModifiers
; Send {LCtrl down}{LAlt up}{tab} ; MacModifiers
KeyWait, tab
; Tertiary
} else if (GetKeyState("LCtrl", "P") AND GetKeyState("LShift", "P")) {
; Secondary
; Send {LCtrl down}{Secondary up}{LShift down}{tab}
; Send {LCtrl down}{LWin up}{LShift down}{tab} ; WinModifiers
; Send {LCtrl down}{LAlt up}{LShift down}{tab} ; MacModifiers
KeyWait, tab
; Primary
; } else if (GetKeyState("LAlt", "P") AND GetKeyState("LShift", "P") = false) { ; WinModifiers
; } else if (GetKeyState("LWin", "P") AND GetKeyState("LShift", "P") = false) { ; MacModifiers
Send {LAlt down}{tab}
KeyWait, tab
; Primary
; } else if (GetKeyState("LAlt", "P") AND GetKeyState("LShift", "P")) { ; WinModifiers
; } else if (GetKeyState("LWin", "P") AND GetKeyState("LShift", "P")) { ; MacModifiers
Send {LAlt down}{LShift down}{tab}
KeyWait, tab
; Secondary
; } else if (GetKeyState("LWin", "P") AND GetKeyState("LShift", "P")) = false { ; WinModifiers
; } else if (GetKeyState("LAlt", "P") AND GetKeyState("LShift", "P") = false) { ; MacModifiers
return
; Secondary
; } else if (GetKeyState("LWin", "P") AND GetKeyState("LShift", "P")) { ; WinModifiers
; } else if (GetKeyState("LAlt", "P") AND GetKeyState("LShift", "P")) { ; MacModifiers
return
} else {
send {Blind}{tab}
}
return
}
tab::Send {tab}
+tab::Send {Shift down}{tab}{Shift up}
; Basic Remap
;
; Primary::LCtrl
; Secondary::LAlt
; Tertiary::LWin
; $LAlt::LCtrl ; WinModifiers
; $RAlt::RCtrl ; WinModifiers
; $LWin::LAlt ; WinModifiers
; $LCtrl::LWin ; WinModifiers
; $LWin::LCtrl ; MacModifiers
; $RWin::RCtrl ; MacModifiers
; $LCtrl::LWin ; MacModifiers
; Hack to disable start menu on winkey
; Static
$LCtrl up::Send {Ctrl down}{LWin up}{Ctrl up}
; temporary hack to ensure keys don't get stuck
; impacts Alt-Tab fix
; Primary
; $LAlt up::Send {LWin up}{LAlt up}{LCtrl up} ; WinModifiers
; $LWin up::Send {LWin up}{LAlt up}{LCtrl up} ; MacModifiers
; Close Apps
^q::Send !{F4}
; Emoji Panel
#^Space::Send {LWin down};{LWin up}
; Full Screenshot
^+3::Send {PrintScreen}
; Region Screenshot
^+4::Send #+{S}
; wordwise support
$^Left::Send {Home}
$^+Left::Send +{Home}
$^Right::Send {End}
$^+Right::Send +{End}
^Up::Send ^{Home}
^+Up::Send ^+{Home}
^Down::Send ^{End}
^+Down::Send ^+{End}
^Backspace::Send +{Home}{Delete}
!Backspace::Send ^{Backspace}
!Left::Send ^{Left}
!+Left::Send ^+{Left}
!Right::Send ^{Right}
!+Right::Send ^+{Right}
; Cmd+Space Alternative
^Space::Send ^{Esc}
; Sublime Text Remaps for VS Code
#IfWinActive ahk_group vscode
; Remap Ctrl+Shift to behave like macOS Sublimetext
; Will extend cursor to multiple lines
; #+Up::send ^!{Up} ; ST2CODE
; #+Down::send ^!{Down} ; ST2CODE
; Remap Ctrl+Cmd+G to select all matches
; #^g::send ^+{L} ; ST2CODE
!+g::send ^+{G} ; View source control
#If
#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
^Up::Return ; cancel scroll_lines up
^!Up::send ^{Up} ; scroll_lines up
^Down::Return ; cancel scroll_lines down
^!Down::send ^{Down} ; scroll_lines down
#+Up::send {shift up}^!{Up} ; multi-cursor up
#+Down::send {shift up}^!{Down} ; multi-cursor down
^PgDn::Return ; cancel next_view
^PgUp::Return ; cancel prev_view
^+{::send ^{PgDn} ; next_view
^+}::send ^{PgUp} ; prev_view
^!Right::send ^{PgDn} ; next_view
^!Left::send ^{PgUp} ; prev_view
Insert::Return ; cancel toggle_overwrite
^!O::send {Insert} ; toggle_overwrite
!c::Return ; cancel toggle_case_sensitive
^!c::send !{c} ; toggle_case_sensitive
^h::Return ; cancel replace
^!f::send ^{h} ; replace
^+h::Return ; cancel replace_next
^!e::send ^+{h} ; replace_next
F3::Return ; cancel find_next
^g::send {F3} ; find_next
*F3::Return ; cancel find_prev, find_under, find_all_under
^+g::send +{F3} ; find_prev
#!g::send ^{F3} ; find_under
#!+g::send ^+{F3} ; find_under_prev
#^g::send !{F3} ; find_all_under
^+Up::Return ; cancel swap_line_up
#!Up::send ^+{Up} ; swap_line_up
^+Down::Return ; cancel swap_line_down
#!Down::send ^+{Down} ; swap_line_down
^Pause::Return ; cancel cancel_build
#c::send ^{Pause} ; cancel_build
F9::Return ; cancel sort_lines case_s false
F5::send {F9} ; sort_lines case_s false
#F9::Return ; cancel sort_lines case_s true
#F5::send #{F9} ; sort_lines case_s true
!+1::Return ; cancel set_layout
^!1::send !+1 ; set_layout
!+2::Return ; cancel set_layout
^!2::send !+2 ; set_layout
!+3::Return ; cancel set_layout
^!3::send !+3 ; set_layout
!+4::Return ; cancel set_layout
^!4::send !+4 ; set_layout
!+5::Return ; cancel set_layout
^!5::send !+5 ; set_layout
!+8::Return ; cancel set_layout
^!8::send !+8 ; set_layout
!+9::Return ; cancel set_layout
^!9::send !+9 ; set_layout
#If
#IfWinActive ahk_group terminals
; Copy
^c::
SetKeyDelay -1
Send {Blind}{LShift down}{c DownTemp}
return
^c up::
SetKeyDelay -1
Send {Blind}{c Up}{LShift Up}
return
; Sigints - interrupt
$#c::Send {Ctrl down}c{Ctrl up}
; Paste
^v::
If WinActive("ahk_group posix"){
Send {Blind}{Shift down}v{Shift up}
}
else{
Send {Blind}v
}
return
#If
#IfWinActive ahk_group posix
; Open/Close Tab for those that support it
$^t::
If not WinActive("ahk_group ConEmu"){
Send {LCtrl down}{LShift down}t{LCtrl Up}{LShift Up}
}
else{
Send ^t
}
return
$^w::
If not WinActive("ahk_group ConEmu"){
Send {LCtrl down}{LShift down}w{LCtrl Up}{LShift Up}
}
else{
Send ^w
}
return
; End of Line
^e::
SetKeyDelay -1
Send {Blind}{e DownTemp}
return
^e up::
SetKeyDelay -1
Send {Blind}{e Up}
return
; Beginning of Line
^a::
SetKeyDelay -1
Send {Blind}{a DownTemp}
return
^a up::
SetKeyDelay -1
Send {Blind}{a Up}
return
^l::Send clear{Enter}
; #l::return
; Clear Terminal and Scroll Buffer
^k::Send clear && printf '\e[3J'{Enter}
; Nano editor shortcuts
#g::Send {LCtrl down}g{LCtrl Up}
#k::Send {LCtrl down}k{LCtrl Up}
#x::Send {LCtrl down}x{LCtrl Up}
#o::Send {LCtrl down}o{LCtrl Up}
#r::Send {LCtrl down}r{LCtrl Up}
#w::Send {LCtrl down}w{LCtrl Up}
#\::Send {LCtrl down}\{LCtrl Up}
#u::Send {LCtrl down}u{LCtrl Up}
#j::Send {LCtrl down}j{LCtrl Up}
#t::Send {LCtrl down}t{LCtrl Up}
#_::Send {LCtrl down}_{LCtrl Up}
#z::Send {LCtrl down}z{LCtrl Up}
#y::Send {LCtrl down}y{LCtrl Up}
#v::Send {LCtrl down}v{LCtrl Up}
#If

Binary file not shown.

Binary file not shown.

BIN
windows/macbook_winctrl_swap.skl Executable file

Binary file not shown.

View File

@@ -0,0 +1,4 @@
Windows Registry Editor Version 5.00
[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Keyboard Layout]
"Scancode Map"=-

Binary file not shown.

Binary file not shown.

BIN
windows/standard_ctrlalt_swap.skl Executable file

Binary file not shown.

BIN
windows/theme_campbell.reg Normal file

Binary file not shown.

BIN
windows/theme_legacy.reg Normal file

Binary file not shown.

Binary file not shown.

Binary file not shown.

BIN
windows/theme_ubuntu.reg Normal file

Binary file not shown.

22
windows/toggle_kb.bat Normal file
View File

@@ -0,0 +1,22 @@
@echo off
IF "%1"=="mac" goto mac
IF "%1"=="win" goto win
echo Not found.
goto commonexit
:win
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/^(?!;)(.*)(; MacModifiers)/; $1$2/gm" "%userprofile%\.kinto\kinto.ahk"
"C:\Program Files\AutoHotkey\AutoHotkey.exe" "%userprofile%\.kinto\kinto.ahk"
goto commonexit
:mac
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/^(?!;)(.*)(; WinModifiers)/; $1$2/gm" "%userprofile%\.kinto\kinto.ahk"
"C:\Program Files\AutoHotkey\AutoHotkey.exe" "%userprofile%\.kinto\kinto.ahk"
goto commonexit
:commonexit
exit

71
windows/usb.vbs Normal file
View File

@@ -0,0 +1,71 @@
Option Explicit
Dim oWMISrv, collDvcs, iUSBDvc , iDvc, sDvcID, sPID, sVID
' add item to array
Function AddItem(arr, val)
ReDim Preserve arr(UBound(arr) + 1)
arr(UBound(arr)) = val
AddItem = arr
End Function
' returns an array of the unique items in for-each-able collection fex
Function uniqFE(fex)
Dim dicTemp : Set dicTemp = CreateObject("Scripting.Dictionary")
Dim xItem
For Each xItem In fex
dicTemp(xItem) = 0
Next
uniqFE = dicTemp.Keys()
End Function
Function ReplaceX(ByVal sValue, ByVal sPattern, ByVal sNValue)
Dim oReg : Set oReg = New RegExp
oReg.Pattern = sPattern
ReplaceX = oReg.Replace(sValue, sNValue)
Set oReg = Nothing
End Function
Set oWMISrv = GetObject("winmgmts:\\.\root\cimv2")
Set collDvcs = oWMISrv.ExecQuery("Select * From Win32_PnPEntity WHERE Service='kbdhid'")
Dim deviceVID : deviceVID=Array()
Dim devicePID : devicePID=Array()
Dim deviceDesc : deviceDesc=Array()
Dim counter: counter=0
For Each iUSBDvc In collDvcs
sVID = ReplaceX(iUSBDvc.DeviceID, ".*VID_(.{4}).*", "$1")
sPID = ReplaceX(iUSBDvc.DeviceID, ".*PID_(.{4}).*", "$1")
deviceVID = AddItem(deviceVID, sVID)
devicePID = AddItem(devicePID, sPID)
deviceDesc = AddItem(deviceDesc, iUSBDvc.Description)
counter = counter + 1
' Wscript.Echo "Name : "& iUSBDvc.Description &"VID_PID : "& sVID & sPID
Next
Dim uniqueVID: uniqueVID = uniqFE(deviceVID)
Dim vcount: vcount = UBound(uniqueVID) + 1
Dim nonApple: nonApple = 0
Dim i
If vcount = 1 Then
If StrComp(deviceVID(0), "05AC") = 0 Then
Wscript.Echo "Apple"
Else
Wscript.Echo "Windows"
End If
Else
For i = 0 To counter-1
If StrComp(deviceVID(i), "05AC") = -1 Then
nonApple = 1
End If
Next
If nonApple = 1 Then
Wscript.Echo "Windows"
Else
Wscript.Echo "Apple"
End If
End If
Set collDvcs = Nothing
Set oWMISrv = Nothing

300
xkeysnail-config/kinto.py Normal file
View File

@@ -0,0 +1,300 @@
# -*- 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("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 - 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-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),{
# 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

@@ -0,0 +1,5 @@
# /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

13
xkeysnail-config/prexk.sh Executable file
View File

@@ -0,0 +1,13 @@
#!/bin/bash
if [ -f {homedir}/.config/systemd/user/keyswap.timer ]; then
systemctl --user stop keyswap.timer >/dev/null 2>&1
systemctl --user disable keyswap.timer >/dev/null 2>&1
fi
if [ -f {homedir}/.config/systemd/user/keyswap.service ]; then
systemctl --user stop keyswap >/dev/null 2>&1
systemctl --user disable keyswap >/dev/null 2>&1
fi
# export DISPLAY={displayid};/usr/bin/xhost +SI:localuser:root
mkdir -p /tmp/kinto/xkeysnail
cp {homedir}/.config/kinto/kinto.py /tmp/kinto/xkeysnail/kinto.py

View File

@@ -0,0 +1,31 @@
// Place your key bindings in this file to override the defaultsauto[]
[
{
"key": "alt+left",
"command": "-workbench.action.terminal.focusPreviousPane",
"when": "terminalFocus"
},
{
"key": "alt+right",
"command": "-workbench.action.terminal.focusNextPane",
"when": "terminalFocus"
},
{
"key": "alt+right",
"command": "cursorWordRight"
},
{
"key": "alt+left",
"command": "cursorWordLeft"
},
{
"key": "shift+alt+left",
"command": "cursorWordStartLeftSelect",
"when": "textInputFocus"
},
{
"key": "shift+alt+right",
"command": "cursorWordEndRightSelect",
"when": "textInputFocus"
}
]

View File

@@ -0,0 +1,8 @@
[Desktop Entry]
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"
Terminal=false
Type=Application
X-GNOME-Autostart-enabled=true

View File

@@ -0,0 +1,15 @@
[Unit]
Description=xkeysnail
[Service]
Type=simple
KillMode=process
ExecStartPre=/bin/bash -c "{xhost} +SI:localuser:root && /sbin/runuser -l {username} -c {homedir}/.config/kinto/prexk.sh"
ExecStart=/usr/bin/sudo /bin/bash -c '{experimental-caret}{homedir}/.config/kinto/xkeystart.sh /tmp/kinto/xkeysnail/kinto.py'
ExecStop=/bin/bash -c 'me=$$;ps -ef | grep \'[t]mp/kinto\' | awk -v me=$me \'$2 != me {print $2}\' | xargs kill;/usr/bin/killall dbus-monitor;/usr/bin/killall xkeysnail;{kill-caret}'
Restart=on-failure
RestartSec=3
Environment=DISPLAY={displayid}
[Install]
WantedBy=graphical.target

19
xkeysnail-config/xkeystart.sh Executable file
View File

@@ -0,0 +1,19 @@
#!/bin/bash
# >/dev/null 2>&1
if [ -f /usr/local/bin/xkeysnail ];then
xkeyfullpath="/usr/local/bin/xkeysnail"
elif [ -f /usr/bin/xkeysnail ];then
xkeyfullpath="/usr/bin/xkeysnail"
else
xkeyfullpath=`which xkeysnail`
fi
"$xkeyfullpath" --quiet --watch "$1" &
inotifywait -m -e close_write,moved_to,create,modify /tmp/kinto/xkeysnail |
while read -r path; do
/usr/bin/killall xkeysnail
"$xkeyfullpath" --quiet --watch "$1" &
done

401
xkeysnail_service.sh Executable file
View File

@@ -0,0 +1,401 @@
#!/bin/bash
# set about:config?filter=ui.key.menuAccessKeyFocuses
# to false for wordwise to work in Firefox
typeset -l distro
distro=$(awk -F= '$1=="NAME" { print $2 ;}' /etc/os-release)
typeset -l dename
dename=$(./system-config/dename.sh | cut -d " " -f1)
function uninstall {
while true; do
read -rep $'\nPress R to restore your original shortcuts.\nPress F to reset to factory shortcuts. (f/r)\n' yn
case $yn in
[Ff]* ) yn="f"; break;;
[Rr]* ) yn="r";break;;
* ) echo "Please answer yes or no.";;
esac
done
if [ "$yn" == "f" ];then
echo "Reset to factory shortcuts"
if [ "$dename" == "gnome" ];then
echo "Resetting DE hotkeys..."
echo "gsettings reset-recursively org.gnome.desktop.wm.keybindings"
gsettings reset-recursively org.gnome.desktop.wm.keybindings
echo "gsettings reset-recursively org.gnome.mutter.keybindings"
gsettings reset-recursively org.gnome.mutter.keybindings
echo "gsettings set org.gnome.mutter overlay-key 'super'"
gsettings set org.gnome.mutter overlay-key 'super'
dconf dump /org/gnome/mutter/ > mutter.conf
dconf load /org/gnome/mutter/ < mutter.conf
elif [ "$dename" == "kde" ];then
echo "Resetting DE hotkeys..."
mv ~/.config/kwinrc ~/.config/kwinrc.kinto
mv ~/.config/kglobalshortcutsrc ~/.config/kglobalshortcutsrc.kinto
elif [ "$dename" == "xfce" ];then
echo "Resetting DE hotkeys..."
cp /etc/xdg/xfce4/xfconf/xfce-perchannel-xml/xfce4-keyboard-shortcuts.xml ~/.config/xfce4/xfconf/xfce-perchannel-xml/xfce4-keyboard-shortcuts.xml
fi
elif [ "$yn" == "r" ]; then
echo "Restore original user shortcuts"
if [ "$dename" == "gnome" ]; then
echo "Restoring DE hotkeys..."
wmkeys=$(ls | grep -m1 "keybinding")
mutterkeys=$(ls | grep -m1 "mutter_")
if [[ ${#wmkeys} > 0 ]]; then
echo "dconf load /org/gnome/desktop/wm/keybindings/ < $wmkeys"
dconf load /org/gnome/desktop/wm/keybindings/ < "$wmkeys"
else
echo "Gnome Desktop keybindings backup not found..."
fi
if [[ ${#mutterkeys} > 0 ]]; then
echo "dconf load /org/gnome/mutter/keybindings/ < $mutterkeys"
dconf load /org/gnome/mutter/keybindings/ <"$mutterkeys"
fi
if [[ ${#wmkeys} > 0 ]] || [[ ${#mutterkeys} > 0 ]]; then
echo "Gnome hotkeys have been successfully restored."
fi
elif [ "$dename" == "kde" ]; then
echo "Restoring DE hotkeys..."
kwinkeys = $(ls | grep -m1 "kwinrc")
kdekeys = $(ls | grep -m1 "kglobalshortcutsrc")
cp ./"$kdekeys" ~/.config/kglobalshortcutsrc
cp ./"$kwinkeys" ~/.config/kwinrc
elif [ "$dename" == "xfce" ]; then
echo "Restoring DE hotkeys..."
xfcekeys = $(ls | grep -m1 "xfce4-keyboard")
cp ./"$xfcekeys" ~/.config/xfce4/xfconf/xfce-perchannel-xml/xfce4-keyboard-shortcuts.xml
fi
fi
}
function removeAppleKB {
# 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
if test -f "/sys/module/applespi/parameters/swap_opt_cmd" && [ `cat /sys/module/applespi/parameters/swap_opt_cmd` == "1" ]; then
echo '0' | sudo tee -a /sys/module/applespi/parameters/swap_opt_cmd
echo 'options applespi swap_opt_cmd=0' | sudo tee -a /etc/modprobe.d/applespi.conf
sudo update-initramfs -u -k all
fi
}
function budgieUninstall {
if [ -f /usr/bin/budgie-desktop ];then
read -n 1 -s -r -p "Your system may log you off immediately during the restoration of budgie-daemon. Press any key to continue..."
bdmd5="$(md5sum /usr/bin/budgie-daemon | awk '{ print $1 }')"
oldbdmd5=$(md5sum ./budgie-daemon_10.5.1.bak | awk '{ print $1 }')
if [ "$bdmd5" != "$oldbdmd5" ]; then
echo -e "\nReplacing budgie-daemon with backup..."
sudo pkill budgie-daemon && sudo cp ./budgie-daemon_10.5.1.bak /usr/bin/budgie-daemon
else
echo -e "\nBudgie-daemon is already an original."
fi
fi
}
function budgieUpdate {
# Check for budgie and install App Switching hack
if [ -f /usr/bin/budgie-desktop ];then
while true; do
read -rep $'Would you like to update Budgie to support proper App Switching? (y/n)\n(Your system will immediately log you out after this runs.)\n' yn
case $yn in
[Yy]* ) yn="y"; break;;
[Nn]* ) yn="n";break;;
* ) echo "Please answer yes or no.";;
esac
done
if [ "$yn" == "y" ]; then
budgieVersion="$(/usr/bin/budgie-desktop --version | awk '{ print $2; }' | head -n1)"
if [ "$budgieVersion" == "10.5.1" ]; then
if ! [ -f ./system-config/budgie-daemon_10.5.1 ]; then
wget https://github.com/rbreaves/budgie-desktop/raw/f112e0e349c021c1bbfa7e45c16083eae0d92fac/binaries/budgie-daemon_10.5.1 -O ./system-config/budgie-daemon_10.5.1
fi
bdmd5=$(md5sum /usr/bin/budgie-daemon | awk '{ print $1 }')
newbdmd5=$(md5sum ./system-config/budgie-daemon_10.5.1 | awk '{ print $1 }')
if [ "$bdmd5" != "$newbdmd5" ]; then
cp /usr/bin/budgie-daemon ./budgie-daemon_"$budgieVersion".bak
sudo pkill budgie-daemon && sudo cp ./system-config/budgie-daemon_10.5.1 /usr/bin/budgie-daemon
echo "Updated Budgie to use App Switching Patch"
else
echo "Budgie-daemon already patched, skipping replacement."
fi
else
echo "Your Budgie version was $budgieVersion and the patch is for 10.5.1."
while true; do
read -rep $'Would you like to replace it any ways? (y/n)\n(A backup will be made)\n' yn
case $yn in
[Yy]* ) yn="y"; break;;
[Nn]* ) yn="n";break;;
* ) echo "Please answer yes or no.";;
esac
done
if [ "$yn" == "y" ]; then
if ! [ -f ./system-config/budgie-daemon_10.5.1 ]; then
wget https://github.com/rbreaves/budgie-desktop/raw/43d3b44243b0bcaee3262a79818024a651475b58/binaries/budgie-daemon_10.5.1 -O ./system-config/budgie-daemon_10.5.1
fi
cp /usr/bin/budgie-daemon ./budgie-daemon_"$budgieVersion".bak
sudo pkill budgie-daemon && sudo cp ./system-config/budgie-daemon_10.5.1 /usr/bin/budgie-daemon
echo "Updated Budgie to use App Switching Patch"
fi
fi
fi
fi
}
if [ $# -eq 0 ]; then
echo "Install Kinto - xkeysnail (udev)"
echo " 1) Windows & Mac (HID driver)"
echo " 2) Mac Only & VMs on Macbooks"
echo " 3) Chromebook"
# echo " 5) Uninstall"
read n
set "$n"
fi
# multi-language
rightalt=false
# VS code remap
vssublime=false
if [[ $1 == "1" || $1 == "2" || $1 == "3" || $1 == "winmac" || $1 == "mac" || $1 == "chromebook" ]]; then
while true; do
read -rep $'\nDo you want multi-language support (the right Alt key will not remap)? (y/N)\n' yn
case $yn in
[Yy]* ) rightalt=true; break;;
* ) break;;
esac
done
while true; do
read -rep $'\nWould you like to give VS Code Sublime Text keymaps? (y/N)\n' yn
case $yn in
[Yy]* ) vssublime=true; break;;
* ) break;;
esac
done
branch=$(git rev-parse --abbrev-ref HEAD)
if [ "$branch" == "dev" ] || [ "$branch" == "alpha" ];then
while true; do
read -rep $'\nExperimental Support for Firefox/Chrome Back/Forward hotkeys (Cmd+Left/Right)?\n(Keys could get stuck, switch windows or press ctrl &/or super to release) (y/n)\n' yn
case $yn in
[Yy]* ) exp='/sbin/runuser -l {username} -c "export DISPLAY={displayid};{homedir}/.config/kinto/caret_status_xkey.sh\&";'; expsh='"{homedir}/.config/kinto/caret_status_xkey.sh"'; break;;
[Nn]* ) exp=" "; expsh=" " break;;
# * ) echo "Please answer yes or no.";;
esac
done
else
echo -e "\nSupport for Firefox/Chrome Back/Forward hotkeys (Cmd+Left/Right) disabled on $branch w/ xkeysnail \n"
exp=" "
expsh=" "
fi
sudo systemctl enable xkeysnail >/dev/null 2>&1
if ! [ -x "$(command -v inotifywait)" ]; then
echo "Will need to install inotify-tools to restart key remapper live for config file changes..."
sudo ./system-config/unipkg.sh inotify-tools
fi
if ! [ -x "$(command -v pip3)" ]; then
echo "Will need to install python3-pip..."
sudo ./system-config/unipkg.sh python3-pip
fi
if ! [ -x "$(command -v python3-config)" ]; then
if [ "$distro" == "ubuntu" ] || [ "$distro" == "debian" ] || [ "$distro" == '"linux mint"' ]; then
pydev="python3-dev"
elif [ "$distro" == "fedora" ]; then
pydev="python3-devel"
fi
if [ "$distro" == "gnome" ] || [ "$distro" == "fedora" ] || [ "$distro" == "debian" ] || [ "$distro" == '"linux mint"' ]; then
echo "Will need to install $pydev..."
sudo ./system-config/unipkg.sh "$pydev"
fi
fi
if ! [ -x "$(command -v xhost)" ] || ! [ -x "$(command -v gcc)" ]; then
if [ "$distro" == "\"manjaro linux\"" ]; then
sudo ./system-config/unipkg.sh "xorg-xhost gcc"
fi
fi
if [ "$distro" == '"linux mint"' ]; then
pip3 install setuptools
fi
# echo "Transferring files..."
mkdir -p ~/.config/kinto
# KDE xhost fix
mkdir -p ~/.kde/Autostart
echo -e '#!/bin/sh\rxhost +SI:localuser:root' > ~/.kde/Autostart/kintohost.sh
chmod +x ~/.kde/Autostart/kintohost.sh
# KDE startup - xhost fix
yes | cp -rf ./xkeysnail-config/xkeysnail.desktop ~/.config/autostart/xkeysnail.desktop
yes | cp -rf ./xkeysnail-config/xkeystart.sh ~/.config/kinto/xkeystart.sh
yes | cp -rf ./xkeysnail-config/kinto.py ./xkeysnail-config/kinto.py.new
yes | cp -rf ./xkeysnail-config/limitedadmins ./xkeysnail-config/limitedadmins.new
yes | cp -rf ./xkeysnail-config/prexk.sh ~/.config/kinto/prexk.sh
yes | cp -rf ./system-config/caret_status_xkey.sh ~/.config/kinto/caret_status_xkey.sh
yes | cp -rf ./xkeysnail-config/xkeysnail.service ./xkeysnail-config/xkeysnail.service.new
# yes | cp -rf ./xkeysnail-config/xkeysnail.timer ~/.config/systemd/user/xkeysnail.timer
sed -i "s#{experimental-caret}#$exp#g" ./xkeysnail-config/xkeysnail.service.new
if [ "$expsh" != " " ];then
sed -i "s#{kill-caret}#/usr/bin/pkill -f $expsh#g" ./xkeysnail-config/xkeysnail.service.new
else
sed -i "s#{kill-caret}#$expsh#g" ./xkeysnail-config/xkeysnail.service.new
fi
sed -i "s/{username}/`whoami`/g" ./xkeysnail-config/xkeysnail.service.new
sed -i "s#{homedir}#`echo "$HOME"`#g" ./xkeysnail-config/xkeysnail.service.new
sed -i "s#{xhost}#`which xhost`#g" ./xkeysnail-config/xkeysnail.service.new
sed -i "s/{username}/`whoami`/g" ./xkeysnail-config/limitedadmins.new
sed -i "s#{homedir}#`echo "$HOME"`#g" ./xkeysnail-config/limitedadmins.new
sed -i "s#{systemctl}#`which systemctl`#g" ./xkeysnail-config/limitedadmins.new
sudo chown root:root ./xkeysnail-config/limitedadmins.new
sudo mv ./xkeysnail-config/limitedadmins.new /etc/sudoers.d/limitedadmins
sed -i "s#{systemctl}#`which systemctl`#g" ~/.config/autostart/xkeysnail.desktop
sed -i "s#{xhost}#`which xhost`#g" ~/.config/autostart/xkeysnail.desktop
sed -i "s#{homedir}#`echo "$HOME"`#g" ~/.config/kinto/prexk.sh
sed -i "s/{displayid}/`echo "$DISPLAY"`/g" ./xkeysnail-config/xkeysnail.service.new
sed -i "s/{displayid}/`echo "$DISPLAY"`/g" ~/.config/kinto/prexk.sh
if $vssublime ; then
perl -pi -e "s/(# )(.*)(- Sublime)/\$2\$3/g" ./xkeysnail-config/kinto.py.new >/dev/null 2>&1
fi
fi
if [[ $1 == "1" || $1 == "winmac" ]]; then
if ls /sys/module | grep hid_apple >/dev/null 2>&1 ; then
echo '1' | sudo tee -a /sys/module/hid_apple/parameters/swap_opt_cmd;echo 'options hid_apple swap_opt_cmd=1' | sudo tee -a /etc/modprobe.d/hid_apple.conf;sudo update-initramfs -u -k all
fi
if ls /sys/module | grep applespi >/dev/null 2>&1 ; then
echo '1' | sudo tee -a /sys/module/applespi/parameters/swap_opt_cmd;echo 'options applespi swap_opt_cmd=1' | sudo tee -a /etc/modprobe.d/applespi.conf;sudo update-initramfs -u -k all
fi
if ! ls /sys/module | grep apple ; then
removeAppleKB
fi
perl -pi -e "s/(# )(.*)(# WinMac)/\$2\$3/g" ./xkeysnail-config/kinto.py.new
if [[ $dename == "xfce" ]]; then
perl -pi -e "s/(# )(.*)(# xfce4)/\$2\$3/g" ./xkeysnail-config/kinto.py.new
perl -pi -e "s/(\w.*)(# Default not-xfce4)/# \$1\$2/g" ./xkeysnail-config/kinto.py.new
fi
elif [[ $1 == "2" || $1 == "mac" ]]; then
removeAppleKB
perl -pi -e "s/(# )(.*)(# Mac)/\$2\$3/g" ./xkeysnail-config/kinto.py.new
if [[ $dename == "xfce" ]]; then
perl -pi -e "s/(# )(.*)(# xfce4)/\$2\$3/g" ./xkeysnail-config/kinto.py.new
perl -pi -e "s/(\w.*)(# Default not-xfce4)/# \$1\$2/g" ./xkeysnail-config/kinto.py.new
fi
elif [[ $1 == "3" || $1 == "chromebook" ]]; then
perl -pi -e "s/(# )(.*)(# Chromebook)/\$2\$3/g" ./xkeysnail-config/kinto.py.new
perl -pi -e "s/(# )(.*)(# xfce4)/\$2\$3/g" ./xkeysnail-config/kinto.py.new
perl -pi -e "s/(\w.*)(# Default)/# \$1\$2/g" ./xkeysnail-config/kinto.py.new
fi
if $rightalt ; then
perl -pi -e "s/(\w.*)(Multi-language)/# \$1\$2/g" ./xkeysnail-config/kinto.py.new >/dev/null 2>&1
fi
if [[ $1 == "1" || $1 == "2" || $1 == "3" || $1 == "winmac" || $1 == "mac" || $1 == "chromebook" ]]; then
mv ./xkeysnail-config/kinto.py.new ~/.config/kinto/kinto.py
# if [ "$distro" == "fedora" ];then
sudo rm /etc/systemd/system/xkeysnail.service
if [ -d /usr/lib/systemd/system ];then
xkeypath="/usr/lib/systemd/system/"
elif [ -d /lib/systemd/system ];then
xkeypath="/lib/systemd/system/"
fi
sudo mv ./xkeysnail-config/xkeysnail.service.new "$xkeypath"xkeysnail.service && echo "Service file added to "$xkeypath"xkeysnail.service"
sudo chown -R root:root "$xkeypath"xkeysnail.service && echo "Ownership set for root..." || echo "Failed to set ownership..."
sudo chmod 644 "$xkeypath"xkeysnail.service && echo "Permissions set to 644..." || echo "Failed to set permissions..."
sudo ln -s "$xkeypath"xkeysnail.service /etc/systemd/system/xkeysnail.service && echo "Created soft symlink..." || echo "Failed to create soft symlink..."
sudo ln -s "$xkeypath"xkeysnail.service /etc/systemd/system/graphical.target.wants/xkeysnail.service && echo "Created soft symlink for graphical target..." || echo "Failed to create soft symlink for graphical target..."
xhost +SI:localuser:root
git clone --depth 10 https://github.com/rbreaves/xkeysnail.git || git pull --depth 10
cd xkeysnail
git checkout 51c369084e0045a8410d227bab52411bf84fb65b
giturl=$(git ls-remote --get-url)
if [ "$giturl" != "https://github.com/rbreaves/xkeysnail.git" ];then
echo -e "\nreplacing xkeysnail with fork...\n"
cd ..
rm -rf ./xkeysnail
git clone --depth 10 https://github.com/rbreaves/xkeysnail.git
cd xkeysnail
git checkout 51c369084e0045a8410d227bab52411bf84fb65b
fi
sudo pip3 install --upgrade .
cd ..
sudo systemctl daemon-reload
sudo systemctl --state=not-found --all | grep xkeysnail
if [ "$distro" == "fedora" ];then
systemctl enable xkeysnail.service
else
sudo systemctl enable xkeysnail.service
fi
sudo systemctl restart xkeysnail
echo -e "Adding xhost fix...\n"
LINE='xhost +SI:localuser:root'
if [ ! -e "~/.xprofile" ]; then
# Ubuntu xhost fix
echo "$LINE" > ~/.xprofile
# echo "$LINE" > ~/.xinitrc
fi
# Ubuntu xhost fix
grep -qF -- "$LINE" ~/.xprofile || echo "$LINE" >> ~/.xprofile
# KDE xhost fix
# grep -qF -- "$LINE" ~/.bashrc || echo "$LINE" >> ~/.bashrc
# grep -qF -- "$LINE" ~/.xinitrc || echo "$LINE" >> ~/.xinitrc
# remove kintox11 login startup
if test -f "~/.config/autostart/kinto.desktop"; then
rm ~/.config/autostart/kinto.desktop
fi
echo -e "Kinto install is \e[1m\e[32mcomplete\e[0m.\n"
if `sudo systemctl is-active --quiet xkeysnail`;then
echo -e "Kinto \e[1m\e[32mxkeysnail service is running\e[0m.\n"
echo "Commands for controlling Kinto's xkeysnail service"
echo "sudo systemctl restart xkeysnail"
echo "sudo systemctl stop xkeysnail"
echo "sudo systemctl start xkeysnail"
echo "sudo systemctl status xkeysnail"
else
echo -e "Kinto \e[1m\e[91mxkeysnail service has failed.\e[0m"
echo "You can run 'sudo systemctl status xkeysnail' for more info"
echo "You can also run 'sudo journalctl -u xkeysnail'"
fi
echo ""
if $vssublime ; then
echo -e "\e[1m\e[32mEnabled\e[0m VS Code Sublime Text remap."
fi
if $rightalt ; then
echo -e "\e[1m\e[32mEnabled\e[0m mutli-language support."
fi
elif [[ $1 == "5" || $1 == "uninstall" || $1 == "Uninstall" ]]; then
echo "Uninstalling Kinto - xkeysnail (udev)"
uninstall
removeAppleKB
sudo systemctl stop xkeysnail
sudo systemctl disable xkeysnail
sudo rm /etc/sudoers.d/limitedadmins
rm ~/.config/autostart/xkeysnail.desktop
rm -rf ~/.config/kinto
sudo rm /etc/systemd/system/xkeysnail.service
sudo rm /etc/systemd/system/graphical.target.wants/xkeysnail.service
sudo rm /usr/lib/systemd/system/xkeysnail.service
sudo systemctl daemon-reload
sudo systemctl --state=not-found --all | grep xkeysnail
budgieUninstall
exit 0
elif [[ $1 == "5" || $1 == "budgieUpdate" ]]; then
budgieUpdate
else
echo "Expected argument was not provided"
fi