Compare commits

..

35 Commits

Author SHA1 Message Date
Ben Reaves
dab65cd8f0 - Added Remmina support for RDP sessions (Linux to Windows) 2021-02-14 23:45:29 -06:00
Ben Reaves
50d53ba77f Merge pull request #385 from fracture91/browser-tab-num-jump
Make Command+Num on linux jump to tabs in browsers
2021-02-07 14:12:01 -08:00
Ben Reaves
a285e7ebe9 Merge pull request #386 from fracture91/same-app-switching-backwards
Fix Command + Shift + Grave same app switching so it moves backwards, not forwards
2021-02-04 19:59:49 -08:00
Andrew Hurle
231060ee5b Fix Command + Shift + Grave same app switching so it moves backwards 2021-02-04 21:13:42 -05:00
Andrew Hurle
f693312dce Make Command+Num on linux jump to tabs in browsers
See "Go to Tab 1 to 8" and "Go to Last Tab":

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

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

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

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

Tested with CLion, IntelliJ, PyCharm and Android Studio. Not sure if this will catch 100% of availables IDEs in Linux (for example, others like MPS, Datalore, etc.)
2021-01-10 18:45:01 +01:00
Ben Reaves
b76154d046 Update README.md 2021-01-10 03:02:01 -06:00
Ben Reaves
6fa0ec8ddd Update README.md 2021-01-10 02:45:56 -06:00
Ben Reaves
c924d91440 Update README.md 2021-01-10 02:44:51 -06:00
Ben Reaves
e9edc4891c Update README.md 2021-01-10 02:41:26 -06:00
Ben Reaves
015faa4491 - Set more execute permissions after file relocations 2021-01-09 18:30:18 -06:00
Ben Reaves
844f03ebc1 Merge pull request #357 from rbreaves/dev
- Relocated files and updated paths
2021-01-06 21:05:55 -08:00
Ben Reaves
2663bfc574 - Reset scripts to be executable 2021-01-06 23:04:22 -06:00
Ben Reaves
93743a6fa2 Merge branch 'master' into dev 2021-01-06 22:10:58 -06:00
Ben Reaves
74ef2b3a8f - Added sigint, exit for terminals in sublime/vscode 2021-01-06 22:08:17 -06:00
Ben Reaves
b5854eec66 Update README.md 2021-01-05 23:23:49 -06:00
Ben Reaves
06b235d4ea Update README.md 2021-01-05 23:13:05 -06:00
Ben Reaves
24e42c1c8a - Added Alt+Dn/Up for PgUp/PgDn on Windows 2020-12-23 15:59:36 -06:00
Ben Reaves
5f83fa9ba5 - Relocated files and updated paths 2020-12-12 12:34:08 -06:00
44 changed files with 194 additions and 148 deletions

View File

@@ -5,25 +5,24 @@
[![GitHub release](https://img.shields.io/github/release/rbreaves/kinto.svg)](https://github.com/rbreaves/kinto/releases/latest) [![GitHub release](https://img.shields.io/github/release/rbreaves/kinto.svg)](https://github.com/rbreaves/kinto/releases/latest)
\- Type in Linux & Windows like it's a Mac. \- \- Linux & Windows with Mac-style shortcut keys. \-
Seamless copy and paste with all apps and terminals. The zero effort solution. Seamless copy and paste with all apps and terminals. The zero effort solution.
v1.2 Release - Kinto now includes a system tray and simple wizard to setup the install with minimal effort. v1.2 Release - Kinto now includes a system tray and simple wizard to setup the install with minimal effort.
Kinto is powered by [xkeysnail](https://github.com/mooz/xkeysnail) for Linux & by [Autohotkey](https://github.com/Lexikos/AutoHotkey_L) for Windows 10.
### [Table of Contents ](#Table-of-Contents) ### [Table of Contents ](#Table-of-Contents)
## Donations ## Donations
If you like or appreciate this project then please consider donating. If you like or appreciate this project then please consider donating.
[Amazon wishlist](https://smile.amazon.com/hz/wishlist/ls/3EVXR21VFKD9Z?ref_=wl_share) |**Wishlists**|[Amazon](https://smile.amazon.com/hz/wishlist/ls/3EVXR21VFKD9Z?ref_=wl_share)|[Adafruit](https://www.adafruit.com/wishlists/515932)|[eBay](https://www.ebay.com/mye/myebay/WatchList?custom_list_id=636668138019)|
|---|---|---|---|
[Adafruit Wishlist](https://www.adafruit.com/wishlists/515932) If you would like to send me a keyboard directly then please reach out to me over [twitter](https://twitter.com/gbit86) and send me a DM.
[eBay Wishlist](https://www.ebay.com/mye/myebay/WatchList?custom_list_id=636668138019)
If you would like to send me a keyboard directly then please reach out to me over [twitter](https://twitter.com/gbit86) and send me a DM. I will accept shipments (of keyboards in particular) as well.
## How to install (Linux) ## How to install (Linux)
@@ -51,20 +50,24 @@ sudo apt install python3
./setup.py ./setup.py
``` ```
Troubleshoot **Troubleshoot**
If the wizard does not appear then either type in "kinto.sh" in your application overview search bar or run this following command. If the wizard does not appear then either type in "kinto.sh" in your application overview search bar or run this following command.
``` ```
~/.config/kinto/gui/kinto-gui.py ~/.config/kinto/gui/kinto-gui.py
``` ```
To Uninstall Kinto **Issues with Numpad?**
Try toggling numlock on & off (clear key on official mac keyboards). If it still does not work then restart the Kinto service and try toggling the numlock/clear key again, it will likely work after that. #369
**Uninstall Kinto**
``` ```
./setup.py -r ./setup.py -r
``` ```
Other tips **Other tips**
If you want a global menu app similar to what mac users have then I strongly recommend Ubuntu Budgie as it has the Vala Appmenu built in and ready for activation. Short of that Vala-AppMenu can be installed in various distros, mileage will vary. If you try to activate it in the latest 20.xx releases with XFCE then you may need to run the following commands. If you want a global menu app similar to what mac users have then I strongly recommend Ubuntu Budgie as it has the Vala Appmenu built in and ready for activation. Short of that Vala-AppMenu can be installed in various distros, mileage will vary. If you try to activate it in the latest 20.xx releases with XFCE then you may need to run the following commands.
@@ -97,25 +100,26 @@ py setup.py
<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/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%"> <img src="https://user-images.githubusercontent.com/10969616/85195082-322e7c80-b295-11ea-8c81-320dab424c3c.png" width="50%" height="50%">
To Uninstall Kinto - Select Uninstall **Uninstall Kinto**
``` ```
py setup.py py setup.py
``` ```
Select Uninstall
## How to use in Remote Desktop Solutions ## How to use in Remote Desktop Solutions
Currently this may be limited to Windows RDP Clients and Servers on both ends, but in theory any remote desktop solution that properly handles the Windows key should work is what I am finding. The latest version of Kinto may need to be suspended via the system tray on the computer running the Client software of the Remote Desktop solution you are using - or you can add it to the "virtm" group of the Kinto.ahk script for Windows 10. On the linux side a 3rd, but similar "define_conditional_modmap" terminals like group may need to be added to align with virtm. RDP fully works as long as the entire keyboard input is being captured. RDP had been working for ahwile with Windows but as of 2/14/2021 Linux is now supported and potentially macOS as well.
Note: virtm is just a shortname for virtual machine and remote desktop exceptions - so that remapping can happen within their OS & not on your host machine - if it can be avoided. |Program|Host OS|Client OS|Works? |Notes|
|---|---|---|---|---|
Scenarios confirmed working? |mstsc.exe (rdp)| Windows | Windows | Yes| |
Windows RDP Client -> Windows Computer |Official MS RDP| macOS | Windows | No|Use Windows in VM & RDP from it|
|Remmina| Linux | Windows | Yes|Use hover menu to enable "Grab all keyboard events"|
Scenarios that don't appear to work? |FreeRDP| Linux | Windows | Maybe|Needs to grab keyboard events fully (Add client to remotes)|
Microsoft RDP Client on a Mac -> Windows Computer |FreeRDP| macOS | Windows | Maybe|Needs to grab keyboard events fully|
FreeRDP based client on a Mac -> Windows Computer |Official MS RDP| iOS/Android | Windows | No|No workaround atm|
Android/iOS RDP Client -> Windows Computer
## Table of Contents ## Table of Contents
@@ -380,10 +384,23 @@ I'd appreciate any help from people with non-US based keyboards, to help ensure
Yet another keyboard remapping tool for X environment Yet another keyboard remapping tool for X environment
[Interception](https://gitlab.com/interception/linux/tools)
Another low level key remapper, not as easily configurable as Xkeysnail, but does not rely on X11.
[Wincent](https://github.com/wincent/wincent) by Greg Hurrell
Dot files and configurations that may help those that want mac-style shortcut keys that work under Wayland, or w/o x11.
[Vim #102: macOS keyboard bindings on Linux](https://www.youtube.com/watch?v=TBqTHesnzkI)
[mac-precision-touchpad](https://github.com/imbushuo/mac-precision-touchpad) by imbushuo [mac-precision-touchpad](https://github.com/imbushuo/mac-precision-touchpad) by imbushuo
Windows 10 touchpad to precision touchpad driver Windows 10 touchpad to precision touchpad driver
[macOS-cursors-for-Windows](https://github.com/antiden/macOS-cursors-for-Windows) by antiden
macOS cursors for Windows
[fusuma](https://github.com/iberianpig/fusuma) by iberianpig [fusuma](https://github.com/iberianpig/fusuma) by iberianpig
Multitouch gestures with libinput driver on Linux Multitouch gestures with libinput driver on Linux
@@ -392,10 +409,11 @@ Multitouch gestures with libinput driver on Linux
Linux driver for Facetime HD on macbooks Linux driver for Facetime HD on macbooks
[Fluent Terminal - Windows only](https://github.com/felixse/FluentTerminal) by felixse [Windows Terminal Preview](https://aka.ms/terminal-preview) by Microsoft
The best Terminal app built for Windows hands down. I have tried countless, but this one actually seems to get everything right, despite the lack of a GUI to configure all aspects of the program. Custom configurations have to be done via a json file - but given the performance and feature set I feel like it is the a decent trade off.
A Terminal Emulator based on UWP and web technologies. I will update Kinto to have custom configurations for this specific Terminal in the future. Will make seamless copy & paste, which already works, work even better (Cmd-C can still trigger sigint - but there is a fix for that that involves updating the json config).
[PowerToys - Windows only](https://github.com/microsoft/PowerToys) by microsoft [PowerToys - Windows only](https://github.com/microsoft/PowerToys) by microsoft
@@ -445,7 +463,7 @@ Dark & Light Theme w/ OSX controls for Elementary OS
Auto-detect the connected display hardware and load the appropriate X11 setup using xrandr Auto-detect the connected display hardware and load the appropriate X11 setup using xrandr
[Barrier](https://github.com/debauchee/barrier) by debauchee [Barrier](https://github.com/debauchee/barrier) by debauchee (Note: Does not appear to work with Kinto v1.2+, may work w/ Kinto v1.1?)
Open-source KVM software Open-source KVM software

View File

@@ -1,4 +1,4 @@
#!/usr/bin/env bash #!/bin/bash
dbus-monitor --session "type='signal',interface='org.gnome.SessionManager.Logout'" | grep '1' | dbus-monitor --session "type='signal',interface='org.gnome.SessionManager.Logout'" | grep '1' |
while read x; do while read x; do
# echo "$x" # echo "$x"

View File

Before

Width:  |  Height:  |  Size: 7.0 KiB

After

Width:  |  Height:  |  Size: 7.0 KiB

View File

Before

Width:  |  Height:  |  Size: 8.4 KiB

After

Width:  |  Height:  |  Size: 8.4 KiB

View File

0
xkeysnail-config/gui/tuxbg.png → linux/gui/tuxbg.png Executable file → Normal file
View File

Before

Width:  |  Height:  |  Size: 111 KiB

After

Width:  |  Height:  |  Size: 111 KiB

View File

Before

Width:  |  Height:  |  Size: 65 KiB

After

Width:  |  Height:  |  Size: 65 KiB

View File

Before

Width:  |  Height:  |  Size: 172 KiB

After

Width:  |  Height:  |  Size: 172 KiB

View File

Before

Width:  |  Height:  |  Size: 94 KiB

After

Width:  |  Height:  |  Size: 94 KiB

View File

@@ -1,4 +1,4 @@
#!/usr/bin/env bash #!/bin/bash
xkeycount=$(pgrep 'xkeysnail' | wc -l) xkeycount=$(pgrep 'xkeysnail' | wc -l)

55
xkeysnail-config/kinto.py → linux/kinto.py Normal file → Executable file
View File

@@ -11,6 +11,19 @@ terminals = ["kinto-gui.py","gnome-terminal","konsole","io.elementary.terminal",
terminals = [term.casefold() for term in terminals] terminals = [term.casefold() for term in terminals]
termStr = "|".join(str(x) for x in terminals) termStr = "|".join(str(x) for x in terminals)
mscodes = ["code","vscodium"]
codeStr = "|".join(str(x) for x in mscodes)
# Add remote desktop clients & VM software here
# Ideally we'd only exclude the client window,
# but that may not be easily done.
remotes = ["org.remmina.Remmina"]
remotes = [client.casefold() for client in remotes]
# Add remote desktop clients & VMs for no remapping
terminals.extend(remotes)
mscodes.extend(remotes)
# Use for browser specific hotkeys # Use for browser specific hotkeys
browsers = ["Chromium","Chromium-browser","Google-chrome","microsoft-edge-dev","microsoft-edge","Epiphany","Firefox","Discord"] browsers = ["Chromium","Chromium-browser","Google-chrome","microsoft-edge-dev","microsoft-edge","Epiphany","Firefox","Discord"]
browsers = [browser.casefold() for browser in browsers] browsers = [browser.casefold() for browser in browsers]
@@ -24,9 +37,6 @@ chromeStr = "|".join(str(x) for x in chromes)
# edges = [edge.casefold() for edge in edges] # edges = [edge.casefold() for edge in edges]
# edgeStr = "|".join(str(x) for x in edges) # edgeStr = "|".join(str(x) for x in edges)
mscodes = ["code","vscodium"]
codeStr = "|".join(str(x) for x in mscodes)
define_multipurpose_modmap( define_multipurpose_modmap(
# {Key.ENTER: [Key.ENTER, Key.RIGHT_CTRL] # Enter2Cmd # {Key.ENTER: [Key.ENTER, Key.RIGHT_CTRL] # Enter2Cmd
# {Key.CAPSLOCK: [Key.ESC, Key.RIGHT_CTRL] # Caps2Esc # {Key.CAPSLOCK: [Key.ESC, Key.RIGHT_CTRL] # Caps2Esc
@@ -107,7 +117,7 @@ define_conditional_modmap(re.compile(termStr, re.IGNORECASE), {
}) })
# Keybindings for IntelliJ # Keybindings for IntelliJ
define_keymap(re.compile("jetbrains-idea", re.IGNORECASE),{ define_keymap(re.compile("^jetbrains-(?!.*toolbox).*$", re.IGNORECASE),{
# General # General
K("C-Key_0"): K("M-Key_0"), # Open corresponding tool window K("C-Key_0"): K("M-Key_0"), # Open corresponding tool window
K("C-Key_1"): K("M-Key_1"), # Open corresponding tool window K("C-Key_1"): K("M-Key_1"), # Open corresponding tool window
@@ -209,6 +219,15 @@ define_keymap(re.compile(browserStr, re.IGNORECASE),{
K("RC-Q"): K("RC-Q"), # Close all browsers Instances K("RC-Q"): K("RC-Q"), # Close all browsers Instances
K("M-RC-I"): K("RC-Shift-I"), # Dev tools K("M-RC-I"): K("RC-Shift-I"), # Dev tools
K("M-RC-J"): K("RC-Shift-J"), # Dev tools K("M-RC-J"): K("RC-Shift-J"), # Dev tools
K("RC-Key_1"): K("M-Key_1"), # Jump to Tab #1-#8
K("RC-Key_2"): K("M-Key_2"),
K("RC-Key_3"): K("M-Key_3"),
K("RC-Key_4"): K("M-Key_4"),
K("RC-Key_5"): K("M-Key_5"),
K("RC-Key_6"): K("M-Key_6"),
K("RC-Key_7"): K("M-Key_7"),
K("RC-Key_8"): K("M-Key_8"),
K("RC-Key_9"): K("M-Key_9"), # Jump to last tab
}) })
# Open preferences in browsers # Open preferences in browsers
@@ -220,7 +239,10 @@ define_keymap(re.compile(chromeStr, re.IGNORECASE),{
}) })
# Opera C-F12 # Opera C-F12
define_keymap(None,{ # None referenced here originally
# - but remote clients and VM software ought to be set here
# These are the typical remaps for ALL GUI based apps
define_keymap(lambda wm_class: wm_class.casefold() not in remotes,{
K("RC-Space"): K("Alt-F1"), # Default SL - Launch Application Menu (gnome/kde) K("RC-Space"): K("Alt-F1"), # Default SL - Launch Application Menu (gnome/kde)
K("RC-F3"):K("Super-d"), # Default SL - Show Desktop (gnome/kde,eos) K("RC-F3"):K("Super-d"), # Default SL - Show Desktop (gnome/kde,eos)
K("RC-LC-f"):K("M-F10"), # Default SL - Maximize app (gnome/kde) K("RC-LC-f"):K("M-F10"), # Default SL - Maximize app (gnome/kde)
@@ -232,7 +254,7 @@ define_keymap(None,{
K("RC-Tab"): K("M-Tab"), # Default not-xfce4 - Cmd Tab - App Switching Default K("RC-Tab"): K("M-Tab"), # Default not-xfce4 - Cmd Tab - App Switching Default
K("RC-Shift-Tab"): K("M-Shift-Tab"), # Default not-xfce4 - Cmd Tab - App Switching Default K("RC-Shift-Tab"): K("M-Shift-Tab"), # Default not-xfce4 - Cmd Tab - App Switching Default
K("RC-Grave"): K("M-Grave"), # Default not-xfce4 - Cmd ` - Same App Switching K("RC-Grave"): K("M-Grave"), # Default not-xfce4 - Cmd ` - Same App Switching
K("RC-Shift-Grave"): K("M-Grave"), # Default not-xfce4 - Cmd ` - Same App Switching K("RC-Shift-Grave"): K("M-Shift-Grave"), # Default not-xfce4 - Cmd ` - Same App Switching
# K("Super-Right"):K("Super-Page_Up"), # SL - Change workspace (ubuntu/fedora) # K("Super-Right"):K("Super-Page_Up"), # SL - Change workspace (ubuntu/fedora)
# K("Super-Left"):K("Super-Page_Down"), # SL - Change workspace (ubuntu/fedora) # K("Super-Left"):K("Super-Page_Down"), # SL - Change workspace (ubuntu/fedora)
# K("Super-Right"):K("Super-C-Up"), # SL - Change workspace (popos) # K("Super-Right"):K("Super-C-Up"), # SL - Change workspace (popos)
@@ -259,6 +281,9 @@ define_keymap(None,{
K("Super-Tab"): K("LC-Tab"), # Default not-chromebook K("Super-Tab"): K("LC-Tab"), # Default not-chromebook
K("Super-Shift-Tab"): K("LC-Shift-Tab"), # Default not-chromebook K("Super-Shift-Tab"): K("LC-Shift-Tab"), # Default not-chromebook
# Fn to Alt style remaps
K("RM-Enter"): K("insert"), # Insert
# emacs style # emacs style
K("Super-a"): K("Home"), # Beginning of Line K("Super-a"): K("Home"), # Beginning of Line
K("Super-e"): K("End"), # End of Line K("Super-e"): K("End"), # End of Line
@@ -341,7 +366,10 @@ define_keymap(re.compile(codeStr, re.IGNORECASE),{
K("C-g"): K("f3"), # find_next K("C-g"): K("f3"), # find_next
K("Shift-f3"): pass_through_key, # cancel find_prev K("Shift-f3"): pass_through_key, # cancel find_prev
K("C-Shift-g"): K("Shift-f3"), # find_prev K("C-Shift-g"): K("Shift-f3"), # find_prev
K("Super-c"): K("LC-c"), # Sigints - interrupt # K("Super-c"): K("LC-c"), # Default - Terminal - Sigint
# K("Super-x"): K("LC-x"), # Default - Terminal - Exit nano
# K("M-c"): K("LC-c"), # Chromebook/IBM - Terminal - Sigint
# K("M-x"): K("LC-x"), # Chromebook/IBM - Terminal - Exit nano
# K("Super-C-g"): K("C-f2"), # Default - Sublime - find_all_under # K("Super-C-g"): K("C-f2"), # Default - Sublime - find_all_under
# K("C-M-g"): K("C-f2"), # Chromebook/IBM - Sublime - find_all_under # K("C-M-g"): K("C-f2"), # Chromebook/IBM - Sublime - find_all_under
# K("Super-Shift-up"): K("M-Shift-up"), # multi-cursor up - Sublime # K("Super-Shift-up"): K("M-Shift-up"), # multi-cursor up - Sublime
@@ -352,6 +380,10 @@ define_keymap(re.compile(codeStr, re.IGNORECASE),{
# Keybindings for Sublime Text # Keybindings for Sublime Text
define_keymap(re.compile("Sublime_text", re.IGNORECASE),{ define_keymap(re.compile("Sublime_text", re.IGNORECASE),{
# K("Super-c"): K("LC-c"), # Default - Terminal - Sigint
# K("Super-x"): K("LC-x"), # Default - Terminal - Exit nano
# K("M-c"): K("LC-c"), # Chromebook/IBM - Terminal - Sigint
# K("M-x"): K("LC-x"), # Chromebook/IBM - Terminal - Exit nano
K("Super-Space"): K("C-Space"), # Basic code completion K("Super-Space"): K("C-Space"), # Basic code completion
K("C-Super-up"): K("M-o"), # Switch file K("C-Super-up"): K("M-o"), # Switch file
K("Super-RC-f"): K("f11"), # toggle_full_screen K("Super-RC-f"): K("f11"), # toggle_full_screen
@@ -447,9 +479,14 @@ define_keymap(re.compile(termStr, re.IGNORECASE),{
K("LC-Tab") : K("LC-PAGE_DOWN"), K("LC-Tab") : K("LC-PAGE_DOWN"),
K("LC-Shift-Tab") : K("LC-PAGE_UP"), K("LC-Shift-Tab") : K("LC-PAGE_UP"),
K("LC-Grave") : K("LC-PAGE_UP"), K("LC-Grave") : K("LC-PAGE_UP"),
# K("M-Tab"): pass_through_key, # Default not-xfce4 - Cmd Tab - App Switching Default
# K("RC-Tab"): K("M-Tab"), # Default not-xfce4 - Cmd Tab - App Switching Default
# K("RC-Shift-Tab"): K("M-Shift-Tab"), # Default not-xfce4 - Cmd Tab - App Switching Default
# Cmd Tab - App Switching Default
# K("RC-Tab"): K("RC-backslash"), # xfce4
# K("RC-Shift-Tab"): K("RC-Shift-backslash"), # xfce4
# K("RC-Grave"): K("RC-Shift-backslash"), # xfce4
# Converts Cmd to use Ctrl-Shift # 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-V"): K("C-Shift-V"),
K("RC-MINUS"): K("C-Shift-MINUS"), K("RC-MINUS"): K("C-Shift-MINUS"),
K("RC-EQUAL"): K("C-Shift-EQUAL"), K("RC-EQUAL"): K("C-Shift-EQUAL"),

View File

@@ -1,4 +1,4 @@
#!/usr/bin/env bash #!/bin/bash
if [ -f {homedir}/.config/systemd/user/keyswap.timer ]; then if [ -f {homedir}/.config/systemd/user/keyswap.timer ]; then
systemctl --user stop keyswap.timer >/dev/null 2>&1 systemctl --user stop keyswap.timer >/dev/null 2>&1
systemctl --user disable keyswap.timer >/dev/null 2>&1 systemctl --user disable keyswap.timer >/dev/null 2>&1

View File

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

View File

@@ -1,36 +1,4 @@
#!/usr/bin/env bash #!/bin/bash
unamestr=$(uname)
if [ "$unamestr" = 'FreeBSD' ]; then
DESKTOP="unknown"
ps -aux | grep -E '[s]tart-hello'
if [ $? -ne 1 ];then
echo "hellosystem"
exit 0
fi
ps -aux | grep -E '[o]penbox'
if [ $? -ne 1 ];then
echo "openbox"
exit 0
fi
ps -aux | grep -E '[m]ate-panel'
if [ $? -ne 1 ];then
echo "mate"
exit 0
fi
ps -aux | grep -E '[x]fce4-session'
if [ $? -ne 1 ];then
echo "xfce"
exit 0
fi
fi
function detect_budgie() function detect_budgie()
{ {

View File

@@ -1,4 +1,4 @@
#!/usr/bin/env bash #!/bin/bash
if pkgmgr="$( which apt-get )" 2> /dev/null; then if pkgmgr="$( which apt-get )" 2> /dev/null; then
echo "Debian" echo "Debian"

View File

Before

Width:  |  Height:  |  Size: 3.0 KiB

After

Width:  |  Height:  |  Size: 3.0 KiB

View File

Before

Width:  |  Height:  |  Size: 3.0 KiB

After

Width:  |  Height:  |  Size: 3.0 KiB

View File

Before

Width:  |  Height:  |  Size: 2.2 KiB

After

Width:  |  Height:  |  Size: 2.2 KiB

View File

Before

Width:  |  Height:  |  Size: 2.2 KiB

After

Width:  |  Height:  |  Size: 2.2 KiB

View File

Before

Width:  |  Height:  |  Size: 2.1 KiB

After

Width:  |  Height:  |  Size: 2.1 KiB

View File

Before

Width:  |  Height:  |  Size: 2.1 KiB

After

Width:  |  Height:  |  Size: 2.1 KiB

View File

Before

Width:  |  Height:  |  Size: 2.4 KiB

After

Width:  |  Height:  |  Size: 2.4 KiB

View File

View File

View File

@@ -1,4 +1,4 @@
#!/usr/bin/env bash #!/bin/bash
# >/dev/null 2>&1 # >/dev/null 2>&1
if [ -f /usr/local/bin/xkeysnail ];then if [ -f /usr/local/bin/xkeysnail ];then

View File

@@ -113,7 +113,7 @@ if len(check_x11) == 0:
sys.exit() sys.exit()
distro = cmdline("awk -F= '$1==\"NAME\" { print $2 ;}' /etc/os-release").replace('"','').strip().split(" ")[0] distro = cmdline("awk -F= '$1==\"NAME\" { print $2 ;}' /etc/os-release").replace('"','').strip().split(" ")[0]
dename = cmdline("./system-config/dename.sh").replace('"','').strip().split(" ")[0].lower() dename = cmdline("./linux/system-config/dename.sh").replace('"','').strip().split(" ")[0].lower()
run_pkg = "" run_pkg = ""

View File

@@ -263,6 +263,10 @@ GroupAdd, intellij, ahk_exe idea64.exe
; Static ; Static
$LCtrl up::Send {Ctrl down}{LWin up}{Ctrl up} $LCtrl up::Send {Ctrl down}{LWin up}{Ctrl up}
; Disable Win-Up/Down - interferes with Sublime text 3 multi-cursors
#Down::return
#Up::return
; temporary hack to ensure keys don't get stuck ; temporary hack to ensure keys don't get stuck
; impacts Alt-Tab fix ; impacts Alt-Tab fix
; Primary ; Primary
@@ -270,6 +274,24 @@ GroupAdd, intellij, ahk_exe idea64.exe
; $LWin up::Send {LWin up}{LAlt up}{LCtrl up} ; MacModifiers ; $LWin up::Send {LWin up}{LAlt up}{LCtrl up} ; MacModifiers
; $LAlt up::Send {LWin up}{CapsLock up}{LAlt up}{LCtrl up} ; CB/IBM ; $LAlt up::Send {LWin up}{CapsLock up}{LAlt up}{LCtrl up} ; CB/IBM
!Enter::
{
if (GetKeyState("RAlt", "P")) {
Send {Insert}
}
else{
Send {Alt down}{Enter}{Alt up}
}
Return
}
; Remap Alt+Esc to Break/Pause
!Esc::SendInput, {Pause}
; Go up or down a page
$!Down::Send {PgDn};
$!Up::Send {PgUp};
; Close Apps ; Close Apps
^q::Send !{F4} ^q::Send !{F4}
@@ -478,12 +500,19 @@ GroupAdd, intellij, ahk_exe idea64.exe
!+g::send ^+{G} ; View source control !+g::send ^+{G} ; View source control
; $#c::Send {Ctrl down}c{Ctrl up} ; Default - Sigints interrupt ; $#c::Send {Ctrl down}c{Ctrl up} ; Default - Sigints interrupt
; $!c::Send {Ctrl down}c{Ctrl up} ; CB/IBM ; $!c::Send {Ctrl down}c{Ctrl up} ; CB/IBM
; $#x::Send {Ctrl down}x{Ctrl up} ; Default - Sigints interrupt
; $!x::Send {Ctrl down}x{Ctrl up} ; CB/IBM
; #Space::Send ^{Space} ; Default - Basic code completion ; #Space::Send ^{Space} ; Default - Basic code completion
; !Space::Send ^{Space} ; CB/IBM - Basic code completion ; !Space::Send ^{Space} ; CB/IBM - Basic code completion
#If #If
#IfWinActive ahk_exe sublime_text.exe #IfWinActive ahk_exe sublime_text.exe
; #x::Send ^{x} ; Default - Terminal - Ctrl-x
; #c::Send ^{c} ; Default - Terminal - Ctrl-c sigint
; !x::Send ^{x} ; CB/IBM
; !c::Send ^{c} ; CB/IBM
; #c::send ^{Pause} ; cancel_build
; #Space::Send ^{Space} ; Default - Basic code completion ; #Space::Send ^{Space} ; Default - Basic code completion
; !Space::Send ^{Space} ; CB/IBM - Basic code completion ; !Space::Send ^{Space} ; CB/IBM - Basic code completion
#^Up::send !{O} ; Switch file #^Up::send !{O} ; Switch file
@@ -524,7 +553,6 @@ GroupAdd, intellij, ahk_exe idea64.exe
^+Down::Return ; cancel swap_line_down ^+Down::Return ; cancel swap_line_down
#!Down::send ^+{Down} ; swap_line_down #!Down::send ^+{Down} ; swap_line_down
^Pause::Return ; cancel cancel_build ^Pause::Return ; cancel cancel_build
#c::send ^{Pause} ; cancel_build
F9::Return ; cancel sort_lines case_s false F9::Return ; cancel sort_lines case_s false
F5::send {F9} ; sort_lines case_s false F5::send {F9} ; sort_lines case_s false
#F9::Return ; cancel sort_lines case_s true #F9::Return ; cancel sort_lines case_s true

View File

@@ -1,4 +1,4 @@
#!/usr/bin/env bash #!/bin/bash
# set about:config?filter=ui.key.menuAccessKeyFocuses # set about:config?filter=ui.key.menuAccessKeyFocuses
# to false for wordwise to work in Firefox # to false for wordwise to work in Firefox
@@ -6,7 +6,7 @@
typeset -l distro typeset -l distro
distro=$(awk -F= '$1=="NAME" { gsub("[\",!,_, ]","",$2);print $2 ;}' /etc/os-release) distro=$(awk -F= '$1=="NAME" { gsub("[\",!,_, ]","",$2);print $2 ;}' /etc/os-release)
typeset -l dename typeset -l dename
dename=$(./system-config/dename.sh | cut -d " " -f1) dename=$(./linux/system-config/dename.sh | cut -d " " -f1)
function uninstall { function uninstall {
@@ -123,14 +123,14 @@ function budgieUpdate {
if [ "$yn" == "y" ]; then if [ "$yn" == "y" ]; then
budgieVersion="$(/usr/bin/budgie-desktop --version | awk '{ print $2; }' | head -n1)" budgieVersion="$(/usr/bin/budgie-desktop --version | awk '{ print $2; }' | head -n1)"
if [ "$budgieVersion" == "10.5.1" ]; then if [ "$budgieVersion" == "10.5.1" ]; then
if ! [ -f ./system-config/budgie-daemon_10.5.1 ]; then if ! [ -f ./linux/system-config/budgie-daemon_10.5.1 ]; then
wget https://github.com/rbreaves/budgie-desktop/blob/binaries/binaries/budgie-daemon_10.5.1?raw=true -O ./system-config/budgie-daemon_10.5.1 wget https://github.com/rbreaves/budgie-desktop/blob/binaries/binaries/budgie-daemon_10.5.1?raw=true -O ./linux/system-config/budgie-daemon_10.5.1
fi fi
bdmd5=$(md5sum /usr/bin/budgie-daemon | awk '{ print $1 }') bdmd5=$(md5sum /usr/bin/budgie-daemon | awk '{ print $1 }')
newbdmd5=$(md5sum ./system-config/budgie-daemon_10.5.1 | awk '{ print $1 }') newbdmd5=$(md5sum ./linux/system-config/budgie-daemon_10.5.1 | awk '{ print $1 }')
if [ "$bdmd5" != "$newbdmd5" ]; then if [ "$bdmd5" != "$newbdmd5" ]; then
cp /usr/bin/budgie-daemon ./budgie-daemon_"$budgieVersion".bak 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 sudo pkill budgie-daemon && sudo cp ./linux/system-config/budgie-daemon_10.5.1 /usr/bin/budgie-daemon
echo "Updated Budgie to use App Switching Patch" echo "Updated Budgie to use App Switching Patch"
else else
echo "Budgie-daemon already patched, skipping replacement." echo "Budgie-daemon already patched, skipping replacement."
@@ -146,11 +146,11 @@ function budgieUpdate {
esac esac
done done
if [ "$yn" == "y" ]; then if [ "$yn" == "y" ]; then
if ! [ -f ./system-config/budgie-daemon_10.5.1 ]; then if ! [ -f ./linux/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 wget https://github.com/rbreaves/budgie-desktop/raw/43d3b44243b0bcaee3262a79818024a651475b58/binaries/budgie-daemon_10.5.1 -O ./linux/system-config/budgie-daemon_10.5.1
fi fi
cp /usr/bin/budgie-daemon ./budgie-daemon_"$budgieVersion".bak 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 sudo pkill budgie-daemon && sudo cp ./linux/system-config/budgie-daemon_10.5.1 /usr/bin/budgie-daemon
echo "Updated Budgie to use App Switching Patch" echo "Updated Budgie to use App Switching Patch"
fi fi
fi fi
@@ -243,15 +243,15 @@ fi
if ! [ -x "$(command -v xhost)" ] || ! [ -x "$(command -v gcc)" ]; then if ! [ -x "$(command -v xhost)" ] || ! [ -x "$(command -v gcc)" ]; then
if [ "$distro" == "manjarolinux" ]; then if [ "$distro" == "manjarolinux" ]; then
sudo ./system-config/unipkg.sh "xorg-xhost gcc" sudo ./linux/system-config/unipkg.sh "xorg-xhost gcc"
fi fi
fi fi
if [[ $dename == "kde" ]]; then if [[ $dename == "kde" ]]; then
if [[ $distro == "manjarolinux" ]]; then if [[ $distro == "manjarolinux" ]]; then
sudo ./system-config/unipkg.sh vte3 sudo ./linux/system-config/unipkg.sh vte3
else else
sudo ./system-config/unipkg.sh libvte-2.91-dev sudo ./linux/system-config/unipkg.sh libvte-2.91-dev
fi fi
fi fi
if [[ $distro == 'kdeneon' ]]; then if [[ $distro == 'kdeneon' ]]; then
@@ -324,15 +324,11 @@ expsh=" "
# sudo systemctl enable xkeysnail >/dev/null 2>&1 # sudo systemctl enable xkeysnail >/dev/null 2>&1
# if ! [ -x "$(command -v inotifywait)" ]; then # if ! [ -x "$(command -v inotifywait)" ]; then
# echo "Will need to install inotify-tools to restart key remapper live for config file changes..." # echo "Will need to install inotify-tools to restart key remapper live for config file changes..."
# sudo ./system-config/unipkg.sh inotify-tools # sudo ./linux/system-config/unipkg.sh inotify-tools
# fi # fi
if ! [ -x "$(command -v pip3)" ]; then if ! [ -x "$(command -v pip3)" ]; then
if [ "$distro" == "freebsd" ]; then
sudo python3 -m ensurepip
else
echo "Will need to install python3-pip..." echo "Will need to install python3-pip..."
sudo ./system-config/unipkg.sh python3-pip sudo ./linux/system-config/unipkg.sh python3-pip
fi
fi fi
if ! [ -x "$(command -v python3-config)" ]; then if ! [ -x "$(command -v python3-config)" ]; then
if [ "$distro" == "ubuntu" ] || [ "$distro" == "debian" ] || [ "$distro" == 'linuxmint' ]; then if [ "$distro" == "ubuntu" ] || [ "$distro" == "debian" ] || [ "$distro" == 'linuxmint' ]; then
@@ -342,15 +338,15 @@ if ! [ -x "$(command -v python3-config)" ]; then
fi fi
if [ "$distro" == "gnome" ] || [ "$distro" == "fedora" ] || [ "$distro" == "debian" ] || [ "$distro" == 'linuxmint' ]; then if [ "$distro" == "gnome" ] || [ "$distro" == "fedora" ] || [ "$distro" == "debian" ] || [ "$distro" == 'linuxmint' ]; then
echo "Will need to install $pydev..." echo "Will need to install $pydev..."
sudo ./system-config/unipkg.sh "$pydev" sudo ./linux/system-config/unipkg.sh "$pydev"
fi fi
fi fi
# if [ "$distro" == "ubuntu" ] && [ "$dename" == "gnome" ];then # if [ "$distro" == "ubuntu" ] && [ "$dename" == "gnome" ];then
# sudo ./system-config/unipkg.sh gnome-tweaks gnome-shell-extension-appindicator gir1.2-appindicator3-0.1 # sudo ./linux/system-config/unipkg.sh gnome-tweaks gnome-shell-extension-appindicator gir1.2-appindicator3-0.1
# fi # fi
if ! [ -x "$(command -v xhost)" ] || ! [ -x "$(command -v gcc)" ]; then if ! [ -x "$(command -v xhost)" ] || ! [ -x "$(command -v gcc)" ]; then
if [ "$distro" == "\"manjaro linux\"" ]; then if [ "$distro" == "\"manjaro linux\"" ]; then
sudo ./system-config/unipkg.sh "xorg-xhost gcc" sudo ./linux/system-config/unipkg.sh "xorg-xhost gcc"
fi fi
fi fi
if [ "$distro" == 'linuxmint' ]; then if [ "$distro" == 'linuxmint' ]; then
@@ -367,103 +363,103 @@ mkdir -p ~/.config/kinto
# KDE startup - xhost fix # KDE startup - xhost fix
mkdir -p ~/.config/autostart mkdir -p ~/.config/autostart
yes | cp -rf ./xkeysnail-config/xkeysnail.desktop ~/.config/kinto/xkeysnail.desktop yes | cp -rf ./linux/xkeysnail.desktop ~/.config/kinto/xkeysnail.desktop
# yes | cp -rf ./xkeysnail-config/xkeystart.sh ~/.config/kinto/xkeystart.sh # yes | cp -rf ./linux/xkeystart.sh ~/.config/kinto/xkeystart.sh
# *** More testing needing, universal way of killing kinto on user log out? *** # *** More testing needing, universal way of killing kinto on user log out? ***
# yes | sudo cp -rf xkeysnail-config/root_logoff.sh /usr/local/bin/logoff.sh # yes | sudo cp -rf linux/root_logoff.sh /usr/local/bin/logoff.sh
# sudo chown root:root /usr/local/bin/logoff.sh # sudo chown root:root /usr/local/bin/logoff.sh
# sudo chmod u+rwx /usr/local/bin/logoff.sh # sudo chmod u+rwx /usr/local/bin/logoff.sh
# sudo chmod go-w+rx /usr/local/bin/logoff.sh # sudo chmod go-w+rx /usr/local/bin/logoff.sh
# *** End universal killing of kinto # *** End universal killing of kinto
# logoff fix - not solid for every os. Prevents missed 1 character input on login # logoff fix - not solid for every os. Prevents missed 1 character input on login
# yes | sudo cp -rf xkeysnail-config/gnome_logoff.sh ~/.config/kinto/logoff.sh # yes | sudo cp -rf linux/gnome_logoff.sh ~/.config/kinto/logoff.sh
echo "$(git describe --tag --abbrev=0 | head -n 1)" "build" "$(git rev-parse --short HEAD)" > ~/.config/kinto/version echo "$(git describe --tag --abbrev=0 | head -n 1)" "build" "$(git rev-parse --short HEAD)" > ~/.config/kinto/version
yes | cp -rf ./xkeysnail-config/kinto.py ./xkeysnail-config/kinto.py.new yes | cp -rf ./linux/kinto.py ./linux/kinto.py.new
yes | cp -rf ./xkeysnail-config/limitedadmins ./xkeysnail-config/limitedadmins.new yes | cp -rf ./linux/limitedadmins ./linux/limitedadmins.new
yes | cp -rf ./xkeysnail-config/gui/ ~/.config/kinto/gui yes | cp -rf ./linux/gui/ ~/.config/kinto/
yes | cp -nrf ./xkeysnail-config/initkb ~/.config/kinto/initkb yes | cp -nrf ./linux/initkb ~/.config/kinto/initkb
yes | cp -rf ./xkeysnail-config/killdups.sh ~/.config/kinto/killdups.sh yes | cp -rf ./linux/killdups.sh ~/.config/kinto/killdups.sh
yes | cp -rf ./xkeysnail-config/trayapps/appindicator/kintotray.py ~/.config/kinto/kintotray.py yes | cp -rf ./linux/trayapps/appindicator/kintotray.py ~/.config/kinto/kintotray.py
yes | cp -rf ./xkeysnail-config/trayapps/appindicator/kintotray.desktop ~/.config/kinto/kintotray.desktop yes | cp -rf ./linux/trayapps/appindicator/kintotray.desktop ~/.config/kinto/kintotray.desktop
yes | cp -rf ./xkeysnail-config/gui/kinto.desktop ./xkeysnail-config/gui/kinto.desktop.new yes | cp -rf ./linux/gui/kinto.desktop ./linux/gui/kinto.desktop.new
yes | cp -rf ./xkeysnail-config/trayapps/appindicator/icons/kinto-color-16.svg ~/.config/kinto/kinto-color.svg yes | cp -rf ./linux/trayapps/appindicator/icons/kinto-color-16.svg ~/.config/kinto/kinto-color.svg
yes | cp -rf ./xkeysnail-config/trayapps/appindicator/icons/kinto-color-16.svg ~/.config/kinto/kinto-color-48.svg yes | cp -rf ./linux/trayapps/appindicator/icons/kinto-color-16.svg ~/.config/kinto/kinto-color-48.svg
yes | cp -rf ./xkeysnail-config/trayapps/appindicator/icons/kinto-invert-16.svg ~/.config/kinto/kinto-invert.svg yes | cp -rf ./linux/trayapps/appindicator/icons/kinto-invert-16.svg ~/.config/kinto/kinto-invert.svg
yes | cp -rf ./xkeysnail-config/trayapps/appindicator/icons/kinto-solid-16.svg ~/.config/kinto/kinto-solid.svg yes | cp -rf ./linux/trayapps/appindicator/icons/kinto-solid-16.svg ~/.config/kinto/kinto-solid.svg
yes | cp -rf ./xkeysnail-config/trayapps/appindicator/icons/kinto.svg ~/.config/kinto/kinto.svg yes | cp -rf ./linux/trayapps/appindicator/icons/kinto.svg ~/.config/kinto/kinto.svg
# yes | cp -rf ./system-config/caret_status_xkey.sh ~/.config/kinto/caret_status_xkey.sh # yes | cp -rf ./linux/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 ./linux/xkeysnail.service ./linux/xkeysnail.service.new
# yes | cp -rf ./xkeysnail-config/xkeysnail.timer ~/.config/systemd/user/xkeysnail.timer # yes | cp -rf ./linux/xkeysnail.timer ~/.config/systemd/user/xkeysnail.timer
sed -i "s#{experimental-caret}#$exp#g" ./xkeysnail-config/xkeysnail.service.new sed -i "s#{experimental-caret}#$exp#g" ./linux/xkeysnail.service.new
if [ "$expsh" != " " ];then if [ "$expsh" != " " ];then
sed -i "s#{kill-caret}#/usr/bin/pkill -f $expsh#g" ./xkeysnail-config/xkeysnail.service.new sed -i "s#{kill-caret}#/usr/bin/pkill -f $expsh#g" ./linux/xkeysnail.service.new
else else
sed -i "s#{kill-caret}#$expsh#g" ./xkeysnail-config/xkeysnail.service.new sed -i "s#{kill-caret}#$expsh#g" ./linux/xkeysnail.service.new
fi fi
sed -i "s/{username}/`whoami`/g" ./xkeysnail-config/xkeysnail.service.new sed -i "s/{username}/`whoami`/g" ./linux/xkeysnail.service.new
sed -i "s#{homedir}#`echo "$HOME"`#g" ./xkeysnail-config/xkeysnail.service.new sed -i "s#{homedir}#`echo "$HOME"`#g" ./linux/xkeysnail.service.new
sed -i "s#{homedir}#`echo "$HOME"`#g" ~/.config/kinto/kintotray.desktop sed -i "s#{homedir}#`echo "$HOME"`#g" ~/.config/kinto/kintotray.desktop
sed -i "s#{homedir}#`echo "$HOME"`#g" ~/.config/kinto/gui/kinto-gui.py sed -i "s#{homedir}#`echo "$HOME"`#g" ~/.config/kinto/gui/kinto-gui.py
sed -i "s#{homedir}#`echo "$HOME"`#g" ./xkeysnail-config/gui/kinto.desktop.new sed -i "s#{homedir}#`echo "$HOME"`#g" ./linux/gui/kinto.desktop.new
sudo mv ./xkeysnail-config/gui/kinto.desktop.new /usr/share/applications/kinto.desktop sudo mv ./linux/gui/kinto.desktop.new /usr/share/applications/kinto.desktop
sed -i "s#{xhost}#`\\which xhost`#g" ./xkeysnail-config/xkeysnail.service.new sed -i "s#{xhost}#`\\which xhost`#g" ./linux/xkeysnail.service.new
sed -i "s/{username}/`whoami`/g" ./xkeysnail-config/limitedadmins.new sed -i "s/{username}/`whoami`/g" ./linux/limitedadmins.new
sed -i "s#{systemctl}#`\\which systemctl`#g" ./xkeysnail-config/limitedadmins.new sed -i "s#{systemctl}#`\\which systemctl`#g" ./linux/limitedadmins.new
sed -i "s#{pkill}#`\\which pkill`#g" ./xkeysnail-config/limitedadmins.new sed -i "s#{pkill}#`\\which pkill`#g" ./linux/limitedadmins.new
sed -i "s#{systemctl}#`\\which systemctl`#g" ~/.config/kinto/xkeysnail.desktop sed -i "s#{systemctl}#`\\which systemctl`#g" ~/.config/kinto/xkeysnail.desktop
sed -i "s#{xhost}#`\\which xhost`#g" ~/.config/kinto/xkeysnail.desktop sed -i "s#{xhost}#`\\which xhost`#g" ~/.config/kinto/xkeysnail.desktop
sed -i "s#{homedir}#`echo "$HOME"`#g" ~/.config/kinto/xkeysnail.desktop sed -i "s#{homedir}#`echo "$HOME"`#g" ~/.config/kinto/xkeysnail.desktop
# sed -i "s#{homedir}#`echo "$HOME"`#g" ~/.config/kinto/prexk.sh # sed -i "s#{homedir}#`echo "$HOME"`#g" ~/.config/kinto/prexk.sh
sed -i "s/{displayid}/`echo "$DISPLAY"`/g" ./xkeysnail-config/xkeysnail.service.new sed -i "s/{displayid}/`echo "$DISPLAY"`/g" ./linux/xkeysnail.service.new
# sed -i "s/{displayid}/`echo "$DISPLAY"`/g" ~/.config/kinto/prexk.sh # sed -i "s/{displayid}/`echo "$DISPLAY"`/g" ~/.config/kinto/prexk.sh
if [[ $dename == "budgie" ]]; then if [[ $dename == "budgie" ]]; then
perl -pi -e "s/\s{4}(# )(K.*)(# Default SL - Change workspace.*budgie.*)/ \$2\$3/g" ./xkeysnail-config/kinto.py.new >/dev/null 2>&1 perl -pi -e "s/\s{4}(# )(K.*)(# Default SL - Change workspace.*budgie.*)/ \$2\$3/g" ./linux/kinto.py.new >/dev/null 2>&1
fi fi
if [[ $distro == "popos" ]]; then if [[ $distro == "popos" ]]; then
perl -pi -e "\s{4}(# )(K.*)(# SL - .*popos.*)/ \$2\$3/g" ./xkeysnail-config/kinto.py.new >/dev/null 2>&1 perl -pi -e "\s{4}(# )(K.*)(# SL - .*popos.*)/ \$2\$3/g" ./linux/kinto.py.new >/dev/null 2>&1
fi fi
if [[ $distro == "fedora" ]]; then if [[ $distro == "fedora" ]]; then
perl -pi -e "\s{4}(# )(K.*)(# SL - .*fedora.*)/ \$2\$3/g" ./xkeysnail-config/kinto.py.new >/dev/null 2>&1 perl -pi -e "\s{4}(# )(K.*)(# SL - .*fedora.*)/ \$2\$3/g" ./linux/kinto.py.new >/dev/null 2>&1
fi fi
if [[ $distro == "elementaryos" ]]; then if [[ $distro == "elementaryos" ]]; then
perl -pi -e "\s{4}(# )(K.*)(# SL - .*eos.*)/ \$2\$3/g" ./xkeysnail-config/kinto.py.new >/dev/null 2>&1 perl -pi -e "\s{4}(# )(K.*)(# SL - .*eos.*)/ \$2\$3/g" ./linux/kinto.py.new >/dev/null 2>&1
fi fi
if [[ "$distro" == "manjaro"* ]]; then if [[ "$distro" == "manjaro"* ]]; then
perl -pi -e "\s{4}(# )(K.*)(# SL - .*manjaro.*)/ \$2\$3/g" ./xkeysnail-config/kinto.py.new >/dev/null 2>&1 perl -pi -e "\s{4}(# )(K.*)(# SL - .*manjaro.*)/ \$2\$3/g" ./linux/kinto.py.new >/dev/null 2>&1
fi fi
if [[ $dename == "gnome" ]]; then if [[ $dename == "gnome" ]]; then
perl -pi -e "\s{4}(# )(K.*)(# SL - .*ubuntu.*)/ \$2\$3/g" ./xkeysnail-config/kinto.py.new >/dev/null 2>&1 perl -pi -e "\s{4}(# )(K.*)(# SL - .*ubuntu.*)/ \$2\$3/g" ./linux/kinto.py.new >/dev/null 2>&1
fi fi
if [[ $dename == "kde" ]]; then if [[ $dename == "kde" ]]; then
echo "Applying Cmd-Space to open App Launcher for KDE..." echo "Applying Cmd-Space to open App Launcher for KDE..."
perl -pi -e "s/(# )(.*)(#.*kde)/\$2\$3/g" ./xkeysnail-config/kinto.py.new >/dev/null 2>&1 perl -pi -e "s/(# )(.*)(#.*kde)/\$2\$3/g" ./linux/kinto.py.new >/dev/null 2>&1
fi fi
if [[ $dename == "xfce" ]]; then if [[ $dename == "xfce" ]]; then
perl -pi -e "\s{4}(# )(K.*)(# SL - .*xfce.*)/ \$2\$3/g" ./xkeysnail-config/kinto.py.new >/dev/null 2>&1 perl -pi -e "\s{4}(# )(K.*)(# SL - .*xfce.*)/ \$2\$3/g" ./linux/kinto.py.new >/dev/null 2>&1
perl -pi -e "s/(# )(.*)(# xfce4)/\$2\$3/g" ./xkeysnail-config/kinto.py.new perl -pi -e "s/(# )(.*)(# xfce4)/\$2\$3/g" ./linux/kinto.py.new
perl -pi -e "s/(\w.*)(# Default not-xfce4)/# \$1\$2/g" ./xkeysnail-config/kinto.py.new perl -pi -e "s/(\w.*)(# Default not-xfce4)/# \$1\$2/g" ./linux/kinto.py.new
fi fi
if [[ $dename == "xfce" ]] && ls /etc/apt/sources.list.d/enso* 1> /dev/null 2>&1; then if [[ $dename == "xfce" ]] && ls /etc/apt/sources.list.d/enso* 1> /dev/null 2>&1; then
echo "enso OS detected, applying Cmd-Space for Launchy..." echo "enso OS detected, applying Cmd-Space for Launchy..."
perl -pi -e "s/(K\(\"RC-Space)(.*)(# )(xfce4)/\$3\$1\$2\$3\$4/g" ./xkeysnail-config/kinto.py.new >/dev/null 2>&1 perl -pi -e "s/(K\(\"RC-Space)(.*)(# )(xfce4)/\$3\$1\$2\$3\$4/g" ./linux/kinto.py.new >/dev/null 2>&1
xfconf-query --channel xfce4-keyboard-shortcuts --property "/commands/custom/<Primary>space" --create --type string --set "launchy" xfconf-query --channel xfce4-keyboard-shortcuts --property "/commands/custom/<Primary>space" --create --type string --set "launchy"
fi fi
if ! [[ $1 == "5" || $1 == "uninstall" || $1 == "Uninstall" ]]; then if ! [[ $1 == "5" || $1 == "uninstall" || $1 == "Uninstall" ]]; then
mv ./xkeysnail-config/kinto.py.new ~/.config/kinto/kinto.py mv ./linux/kinto.py.new ~/.config/kinto/kinto.py
# if [ "$distro" == "fedora" ];then # if [ "$distro" == "fedora" ];then
sudo rm /etc/systemd/system/xkeysnail.service >/dev/null 2>&1 sudo rm /etc/systemd/system/xkeysnail.service >/dev/null 2>&1
if [ -d /usr/lib/systemd/system ];then if [ -d /usr/lib/systemd/system ];then
@@ -474,8 +470,7 @@ if ! [[ $1 == "5" || $1 == "uninstall" || $1 == "Uninstall" ]]; then
xhost +SI:localuser:root xhost +SI:localuser:root
git clone --depth 10 https://github.com/rbreaves/xkeysnail.git git clone --depth 10 https://github.com/rbreaves/xkeysnail.git
cd xkeysnail cd xkeysnail
git pull --depth 10 git checkout kinto
git checkout 51c369084e0045a8410d227bab52411bf84fb65b
giturl=$(git ls-remote --get-url) giturl=$(git ls-remote --get-url)
if [ "$giturl" != "https://github.com/rbreaves/xkeysnail.git" ];then if [ "$giturl" != "https://github.com/rbreaves/xkeysnail.git" ];then
echo -e "\nreplacing xkeysnail with fork...\n" echo -e "\nreplacing xkeysnail with fork...\n"
@@ -483,7 +478,7 @@ if ! [[ $1 == "5" || $1 == "uninstall" || $1 == "Uninstall" ]]; then
rm -rf ./xkeysnail rm -rf ./xkeysnail
git clone --depth 10 https://github.com/rbreaves/xkeysnail.git git clone --depth 10 https://github.com/rbreaves/xkeysnail.git
cd xkeysnail cd xkeysnail
git checkout 51c369084e0045a8410d227bab52411bf84fb65b git checkout kinto
fi fi
sudo pip3 install --upgrade . sudo pip3 install --upgrade .
cd .. cd ..
@@ -494,12 +489,12 @@ if ! [[ $1 == "5" || $1 == "uninstall" || $1 == "Uninstall" ]]; then
echo -e "Run 'sudo pip3 install --upgrade .' to debug issue" echo -e "Run 'sudo pip3 install --upgrade .' to debug issue"
exit 0 exit 0
fi fi
sed -i "s#{xkeysnail}#`which xkeysnail`#g" ./xkeysnail-config/xkeysnail.service.new sed -i "s#{xkeysnail}#`which xkeysnail`#g" ./linux/xkeysnail.service.new
sed -i "s#{xkeysnail}#`which xkeysnail`#g" ./xkeysnail-config/limitedadmins.new sed -i "s#{xkeysnail}#`which xkeysnail`#g" ./linux/limitedadmins.new
sudo mv ./xkeysnail-config/xkeysnail.service.new "$xkeypath"xkeysnail.service && echo "Service file added to "$xkeypath"xkeysnail.service" sudo mv ./linux/xkeysnail.service.new "$xkeypath"xkeysnail.service && echo "Service file added to "$xkeypath"xkeysnail.service"
sudo chown root:root ./xkeysnail-config/limitedadmins.new sudo chown root:root ./linux/limitedadmins.new
# Add a check here for xkeysnail path resolving # Add a check here for xkeysnail path resolving
sudo mv ./xkeysnail-config/limitedadmins.new /etc/sudoers.d/limitedadmins sudo mv ./linux/limitedadmins.new /etc/sudoers.d/limitedadmins
sudo chown -R root:root "$xkeypath"xkeysnail.service && echo "Ownership set for root..." || echo "Failed to set ownership..." 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 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/xkeysnail.service && echo "Created soft symlink..." || echo "Failed to create soft symlink..."