Compare commits

...

79 Commits
gui ... 1.2-4

Author SHA1 Message Date
Ben Reaves
d56db46b67 Merge pull request #343 from rbreaves/dev
- Consecutive tab open/close on Terms in Win, ConsoleZ & WinTerm refined
2020-12-06 21:41:52 -06:00
Ben Reaves
bfe8d8f039 Merge branch 'dev' of https://github.com/rbreaves/kinto into dev 2020-12-06 18:15:05 -06:00
Ben Reaves
8ab59cc914 - Consecutive tab open/close on terms added in Windows while held, added ConsoleZ & WinTerm hotkey refinements 2020-12-06 17:55:23 -06:00
Ben Reaves
15adc5b96b Merge pull request #337 from rbreaves/dev
- Added emacs style, courtesy bryanhpchiang. Closes #336
2020-11-29 15:37:53 -06:00
Ben Reaves
dd32a6f954 - Added emacs style, courtesy bryanhpchiang. Closes #336 2020-11-29 15:24:57 -06:00
Ben Reaves
eb96ad08b8 Update README.md 2020-11-24 01:22:34 -06:00
Ben Reaves
0442bd8b6b Update README.md 2020-11-24 01:19:35 -06:00
Ben Reaves
5d37e720c7 Update README.md 2020-11-21 17:32:54 -06:00
Ben Reaves
aa53b7b14d Removed mention of Universal Keys
Will still be added at a later date
2020-11-20 21:07:40 -06:00
Ben Reaves
046bee95c3 Update README.md 2020-11-19 21:08:42 -06:00
Ben Reaves
0c53a7a114 Merge pull request #319 from rbreaves/dev
- Improved setup installer. Further closes #315
2020-11-12 16:01:24 -06:00
Ben Reaves
46b8e1ca6e - Improved setup installer. Further closes #315 2020-11-12 15:48:18 -06:00
Ben Reaves
a4f12cbdd8 Merge pull request #318 from rbreaves/dev
Overlay warning added for setup, 2 default editors added for KDE
2020-11-12 14:52:09 -06:00
Ben Reaves
fe0346ea63 - Corrected text editors to open config files, also properly linked system options for KDE. Closes #317 2020-11-12 14:49:16 -06:00
Ben Reaves
1406e3bea5 - Added 2 additional default text editors. #317 2020-11-11 23:06:12 -06:00
Ben Reaves
e0344eaa72 - Added overlay warning to setup. #315 2020-11-11 22:49:47 -06:00
Ben Reaves
4eea5c17cc Merge pull request #316 from rbreaves/dev
- Fixed installer for Mate. Closes #315
2020-11-11 22:09:30 -06:00
Ben Reaves
6101213537 - Fixed installer for Mate. Closes #315 2020-11-11 22:04:36 -06:00
Ben Reaves
c71714e0c2 Merge pull request #314 from rbreaves/dev
- xkeysnail install check, updated Windows icons & force modifier key release
2020-11-11 20:20:11 -06:00
Ben Reaves
ef6dc65a20 - Added check for xkeysnail installing properly 2020-11-11 20:18:30 -06:00
Ben Reaves
525aa91cbf - Updated Windows icons, modifiers release fix 2020-11-11 19:54:56 -06:00
Ben Reaves
b29ec9d936 Merge pull request #313 from rbreaves/dev
- Adds commandbox for Windows and fixes install issue
2020-11-11 14:42:25 -06:00
Ben Reaves
94595a3324 - Relocated limitedadmins as well for #311, will add check later 2020-11-11 14:17:40 -06:00
Ben Reaves
a9afdac847 - Relocated xkeysnail replacement to after xkeysnail install. Closes #311 2020-11-11 14:03:31 -06:00
Ben Reaves
39f65c0e2b - Added support for commandbox (coldfusion) on Windows 2020-11-11 13:02:20 -06:00
Ben Reaves
1aa23c239c Merge pull request #300 from rbreaves/dev
- Added autostart bool fix, added info on system tray setup for Gnome3
2020-10-30 02:27:28 -05:00
Ben Reaves
b6fb4ba828 - Added autostart bool fix, added info on system tray setup for Gnome3 2020-10-30 02:21:21 -05:00
Ben Reaves
9ce8612f54 Merge branch 'dev' into master 2020-10-29 21:23:36 -05:00
Ben Reaves
1419646e9c - Fixes to resolve install issues on Manjaro Gnome. 2020-10-29 21:23:11 -05:00
Ben Reaves
464ba631cb Merge branch 'dev' 2020-10-26 20:17:25 -05:00
Ben Reaves
d709a7de20 - Added the missing Right Alt key remap for Windows 2020-10-26 20:12:59 -05:00
Ben Reaves
80627807f5 Update README.md 2020-10-25 20:49:14 -05:00
Ben Reaves
cbee0f8f33 Update README.md 2020-10-25 20:46:58 -05:00
Ben Reaves
f34d9b57f6 Update README.md 2020-10-25 20:41:50 -05:00
Ben Reaves
969427bf5b - More initial setup refinements 2020-10-25 17:41:19 -05:00
Ryan Reaves
adc62fc71b - Fixed initial setup UI issue for chromebook users 2020-10-25 16:47:54 -05:00
Ryan Reaves
0baef33cf6 - Initial setup UI improvement 2020-10-25 13:47:05 -05:00
Ryan Reaves
0f1f05d379 - Added commands to ensure that any previous instance is not running during install 2020-10-25 12:43:36 -05:00
Ben Reaves
157ea9a116 - Improved uninstaller, added verbosity 2020-10-24 21:56:29 -05:00
Ben Reaves
3cc1146954 - Removed repetitive output from setup 2020-10-24 20:50:24 -05:00
Ben Reaves
d2ae2a0b1d - Restore prekinto, needed for setup 2020-10-24 20:39:44 -05:00
Ben Reaves
89701595fb - Basic cleanup of old files 2020-10-24 19:28:37 -05:00
Ben Reaves
3f573c6d61 Update README.md 2020-10-24 17:21:05 -05:00
Ryan Reaves
6a20ac5932 Merge branch 'dev' 2020-10-24 12:10:04 -05:00
Ryan Reaves
34a94306ca - Removed unneeded uninstall function for Budgie DE 2020-10-24 12:00:47 -05:00
Ben Reaves
9adf85cbde Update README.md 2020-10-24 02:26:45 -05:00
Ben Reaves
18ddc4da01 Merge branch 'dev' 2020-10-24 00:03:23 -05:00
Ben Reaves
76e6186d54 - Added fix for about versioning 2020-10-24 00:03:01 -05:00
Ben Reaves
b3984244f8 Merge branch 'dev' 2020-10-23 23:57:55 -05:00
Ben Reaves
ef385a29f3 - Added fix for about versioning 2020-10-23 23:57:24 -05:00
Ben Reaves
1e59d89494 Merge pull request #294 from rbreaves/dev
Win & Linux Sys Trays & GUI, Fast KB Switching, Simple Wizard for Linux
2020-10-23 23:15:28 -05:00
Ben Reaves
f7c02dc52f - Resolved merge conflict 2020-10-23 23:09:26 -05:00
Ben Reaves
bf3ea4e358 Update README.md 2020-10-23 23:04:06 -05:00
Ben Reaves
07be0f826f - Fixed bug that causes app to close prematurely in some cases 2020-10-23 22:54:58 -05:00
Ben Reaves
21dd05415e - Added more hotkey fixes for multiple OS's 2020-10-23 22:32:07 -05:00
Ben Reaves
ef4b7f8b01 - Added in better parsing of distro names 2020-10-23 17:02:22 -05:00
Ben Reaves
9d57c1f841 - Updated shortcuts 2020-10-23 16:58:20 -05:00
Ben Reaves
6b0801eef6 - Fixed issue on xkeysnail setup and added elementaryOS hotkeys 2020-10-23 14:50:15 -05:00
Ryan Reaves
145e2a45b0 - Updated shortcuts for fedora 2020-10-23 13:42:31 -05:00
Ben Reaves
92519e31e8 - Added package for manjaro kde 2020-10-23 13:04:19 -05:00
Ryan Reaves
cb60322517 - Added Fedora fix to allow for systemd service files to run 2020-10-23 03:23:12 -05:00
Ben Reaves
11c3195c48 - Added shortcuts for kde neon 2020-10-23 01:52:34 -05:00
Ben Reaves
5f6c498f90 - Added pillow requirement for popos, popos shortcuts 2020-10-22 23:57:50 -05:00
Ben Reaves
c7dfbff27f - Added proper bg color for gui, added hotkeys for ubuntu workspace switching 2020-10-22 22:23:22 -05:00
Ben Reaves
e67f8964a1 - Fixed budgie uninstaller and confirmed SL hotkeys 2020-10-22 19:33:03 -05:00
Ben Reaves
7db6862f4f - Removed Budgie specific iconography from error messages 2020-10-22 17:29:38 -05:00
Ryan Reaves
ff58059770 - Updated installer and removed unnecessary toggle 2020-10-21 21:23:20 -05:00
Ben Reaves
64c96e38c7 - Added stop to gui & sys tray 2020-10-21 19:18:12 -05:00
Ben Reaves
f7c0876e83 Merge branch 'dev' into alpha 2020-10-21 04:13:24 -05:00
Ben Reaves
9b5ae88fe4 - Added missing icons folder 2020-10-21 04:12:39 -05:00
Ben Reaves
87011ddb18 - Added OS level shortcuts to xkeysnail remap WIP 2020-10-21 01:20:28 -05:00
Ben Reaves
ab4551d22f Update README.md 2020-10-21 00:25:33 -05:00
Ben Reaves
fc6b590965 - Reordered Install and requirements info 2020-10-21 00:18:06 -05:00
Ben Reaves
91dd44b6ba - Removed outdated info, added new setup info.
All references to C/x11 version of kinto has been removed. New setup info and screenshot has been added.
2020-10-21 00:16:10 -05:00
Ben Reaves
d7fc4b9277 Merge pull request #271 from rbreaves/alpha
System Tray Update for Windows and Linux
2020-10-20 23:47:23 -05:00
Ben Reaves
006a61a242 - Removed unneeded files 2020-10-20 23:43:36 -05:00
Ben Reaves
bafea4cef1 Merge pull request #293 from rbreaves/gui
- Added GUI, sys tray, and simple wizard installer for Linux
2020-10-20 23:39:58 -05:00
Ben Reaves
33e39a8068 Update README.md 2020-10-13 12:23:34 -05:00
Ben Reaves
64b012ac65 Merge pull request #289 from rbreaves/hotfix
- Fixed uninstall issues for KDE, xfce & improved cmd-space remap. Closes #288
2020-10-11 18:20:43 -05:00
43 changed files with 807 additions and 959 deletions

BIN
Kinto.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 22 KiB

250
README.md
View File

@@ -9,12 +9,7 @@
Seamless copy and paste with all apps and terminals. The zero effort solution.
System tray supports the following, but Kinto can run without it on Linux.
|<sub>Ubuntu, Gnome3, Ubuntu Budgie, and Mate</sub>|<sub>Windows 10</sub>|
|---|---|
|<img src="https://user-images.githubusercontent.com/10969616/89241619-15d86c00-d5c5-11ea-8ffe-18ee6ca0f895.png" width="50%">|<img src="https://user-images.githubusercontent.com/10969616/84471501-10a51380-ac4b-11ea-9e0e-c19a7ebfad6d.png" width="50%">|
Note: This project does a lot more than just copy & paste for terminals. I really do mean type like a mac and additions can easily be added to a single file, kinto.py/ahk.
v1.2 Release - Kinto now includes a system tray and simple wizard to setup the install with minimal effort.
## Table of Contents
@@ -22,15 +17,13 @@ Note: This project does a lot more than just copy & paste for terminals. I reall
[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](#Shortcut-Creation)
[What does Kinto require?](#What-does-Kinto-require)
[Other Notes Related to Install](#Other-Notes-Related-to-Install)
[Shortcut Creation](#Shortcut-Creation)
[How to Upgrade/Control Kinto](#How-to-Upgrade-Kinto)
@@ -76,47 +69,14 @@ It also retains some of the most commonly used system level shortcut keys, such
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
- systemd
- x11
- IBus*
- Manjaro/Arch/Debian/Ubuntu based distro 16.04+
- Fedora/RHEL (may not work w/ xkeysnail, but original xkb version does)
- xkeysnail (Recommended, but optional)
Note: Budgie DE's, so Ubuntu Budgie, appears to have a bug where keybinds may not save across reboots. Please reset the Cmd+Tab keymap before rebooting to ensure it remembers that setting. I will remove this once the issue is resolved.
*IBus is needed to support wordwise during browser app usage as the keymap will need to change slightly depending if the cursor/caret is on screen waiting for input. Setup.py will set it but you can manually set it as well or check your current Input Method.
On most distros you can confirm Input Methods by navigating to "Language Support" and set "Keyboard input method system:" to IBus for full word-wise support with web browsers.
Wayland support is planned, but not ready yet.
### 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.
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%">
Additionally, if you are using a cross-platform app and if it happens to have a few shortcut keys that differ then that can very easily be added to either the kinto.py or kinto.ahk configuration files which on Windows is located here `~/.kinto/kinto.ahk` and on Linux it can be found here `~/.config/kinto/kinto.py`. More info can be found here [Shortcut Creation](#Shortcut-Creation)
## How to install (Linux)
Video Tutorial: [Install Kinto.sh for Linux in less than a minute](https://www.youtube.com/watch?v=kd4al45XD1g)
<img src="https://user-images.githubusercontent.com/10969616/97070698-179c4500-15a0-11eb-8064-c03aa7f4d4a5.png" width="75%">
1. clone this repo
```
git clone https://github.com/rbreaves/kinto.git
@@ -130,15 +90,22 @@ sudo apt update
sudo apt install python3
```
3. Follow the prompts and the script will guide you through the rest of the setup.
3. Run the script, press 1 or 2 keys and you are done.
```
./setup.py
```
Troubleshoot
If the wizard does not appear then either type in "kinto.sh" in your application overview search bar or run this following command.
```
~/.config/kinto/gui/kinto-gui.py
```
To Uninstall Kinto
```
./setup.py
./setup.py -r
```
## How to Install (Windows)
@@ -168,9 +135,27 @@ To Uninstall Kinto - Select Uninstall
```
py setup.py
```
## Shortcut Creation
Note: A new project, [Universal Keys](https://github.com/rbreaves/Universal-Keys), has been created that will be updated to contain all current remaps - plus many more. Once that is done, Kinto will be updated to programmatically pull the latest keymaps from simple csv comma delimited files & will build out key remaps from there. This will also allow for more types of remaps within an application category, Sublime Text 3 to VS Code or VS Code to Sublime Text 3, Photoshop to Gimp, Gimp to Photoshop, etc & it will ensure that xkeysnail (linux) & autohotkey (windows) are pulling from the same data set.
## What does Kinto require?
- Python
- systemd
- x11
- xkeysnail
### 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.
## Shortcut Creation
[Linux Shortcut Creation (Xkeysnail)](#Linux-Xkeysnail)
@@ -258,33 +243,11 @@ I don't have too many examples on this one, most developers seem to be shying aw
## Shortcut Creation (XKB)
The older xkb shortcut method info can be read about in ticket [#125](https://github.com/rbreaves/kinto/issues/125).
## Other Notes Related to Install
**Manjaro with Gnome there are issues with caret/input checking.**
Only impacts back/forward hotkeys for web browsers.
Please see this ticket for more information.
https://github.com/rbreaves/kinto/issues/59
https://wiki.archlinux.org/index.php/IBus
**For other Arch based distros.**
Append the following and logoff and back on, but only after running setup.py to install all packages and the kinto service. Please report if there are any difficulties.
nano ~/.bashrc
```
export GTK_IM_MODULE=xim
export XMODIFIERS=@im=ibus
export QT_IM_MODULE=xim
```
## How to Upgrade Kinto
Simply bring down the latest in either the master branch or dev, but dev is sometimes in flux as new features are being developed. Then you can re-run the setup.py installer, it will stop the service and re-install Kinto.
Simply bring down the latest then you can re-run the setup.py installer, it will stop the service and re-install Kinto.
Note: If you have made any custom changes to ~/.xkb or ~/.config/kinto then you will need to backup or rename those directories before running an update.
Note: If you have made any custom changes to ~/.config/kinto then you will need to backup or rename those directories before running an update.
```
git pull origin master
@@ -293,55 +256,26 @@ git pull origin master
## How to Control Kinto
Under systemd this is how you control Kinto.
Recommended Install - Kinto (udev/xkeysnail/x11) = xkeysnail
Older Install - Kinto (xkb/x11) = keyswap
This info is now superceded by the fact that linux has a full fledge GUI and system tray app that is very easy to use, but I will keep the command line options for those that want to know what they are.
Status
```
sudo systemctl status xkeysnail
systemctl --user status keyswap # older - you probably should not run this one
```
Stop (your keymap will return to normal)
```
sudo systemctl stop xkeysnail
systemctl --user stop keyswap # older - you probably should not run this one
```
Start
```
sudo systemctl start xkeysnail
systemctl --user start keyswap # older - you probably should not run this one
```
Restart
```
sudo systemctl restart xkeysnail
systemctl --user restart keyswap # older - you probably should not run this one
```
Enable
```
sudo systemctl enable xkeysnail
systemctl --user enable keyswap # older - you probably should not run this one
```
Disable
```
sudo systemctl disable xkeysnail
systemctl --user disable keyswap # older - you probably should not run this one
```
## Learning macOS style hotkeys on Linux
You can use websites like https://www.shortcutfoo.com in Google Chrome while using the terminal style keymap, but Firefox is not compatible due to detecting "cmd" as keycode 224. Chrome detects Win/Super/Cmd as keycode 91 on all OS's.
To make sure you are in the terminal style keymap you can just simply open the terminal and turn off the kinto service, and then switch back to Chrome.
```
systemctl --user stop keyswap && setxkbmap -option;setxkbmap -option altwin:swap_alt_win
```
## Troubleshooting
@@ -363,36 +297,26 @@ To disable keyboard mapping:
### Does not start when you log in or after you reboot?
Kinto (xkb/x11) = keyswap
Kinto (udev/xkeysnail/x11) = xkeysnail
1. Check the status
```
systemctl --user status keyswap
sudo systemctl status xkeysnail
```
2. Check the service journal
```
journalctl --user-unit=keyswap.service -b
sudo journalctl --unit=xkeysnail.service -b
```
Note: You can also watch your log live
```
journalctl -l --user-unit=keyswap.service -b
sudo journalctl -l --unit=xkeysnail.service -b
```
You may need to manually set your DISPLAY in the systemd service file. Normally it pulls in the proper DISPLAY value but if it doesn't you can try this.
Another possibility is the SELinux could be enabled and needs to be set to permissive. (aka /etc/selinux/config)
To reset the display variable
```
echo $DISPLAY
# :0.0
```
nano ~/.config/systemd/user/keyswap.service
You can use the Kinto.sh app or system tray to edit your service file.
kinto.sh gui
1. Edit -> Edit Service
kinto tray
1. Customize -> Edit Service
or you can use your terminal.
sudo nano /etc/systemd/system/xkeysnail.service
```
@@ -406,79 +330,9 @@ Environment=DISPLAY=:0.0
If you continue to have issues then open a ticket and send me the info.
### Keyswap is not occurring, but it was working.
Kinto (xkb/x11) = keyswap
Kinto (udev/xkeysnail/x11) = xkeysnail
Now that Kinto (xkb/x11) is using a custom written C program I am not aware of any specific bugs or issues, but you can start here if you having difficulties and please report it if it is reproducible.
1. Get status
```
systemctl --user status keyswap
sudo systemctl status xkeysnail
```
2. Restart Kinto
```
systemctl --user restart keyswap
sudo systemctl restart xkeysnail
```
3. Check the Status again and open a ticket if you need to.
```
systemctl --user status keyswap
sudo systemctl status xkeysnail
```
You can also do the following to see if it is an actual issue with kintox11 not running or your service file.
```
cd ~/.config/kinto
./kintox11
```
## Debug (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

View File

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

Binary file not shown.

Before

Width:  |  Height:  |  Size: 116 KiB

0
keyswap_service.sh → kinto_old/keyswap_service.sh Executable file → Normal file
View File

View File

View File

View File

View File

@@ -1,53 +0,0 @@
#!/usr/bin/env python3
import gi
# import textwrap
gi.require_version('Gtk', '3.0')
from gi.repository import Gtk
from gi.repository import GObject
import os
from subprocess import Popen, PIPE
import fcntl
wnd = Gtk.Window()
wnd.set_default_size(400, 400)
wnd.connect("destroy", Gtk.main_quit)
sw = Gtk.ScrolledWindow()
label = Gtk.Label()
label.set_alignment(0, 0)
label.set_selectable(True)
label.set_line_wrap(True)
label.set_max_width_chars(150)
sw.add_with_viewport(label)
wnd.add(sw)
wnd.show_all()
sub_proc = Popen("journalctl -f --unit=xkeysnail.service -b", stdout=PIPE, shell=True)
# sub_proc2 = Popen('fold', stdin=sub_proc.stdout, stdout=PIPE)
# sub_proc2.communicate()
sub_outp = ""
def non_block_read(output):
''' even in a thread, a normal read with block until the buffer is full '''
fd = output.fileno()
fl = fcntl.fcntl(fd, fcntl.F_GETFL)
fcntl.fcntl(fd, fcntl.F_SETFL, fl | os.O_NONBLOCK)
op = output.read()
if op == None:
return ''
return op.decode('utf-8')
# def wrap(s, w):
# return textwrap.fill(s, w)
# def wrap(s, w):
# return [s[i:i + w] for i in range(0, len(s), w)]
def update_terminal():
# wrapper = textwrap.TextWrapper(width=50)
# word_list = wrapper.wrap(text=sub_proc.stdout)
label.set_text(label.get_text() + non_block_read(sub_proc.stdout))
return sub_proc.poll() is None
GObject.timeout_add(100, update_terminal)
Gtk.main()

View File

@@ -1,54 +0,0 @@
#!/usr/bin/env python3
from gi.repository import Gtk,GObject, Vte
from gi.repository import GLib
import os
class TheWindow(Gtk.Window):
def __init__(self):
Gtk.Window.__init__(self, title="inherited cell renderer")
self.set_default_size(600, 300)
global terminal
terminal = Vte.Terminal()
terminal.spawn_sync(
Vte.PtyFlags.DEFAULT,
os.environ['HOME'],
["/bin/bash"],
[],
GLib.SpawnFlags.DO_NOT_REAP_CHILD,
None,
None,
)
self.button = Gtk.Button("Do The Command")
self.button2 = Gtk.Button("End Command")
self.command = "journalctl -f --unit=xkeysnail.service -b\n"
self.command2 = "send \003; echo 'hello'\n"
# expect -c "send \003;"
self.cmdbytes = str.encode(self.command)
self.cmdbytes2 = str.encode(self.command2)
command = Gtk.Label("The command: "+self.command)
self.button.connect("clicked", self.InputToTerm, self.cmdbytes)
self.button2.connect("clicked", self.InputToTerm, self.cmdbytes2)
box = Gtk.Box(orientation=Gtk.Orientation.VERTICAL)
box.pack_start(self.button, False, True, 0)
box.pack_start(self.button2, False, True, 0)
box.pack_start(command, False, True, 1)
scroller = Gtk.ScrolledWindow()
scroller.set_hexpand(True)
scroller.set_vexpand(True)
scroller.add(terminal)
box.pack_start(scroller, False, True, 2)
self.add(box)
def InputToTerm(self, clicker, cmd):
terminal.feed_child_binary(cmd)
print(Vte.get_minor_version())
win = TheWindow()
win.connect("delete-event", Gtk.main_quit)
win.show_all()
Gtk.main()

View File

@@ -121,9 +121,14 @@ if os.path.isdir(homedir + "/.config/kinto") == False:
os.mkdir(homedir + "/.config/kinto")
time.sleep(0.5)
cmdline("git fetch")
color_arr = [bcolors.CBEIGE,bcolors.CRED2,bcolors.CGREEN,bcolors.CYELLOW ]
print("\nKinto - Type in Linux like it's a Mac.\n")
kintover = cmdline('echo "$(git describe --tag --abbrev=0 | head -n 1)" "build" "$(git rev-parse --short HEAD)"')
print("\nKinto " + kintover + "Type in Linux like it's a Mac.\n")
if args.uninstall:
subprocess.check_call(shlex.split("./xkeysnail_service.sh uninstall"))
@@ -131,18 +136,4 @@ if args.uninstall:
subprocess.check_call(shlex.split("./xkeysnail_service.sh"))
# kintotype = int(input(color_arr[2] +
# "1) Kinto \n" + color_arr[0] +
# "2) Uninstall Kinto \n"
# + bcolors.ENDC))
# print("")
# if(kintotype == 1):
# subprocess.check_call(shlex.split("./xkeysnail_service.sh"))
# # if os.path.isdir(homedir + "/.config/kinto") == True:
# # subprocess.check_call(shlex.split("./xkeysnail_service.sh budgieUpdate"))
# # exit()
# if(kintotype == 2):
# subprocess.check_call(shlex.split("./xkeysnail_service.sh uninstall"))
# exit()

Binary file not shown.

Before

Width:  |  Height:  |  Size: 40 KiB

View File

@@ -1,19 +0,0 @@
#!/bin/bash
# Undo Apple keyboard cmd & alt swap
if test -f "/sys/module/hid_apple/parameters/swap_opt_cmd" && [ `cat /sys/module/hid_apple/parameters/swap_opt_cmd` == "1" ]; then
echo '0' | sudo tee /sys/module/hid_apple/parameters/swap_opt_cmd
echo 'options hid_apple swap_opt_cmd=0' | sudo tee /etc/modprobe.d/hid_apple.conf
sudo update-initramfs -u -k all
fi
systemctl --user stop keyswap 2>/dev/null
systemctl --user disable keyswap
systemctl --user stop keyswap.timer 2>/dev/null
systemctl --user disable keyswap.timer
rm ~/.config/systemd/user/keyswap.service
rm ~/.config/systemd/user/keyswap.timer
rm -rf ~/.config/autostart/kinto.desktop
rm -rf ~/.config/kinto
rm -rf ~/.xkb
sudo systemctl daemon-reload
sed -i '/xkb/d' ~/.Xsession 2>/dev/null
exit 0

View File

@@ -24,7 +24,7 @@ AHK_NOTIFYICON(wParam, lParam)
}
; End Enable Left clicks
; I_Icon = %A_ScriptDir%\assets\kinto-white.ico ; MacModifiers
; I_Icon = %A_ScriptDir%\assets\kinto-white-invert.ico ; MacModifiers
; IfExist, %I_Icon% ; MacModifiers
; Menu, Tray, Icon, %I_Icon%,, 1 ; MacModifiers
; Menu, Tray, Tip, Mac - Kinto ; MacModifiers
@@ -97,8 +97,9 @@ Send {LAlt down}{tab}{LAlt up}
tray_suspend(){
suspend toggle
if (a_isSuspended = 1){
Gosub ReleaseModifiers
menu, tray, check , Suspend Kinto
I_Icon = %A_ScriptDir%\assets\kinto-color-invert.ico
I_Icon = %A_ScriptDir%\assets\kinto-white.ico
Menu, Tray, Icon, %I_Icon%,, 1
Menu, Tray, Tip, Suspended - Kinto
IfWinExist, detectUSB.ahk
@@ -106,7 +107,7 @@ tray_suspend(){
}
else{
menu, tray, unCheck, Suspend Kinto
; I_Icon = %A_ScriptDir%\assets\kinto-white.ico ; MacModifiers
; I_Icon = %A_ScriptDir%\assets\kinto-white-invert.ico ; MacModifiers
; I_Icon = %A_ScriptDir%\assets\kinto-white-invert.ico ; WinModifiers/CB/IBM
Menu, Tray, Icon, %I_Icon%,,1
Run, %A_ScriptDir%\detectUSB.ahk
@@ -116,6 +117,7 @@ tray_suspend(){
}
Exit() {
Gosub ReleaseModifiers
IfWinExist, detectUSB.ahk
WinClose
@@ -132,8 +134,10 @@ GroupAdd, terminals, ahk_exe WindowsTerminal.exe
GroupAdd, terminals, ahk_exe Hyper.exe
GroupAdd, terminals, ahk_exe mintty.exe
GroupAdd, terminals, ahk_exe Cmd.exe
GroupAdd, terminals, ahk_exe box.exe
GroupAdd, terminals, ahk_exe Terminus.exe
GroupAdd, terminals, Fluent Terminal ahk_class ApplicationFrameWindow
GroupAdd, terminals, ahk_class Console_2_Main
GroupAdd, posix, ahk_exe ubuntu.exe
GroupAdd, posix, ahk_exe ConEmu.exe
@@ -142,10 +146,11 @@ 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, posix, ahk_class Console_2_Main
GroupAdd, posix, ahk_exe WindowsTerminal.exe
GroupAdd, ConEmu, ahk_exe ConEmu.exe
GroupAdd, ConEmu, ahk_exe ConEmu64.exe
GroupAdd, ConEmu, ahk_exe WindowsTerminal.exe
GroupAdd, ExcPaste, ahk_exe Cmd.exe
GroupAdd, ExcPaste, ahk_exe mintty.exe
@@ -235,11 +240,13 @@ GroupAdd, intellij, ahk_exe idea64.exe
; $LAlt::LCtrl ; CB/IBM
; $RAlt::RCtrl ; CB/IBM
; $RCtrl::RAlt ; CB/IBM
; $CapsLock::LWin ; IBM
; $LCtrl::LAlt ; CB/IBM
; $LAlt::LCtrl ; WinModifiers
; $RAlt::RCtrl ; WinModifiers
; $RCtrl::RAlt ; WinModifiers
; $LWin::LAlt ; WinModifiers
; $LCtrl::LWin ; WinModifiers
@@ -324,6 +331,16 @@ GroupAdd, intellij, ahk_exe idea64.exe
!Right::Send ^{Right}
!+Right::Send ^+{Right}
; emacs style
#n::Send {Down}
#p::Send {Up}
#f::Send {Right}
#b::Send {Left}
#a::Send {Home}
#e::Send {End}
#d::Send {Delete}
#k::Send +{End}{Backspace}
; Cmd+Space Alternative
$^Space::Send ^{Esc}
@@ -521,13 +538,17 @@ GroupAdd, intellij, ahk_exe idea64.exe
; Copy
^c::
If WinActive("ahk_exe cmd.exe"){
If WinActive("ahk_exe cmd.exe") OR WinActive("ahk_exe box.exe"){
Send {Enter}
}
else if WinActive("ahk_exe mintty.exe"){
SetKeyDelay -1
Send {Blind}{Insert}
}
; else if WinActive("ahk_exe WindowsTerminal.exe"){ ; WinTerm
; SetKeyDelay -1 ; WinTerm
; Send {Blind}{F13} ; WinTerm
; } ; WinTerm
else{
SetKeyDelay -1
Send {Blind}{LShift down}{c DownTemp}
@@ -535,7 +556,7 @@ GroupAdd, intellij, ahk_exe idea64.exe
return
^c up::
If not WinActive("ahk_group cmd.exe"){
If not WinActive("ahk_group cmd.exe") OR WinActive("ahk_exe box.exe"){
SetKeyDelay -1
Send {Blind}{c Up}{LShift Up}
}
@@ -545,6 +566,12 @@ GroupAdd, intellij, ahk_exe idea64.exe
; $#c::Send {Ctrl down}c{Ctrl up} ; Default
; $!c::Send {Ctrl down}c{Ctrl up} ; CB/IBM
; Windows Terminal
; Ctrl+Shift+C should do nothing
If WinActive("ahk_exe WindowsTerminal.exe"){
$#+c::return
}
; Paste
$^v::
If WinActive("ahk_exe mintty.exe"){
@@ -553,6 +580,9 @@ GroupAdd, intellij, ahk_exe idea64.exe
else if WinActive("ahk_group posix"){
Send {Blind}{Shift down}v{Shift up}
}
else if WinActive("ahk_exe box.exe"){
SendEvent {RButton}
}
else{
Send {Blind}v
}
@@ -562,17 +592,21 @@ GroupAdd, intellij, ahk_exe idea64.exe
#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}
If not WinActive("ahk_group ConEmu") AND not WinActive("ahk_class Console_2_Main"){
Send {Blind}{LShift down}t{LShift Up}
}
else if WinActive("ahk_class Console_2_Main"){
Send {Blind}{F1}{LShift Up}
}
else{
Send ^t
Send {Blind}t
}
return
$^w::
If not WinActive("ahk_group ConEmu"){
Send {LCtrl down}{LShift down}w{LCtrl Up}{LShift Up}
Send {Blind}{LShift down}w{LShift Up}
}
else{
Send ^w
@@ -613,4 +647,15 @@ GroupAdd, intellij, ahk_exe idea64.exe
!y::Send {LCtrl down}y{LCtrl Up} ; CB/IBM
!v::Send {LCtrl down}v{LCtrl Up} ; CB/IBM
#If
#If
#If
ReleaseModifiers:
Send {RCtrl up}
Send {LCtrl up}
Send {RAlt up}
Send {LAlt up}
Send {RWin up}
Send {LWin up}
Send {RShift up}
Send {LShift up}
return

View File

@@ -5,6 +5,7 @@ gi.require_version('Gtk', '3.0')
gi.require_version('Vte', '2.91')
from gi.repository import Gtk,Gdk,GdkPixbuf
from gi.repository import Vte,GLib
from shutil import which
from subprocess import Popen,PIPE,CalledProcessError
from distutils.util import strtobool
@@ -43,6 +44,8 @@ class MyWindow(Gtk.Window):
bgerror = Gtk.Image()
bguninstall = Gtk.Image()
last_onward = Gtk.Button()
first_onward = Gtk.ToggleButton()
page = 1
label = Gtk.Label()
label.set_alignment(1, 0)
@@ -66,8 +69,6 @@ class MyWindow(Gtk.Window):
ibmkb.signal_id = 0
winmackb.signal_id = 0
menuitem_enable = Gtk.CheckMenuItem(label="Enabled")
menuitem_enable.signal_id = 0
menuitem_auto = Gtk.CheckMenuItem(label="Autostart")
menuitem_auto.signal_id = 0
menuitem_systray = Gtk.CheckMenuItem(label="Tray Enabled")
@@ -80,6 +81,7 @@ class MyWindow(Gtk.Window):
homedir = os.path.expanduser("~")
self.kconfig = homedir+"/.config/kinto/kinto.py"
autostart_bool = False
path = os.environ['HOME']+'/.config/kinto/kinto-color.svg'
width = -1
@@ -119,7 +121,6 @@ class MyWindow(Gtk.Window):
self.InputToTerm(self.command)
grid = Gtk.Grid()
grid.modify_bg(Gtk.StateFlags.NORMAL, Gdk.color_parse("#2d303b"))
self.add(grid)
menubar = Gtk.MenuBar()
@@ -130,7 +131,10 @@ class MyWindow(Gtk.Window):
scroller.set_vexpand(True)
scroller.add(terminal)
grid.attach(scroller, 0, 1, 1, 1)
grid.attach_next_to(self.label, scroller, Gtk.PositionType.BOTTOM, 2, 1)
status_hbox = Gtk.HBox()
status_hbox.add(self.label)
status_hbox.modify_bg(Gtk.StateFlags.NORMAL, Gdk.color_parse("#2d303b"))
grid.attach_next_to(status_hbox, scroller, Gtk.PositionType.BOTTOM, 2, 1)
with open(self.kconfig) as configfile:
autostart_line = configfile.read().split('\n')[1]
@@ -150,7 +154,6 @@ class MyWindow(Gtk.Window):
menubar.append(menuitem_file)
submenu_file = Gtk.Menu()
menuitem_file.set_submenu(submenu_file)
submenu_file.append(self.menuitem_enable)
submenu_file.append(self.menuitem_auto)
kintotray = int(self.queryConfig('ps -aux | grep [k]intotray >/dev/null 2>&1 && echo "1" || echo "0"'))
if kintotray and os.path.exists(os.environ['HOME']+'/.config/autostart/kintotray.desktop'):
@@ -164,6 +167,9 @@ class MyWindow(Gtk.Window):
menuitem_restart = Gtk.MenuItem(label="Restart")
menuitem_restart.connect('activate',self.runRestart)
submenu_file.append(menuitem_restart)
menuitem_stop = Gtk.MenuItem(label="Stop")
menuitem_stop.connect('activate',self.runStop)
submenu_file.append(menuitem_stop)
menuitem_quit = Gtk.MenuItem(label="Quit")
submenu_file.append(menuitem_quit)
@@ -395,6 +401,7 @@ class MyWindow(Gtk.Window):
self.setupwin.set_position(Gtk.WindowPosition.CENTER)
self.setupwin.add(self.overlay)
self.setupwin.signal_id = 0
from PIL import Image
@@ -503,7 +510,7 @@ class MyWindow(Gtk.Window):
countkb += 1
if countkb > 1:
Popen(['notify-send','Kinto: Remove ' + str(countkb-1) + ' kb type(s)','-i','budgie-desktop-symbolic'])
Popen(['notify-send','Kinto: Remove ' + str(countkb-1) + ' kb type(s)'])
return
@@ -654,7 +661,7 @@ class MyWindow(Gtk.Window):
Popen(restart)
except CalledProcessError:
Popen(['notify-send','Kinto: Error Resetting KB Type!','-i','budgie-desktop-symbolic'])
Popen(['notify-send','Kinto: Error Resetting KB Type!'])
def setTweaks(self,button):
win = Gtk.Window()
@@ -746,12 +753,12 @@ class MyWindow(Gtk.Window):
restartsvc = False
except CalledProcessError:
Popen(['notify-send','Kinto: Error restarting Kinto after setting tweaks!','-i','budgie-desktop-symbolic'])
Popen(['notify-send','Kinto: Error restarting Kinto after setting tweaks!'])
if openWin and self.get_title() == "Keyboard Assistant":
openWin = False
win.show_all()
else:
Gtk.main_quit()
elif self.get_title() == "Keyboard Assistant":
Gtk.main_quit()
self.hide()
self.destroy()
@@ -786,7 +793,7 @@ class MyWindow(Gtk.Window):
restartsvc = True
except CalledProcessError:
Popen(['notify-send','Kinto: Error Resetting AltGr!','-i','budgie-desktop-symbolic'])
Popen(['notify-send','Kinto: Error Resetting AltGr!'])
return
@@ -806,7 +813,7 @@ class MyWindow(Gtk.Window):
restartsvc = True
except CalledProcessError:
Popen(['notify-send','Kinto: Error Resetting SublimeText remaps for VSCode!','-i','budgie-desktop-symbolic'])
Popen(['notify-send','Kinto: Error Resetting SublimeText remaps for VSCode!'])
return
def setCaps2Esc(self,button):
@@ -830,7 +837,7 @@ class MyWindow(Gtk.Window):
restartsvc = True
except CalledProcessError:
Popen(['notify-send','Kinto: Error resetting caps2esc!','-i','budgie-desktop-symbolic'])
Popen(['notify-send','Kinto: Error resetting caps2esc!'])
return
@@ -856,7 +863,7 @@ class MyWindow(Gtk.Window):
restartsvc = True
except CalledProcessError:
Popen(['notify-send','Kinto: Error resetting caps2cmd!','-i','budgie-desktop-symbolic'])
Popen(['notify-send','Kinto: Error resetting caps2cmd!'])
return
@@ -875,33 +882,22 @@ class MyWindow(Gtk.Window):
self.command = "send \003 journalctl -f --unit=xkeysnail.service -b\n"
self.InputToTerm(self.command)
except:
Popen(['notify-send','Kinto: Errror restarting Kinto!','-i','budgie-desktop-symbolic'])
Popen(['notify-send','Kinto: Errror restarting Kinto!'])
def setEnable(self,button,enableKinto):
def runStop(self,button):
try:
if enableKinto:
res = Popen(['pgrep','xkeysnail'])
res.wait()
print(res.returncode)
stop = Popen(['sudo', 'systemctl','stop','xkeysnail'])
stop.wait()
time.sleep(1)
res = Popen(['pgrep','xkeysnail'])
res.wait()
if res.returncode == 0:
pkillxkey = Popen(['sudo', 'pkill','-f','bin/xkeysnail'])
pkillxkey.wait()
Popen(['sudo', 'systemctl','restart','xkeysnail'])
self.menuitem_enable.disconnect(self.menuitem_enable.signal_id)
self.menuitem_enable.set_active(True)
self.menuitem_enable.signal_id = self.menuitem_enable.connect('activate',self.setEnable,False)
self.command = "send \003 journalctl -f --unit=xkeysnail.service -b\n"
self.InputToTerm(self.command)
else:
Popen(['sudo', 'systemctl','stop','xkeysnail'])
self.command = "send \003 journalctl -f --unit=xkeysnail.service -b\n"
self.menuitem_enable.disconnect(self.menuitem_enable.signal_id)
self.menuitem_enable.set_active(False)
self.menuitem_enable.signal_id = self.menuitem_enable.connect('activate',self.setEnable,True)
except CalledProcessError:
Popen(['notify-send','Kinto: Error enabling!','-i','budgie-desktop-symbolic'])
if res.returncode == 0:
# Popen(['notify-send','Kinto: Ending Debug'])
pkillxkey = Popen(['sudo', 'pkill','-f','bin/xkeysnail'])
pkillxkey.wait()
except:
Popen(['notify-send','Kinto: Error stopping Kinto!'])
def setAutostart(self,button,autostart):
try:
@@ -917,41 +913,53 @@ class MyWindow(Gtk.Window):
self.menuitem_auto.signal_id = self.menuitem_auto.connect('activate',self.setAutostart,False)
except CalledProcessError:
Popen(['notify-send','Kinto: Error setting autostart!','-i','budgie-desktop-symbolic'])
Popen(['notify-send','Kinto: Error setting autostart!'])
def setConfig(self,button):
try:
if os.path.exists('/opt/sublime_text/sublime_text'):
Popen(['/opt/sublime_text/sublime_text',os.environ['HOME']+'/.config/kinto/kinto.py'])
elif which(gedit) is not None:
elif which('gedit') is not None:
Popen(['gedit',os.environ['HOME']+'/.config/kinto/kinto.py'])
elif which(mousepad) is not None:
elif which('mousepad') is not None:
Popen(['mousepad',os.environ['HOME']+'/.config/kinto/kinto.py'])
elif which('kate') is not None:
Popen(['kate',os.environ['HOME']+'/.config/kinto/kinto.py'])
elif which('kwrite') is not None:
Popen(['kwrite',os.environ['HOME']+'/.config/kinto/kinto.py'])
except CalledProcessError: # Notify user about error on running restart commands.
Popen(['notify-send','Kinto: Error could not open config file!','-i','budgie-desktop-symbolic'])
Popen(['notify-send','Kinto: Error could not open config file!'])
def setService(self,button):
try:
if os.path.exists('/opt/sublime_text/sublime_text'):
Popen(['/opt/sublime_text/sublime_text','/lib/systemd/system/xkeysnail.service'])
elif which(gedit) is not None:
elif which('gedit') is not None:
Popen(['gedit','/lib/systemd/system/xkeysnail.service'])
elif which(mousepad) is not None:
elif which('mousepad') is not None:
Popen(['mousepad','/lib/systemd/system/xkeysnail.service'])
elif which('kate') is not None:
Popen(['kate','/lib/systemd/system/xkeysnail.service'])
elif which('kwrite') is not None:
Popen(['kwrite','/lib/systemd/system/xkeysnail.service'])
except CalledProcessError: # Notify user about error on running restart commands.
Popen(['notify-send','Kinto: Error could not open config file!','-i','budgie-desktop-symbolic'])
Popen(['notify-send','Kinto: Error could not open config file!'])
def setSysKB(self,button):
if self.ostype == "XFCE":
Popen(['xfce4-keyboard-settings'])
elif self.ostype == "KDE":
self.queryConfig('systemsettings >/dev/null 2>&1 || systemsettings5 >/dev/null 2>&1')
else:
Popen(['gnome-control-center','keyboard'])
def setRegion(self,button):
if self.ostype == "XFCE":
Popen(['gnome-language-selector'])
elif self.ostype == "KDE":
self.queryConfig('kcmshell4 kcm_translations >/dev/null 2>&1 || kcmshell5 kcm_translations >/dev/null 2>&1')
else:
Popen(['gnome-control-center','region'])
@@ -994,66 +1002,65 @@ class MyWindow(Gtk.Window):
status = self.non_block_read()
if self.label.get_text().strip() != self.remove_tags(status):
self.label.set_markup(" " + status + " ")
if self.remove_tags(status) == 'active':
self.menuitem_enable.disconnect(self.menuitem_enable.signal_id)
self.menuitem_enable.set_active(True)
self.menuitem_enable.signal_id = self.menuitem_enable.connect('activate',self.setEnable,False)
else:
self.menuitem_enable.disconnect(self.menuitem_enable.signal_id)
self.menuitem_enable.set_active(False)
self.menuitem_enable.signal_id = self.menuitem_enable.connect('activate',self.setEnable,True)
return self.kinto_status.poll() is None
def key_press_event(self, widget, event, page):
def key_press_event(self, widget, event):
global openWin
trigger = "None"
keyname = Gdk.keyval_name(event.keyval)
current = self.second_page
bg = self.bgsuccess4
onward = self.success_page
print("page value: "+str(self.page))
if page == 1 and "Control" in keyname:
if self.page == 1 and "Control" in keyname and openWin == False:
print("IBM or Chromebook")
print("Continue to page 2")
bg = self.bgcaps
onward = self.caps_page
trigger = "Half"
elif page == 2 and "Caps_Lock" in keyname and event.state & Gdk.ModifierType.LOCK_MASK:
self.page += 1
elif self.page == 2 and "Caps_Lock" in keyname and event.state & Gdk.ModifierType.LOCK_MASK:
print("Set IBM Keyboard")
current = self.caps_page
self.options["kbtype"] = "ibm"
trigger = "Done"
elif page == 2 and "Super" in keyname:
elif self.page == 2 and "Super" in keyname:
print("Set Chromebook Keyboard")
current = self.caps_page
self.options["kbtype"] = "cbk"
trigger = "Done"
elif page == 1 and "Alt" in keyname:
elif self.page == 1 and "Alt" in keyname:
print("Set Mac Keyboard")
self.options["kbtype"] = "mac"
trigger = "Done"
elif page == 1 and "Super" in keyname:
elif self.page == 1 and "Super" in keyname:
print("Set Win Keyboard")
self.options["kbtype"] = "win"
trigger = "Done"
if trigger == "Half" or trigger == "Done":
if trigger == "Half" or trigger == "Done" and openWin == False:
for grandkid in self.overlay.get_children():
self.overlay.remove(grandkid)
self.overlay.add(bg)
self.overlay.add_overlay(self.container)
self.container.add(onward)
self.container.remove(current)
self.setupwin.disconnect(self.setupwin.signal_id)
if trigger == "Half":
self.setupwin.signal_id = self.setupwin.connect("key_press_event", self.key_press_event,2)
# self.setupwin.disconnect(self.setupwin.signal_id)
if trigger == "Half" and openWin == False:
# print("reset key_press_event")
# self.setupwin.signal_id = self.setupwin.connect("key_press_event", self.key_press_event)
self.setupwin.show_all()
elif trigger == "Done":
elif trigger == "Done" and openWin == False:
print("in Done")
self.setKinto()
self.setupwin.show_all()
openWin = True
self.last_onward.grab_focus()
# print(self.setupwin.signal_id)
self.setupwin.disconnect(self.setupwin.signal_id)
# print(self.setupwin.signal_id)
print("key press event is on")
def InputToTerm(self,cmd):
# Not clearly known which VTE versions
@@ -1162,15 +1169,22 @@ class FirstPage(Gtk.Box):
scroller.add(vbox)
hbox = Gtk.HBox()
previous = Gtk.Button("Decline")
previous = Gtk.Button("")
for child in previous.get_children():
child.set_label("<b>Decline</b>")
child.set_use_markup(True)
previous.connect("clicked", self.goback)
previous.set_margin_right(245)
hbox.add(previous)
onward = Gtk.Button("Agree")
onward.connect("clicked", self.forward)
self.__parent_window.first_onward.set_label("")
for child in self.__parent_window.first_onward.get_children():
child.set_label("<b>Agree</b>")
child.set_use_markup(True)
self.__parent_window.first_onward.set_active(True)
self.__parent_window.first_onward.connect("clicked", self.forward)
hbox.add(onward)
hbox.add(self.__parent_window.first_onward)
hbox.set_hexpand(False)
hbox.set_vexpand(False)
hbox.set_margin_bottom(6)
@@ -1188,19 +1202,22 @@ class FirstPage(Gtk.Box):
self.grid.add(vbox_container)
self.grid.attach_next_to(hbox, vbox_container, Gtk.PositionType.BOTTOM, 2, 1)
self.add(self.grid)
onward.grab_focus()
self.__parent_window.first_onward.grab_focus()
def goback(self, *args):
Gtk.main_quit()
self.hide()
def forward(self, button):
self.__parent_window.first_onward.set_active(True)
for grandkid in self.__parent_window.overlay.get_children():
self.__parent_window.overlay.remove(grandkid)
self.__parent_window.overlay.add(self.__parent_window.bgspace)
self.__parent_window.overlay.add_overlay(self.__parent_window.container)
self.__parent_window.container.add(self.__parent_window.second_page)
self.__parent_window.setupwin.signal_id = self.__parent_window.setupwin.connect("key_press_event", self.__parent_window.key_press_event,1)
# print(self.__parent_window.setupwin.signal_id)
self.__parent_window.setupwin.signal_id = self.__parent_window.setupwin.connect("key_press_event", self.__parent_window.key_press_event)
# print(self.__parent_window.setupwin.signal_id)
self.__parent_window.container.remove(self.__parent_window.first_page)
self.__parent_window.setupwin.show_all()
self.hide()
@@ -1217,14 +1234,18 @@ class SecondPage(Gtk.Box):
scroller.set_policy(Gtk.PolicyType.NEVER, Gtk.PolicyType.ALWAYS)
label_start = Gtk.Label()
label_start.set_markup('<b>Identifying your Keyboard...</b>\n\nPress the <b>2nd</b> key <b>Left</b> of the spacebar.')
label_start.set_markup('<b>Identifying your Keyboard...</b>\n\nPress the <b>2nd</b> key <b>Left</b> of the spacebar.\n\n<sub>If stuck here then unset Overlay (Super) key on your DE.</sub>')
label_start.set_alignment(0,0)
label_start.set_line_wrap(True)
vbox.add(label_start)
scroller.add(vbox)
hbox = Gtk.HBox()
previous = Gtk.Button("Go Back")
previous = Gtk.Button("")
for child in previous.get_children():
child.set_label("<b>Go Back</b>")
child.set_use_markup(True)
previous.connect("clicked", self.goback)
previous.set_margin_right(315)
hbox.add(previous)
@@ -1260,29 +1281,31 @@ class SecondPage(Gtk.Box):
self.__parent_window.container.remove(self.__parent_window.second_page)
self.__parent_window.setupwin.disconnect(self.__parent_window.setupwin.signal_id)
self.__parent_window.setupwin.show_all()
self.__parent_window.first_onward.grab_focus()
self.hide()
def capsforward(self, *args):
for grandkid in self.__parent_window.overlay.get_children():
self.__parent_window.overlay.remove(grandkid)
self.__parent_window.overlay.add(self.__parent_window.bgcaps)
self.__parent_window.overlay.add_overlay(self.__parent_window.container)
self.__parent_window.container.add(self.__parent_window.caps_page)
self.__parent_window.container.remove(self.__parent_window.second_page)
self.__parent_window.setupwin.signal_id = self.__parent_window.setupwin.connect("key_press_event", self.__parent_window.key_press_event,2)
self.__parent_window.setupwin.show_all()
self.hide()
# def capsforward(self, *args):
# for grandkid in self.__parent_window.overlay.get_children():
# self.__parent_window.overlay.remove(grandkid)
# self.__parent_window.overlay.add(self.__parent_window.bgcaps)
# self.__parent_window.overlay.add_overlay(self.__parent_window.container)
# self.__parent_window.container.add(self.__parent_window.caps_page)
# self.__parent_window.container.remove(self.__parent_window.second_page)
# self.__parent_window.setupwin.disconnect(self.__parent_window.setupwin.signal_id)
# self.__parent_window.setupwin.signal_id = self.__parent_window.setupwin.connect("key_press_event", self.__parent_window.key_press_event,2)
# self.__parent_window.setupwin.show_all()
# self.hide()
def forward(self, *args):
for grandkid in self.__parent_window.overlay.get_children():
self.__parent_window.overlay.remove(grandkid)
self.__parent_window.overlay.add(self.__parent_window.bgsuccess4)
self.__parent_window.overlay.add_overlay(self.__parent_window.container)
self.__parent_window.container.add(self.__parent_window.success_page)
self.__parent_window.container.remove(self.__parent_window.second_page)
self.__parent_window.setupwin.disconnect(self.__parent_window.setupwin.signal_id)
self.__parent_window.setupwin.show_all()
self.hide()
# def forward(self, *args):
# for grandkid in self.__parent_window.overlay.get_children():
# self.__parent_window.overlay.remove(grandkid)
# self.__parent_window.overlay.add(self.__parent_window.bgsuccess4)
# self.__parent_window.overlay.add_overlay(self.__parent_window.container)
# self.__parent_window.container.add(self.__parent_window.success_page)
# self.__parent_window.container.remove(self.__parent_window.second_page)
# self.__parent_window.setupwin.disconnect(self.__parent_window.setupwin.signal_id)
# self.__parent_window.setupwin.show_all()
# self.hide()
class CapsPage(Gtk.Box):
def __init__(self, parent_window):
@@ -1303,7 +1326,10 @@ class CapsPage(Gtk.Box):
scroller.add(vbox)
hbox = Gtk.HBox()
previous = Gtk.Button("Go Back")
previous = Gtk.Button("")
for child in previous.get_children():
child.set_label("<b>Go Back</b>")
child.set_use_markup(True)
previous.connect("clicked", self.goback)
previous.set_margin_right(315)
hbox.add(previous)
@@ -1336,37 +1362,69 @@ class CapsPage(Gtk.Box):
self.__parent_window.overlay.add(self.__parent_window.bgspace)
self.__parent_window.overlay.add_overlay(self.__parent_window.container)
self.__parent_window.container.add(self.__parent_window.second_page)
self.__parent_window.setupwin.disconnect(self.__parent_window.setupwin.signal_id)
self.__parent_window.setupwin.signal_id = self.__parent_window.setupwin.connect("key_press_event", self.__parent_window.key_press_event,1)
self.__parent_window.page = 1
# self.__parent_window.setupwin.disconnect(self.__parent_window.setupwin.signal_id)
# self.__parent_window.setupwin.signal_id = self.__parent_window.setupwin.connect("key_press_event", self.__parent_window.key_press_event)
self.__parent_window.container.remove(self.__parent_window.caps_page)
self.__parent_window.setupwin.show_all()
self.hide()
def forward(self, *args):
for grandkid in self.__parent_window.overlay.get_children():
self.__parent_window.overlay.remove(grandkid)
self.__parent_window.overlay.add(self.__parent_window.bgsuccess4)
self.__parent_window.overlay.add_overlay(self.__parent_window.container)
self.__parent_window.container.add(self.__parent_window.success_page)
self.__parent_window.container.remove(self.__parent_window.caps_page)
self.__parent_window.setupwin.disconnect(self.__parent_window.setupwin.signal_id)
self.__parent_window.setupwin.show_all()
self.hide()
# def forward(self, *args):
# for grandkid in self.__parent_window.overlay.get_children():
# self.__parent_window.overlay.remove(grandkid)
# self.__parent_window.overlay.add(self.__parent_window.bgsuccess4)
# self.__parent_window.overlay.add_overlay(self.__parent_window.container)
# self.__parent_window.container.add(self.__parent_window.success_page)
# self.__parent_window.container.remove(self.__parent_window.caps_page)
# self.__parent_window.setupwin.disconnect(self.__parent_window.setupwin.signal_id)
# self.__parent_window.setupwin.show_all()
# self.hide()
class SuccessPage(Gtk.Box):
def __init__(self, parent_window):
super().__init__(spacing=10)
self.__parent_window = parent_window
self.grid = Gtk.Grid()
vbox_container = Gtk.VBox()
self.__parent_window.last_onward.props.relief = Gtk.ReliefStyle.NONE
hbox = Gtk.HBox()
previous = Gtk.Button(" ")
previous.props.relief = Gtk.ReliefStyle.NONE
previous.set_margin_right(245)
hbox.add(previous)
self.__parent_window.last_onward.set_label("")
for child in self.__parent_window.last_onward.get_children():
child.set_label("<b>Done</b>")
child.set_use_markup(True)
self.__parent_window.last_onward.connect("clicked", self.forward)
vbox_container.set_margin_top(600)
vbox_container.add(self.__parent_window.last_onward)
self.add(vbox_container)
hbox.add(self.__parent_window.last_onward)
hbox.set_hexpand(False)
hbox.set_vexpand(False)
hbox.set_margin_bottom(6)
hbox.set_margin_right(25)
scroller = Gtk.ScrolledWindow()
scroller.set_policy(Gtk.PolicyType.NEVER, Gtk.PolicyType.NEVER)
scroller.set_hexpand(True)
scroller.set_vexpand(True)
vbox = Gtk.VBox()
vbox_container = Gtk.VBox()
vbox_container.set_margin_top(55)
vbox_container.set_margin_right(28)
vbox_container.add(scroller)
self.grid.set_margin_left(157)
vbox_container.set_margin_bottom(18)
vbox.set_margin_right(10)
vbox.set_margin_bottom(18)
self.grid.add(vbox_container)
self.grid.attach_next_to(hbox, vbox_container, Gtk.PositionType.BOTTOM, 2, 1)
self.add(self.grid)
self.__parent_window.last_onward.grab_focus()
def forward(self, *args):
self.hide()
# self.__parent_window.setupwin.disconnect(self.__parent_window.setupwin.signal_id)/
self.__parent_window.setupwin.close()
@@ -1375,5 +1433,6 @@ win = MyWindow()
win.connect("delete-event", Gtk.main_quit)
if openWin:
win.show_all()
openWin = False
Gtk.main()

Binary file not shown.

Before

Width:  |  Height:  |  Size: 63 KiB

After

Width:  |  Height:  |  Size: 65 KiB

View File

@@ -202,18 +202,34 @@ define_keymap(re.compile(browserStr, re.IGNORECASE),{
})
define_keymap(None,{
# Launch Application Menu
# K("RC-Space"): K("Alt-F1"), # gnome/kde
# K("RC-Space"): K("LC-Esc"), # xfce4
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-LC-f"):K("M-F10"), # Default SL - Maximize app (gnome/kde)
# K("Super-Right"):K("C-M-Right"), # Default SL - Change workspace (budgie)
# K("Super-Left"):K("C-M-Left"), # Default SL - Change workspace (budgie)
K("RC-Q"): K("M-F4"), # Default SL - not-popos
K("RC-H"):K("Super-h"), # Default SL - Minimize app (gnome/budgie/popos/fedora)
K("M-Tab"): pass_through_key, # Default 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-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("Super-Right"):K("Super-Page_Up"), # SL - Change workspace (ubuntu/fedora)
# K("Super-Left"):K("Super-Page_Down"), # SL - Change workspace (ubuntu/fedora)
# K("Super-Right"):K("Super-C-Up"), # SL - Change workspace (popos)
# K("Super-Left"):K("Super-C-Down"), # SL - Change workspace (popos)
# K("RC-Q"):K("Super-q"), # SL - Close Apps (popos)
# K("RC-Space"): K("Super-Space"), # SL - Launch Application Menu (eos)
# K("RC-H"): K("Super-Page_Down"), # SL - Minimize app (kde_neon)
# SL - Default SL - Change workspace (kde_neon)
# K("RC-Space"): K("LC-Esc"), # SL- Launch Application Menu xfce4
# K("RC-F3"):K("C-M-d"), # SL- Show Desktop xfce4
# K("RC-LC-f"):K("Super-Up"), # SL- Maximize app eos
# K("RC-LC-f"):K("Super-PAGE_UP"), # SL- Maximize app manjaro
# Basic App hotkey functions
K("RC-Q"): K("Alt-F4"),
K("RC-H"): K("Alt-F9"),
# K("RC-H"):K("M-F9"), # SL - Minimize app xfce4
# K("RC-LC-f"):K("Super-PAGE_DOWN"), # SL - Minimize app manjaro
# Cmd Tab - App Switching Default
K("M-Tab"): pass_through_key, # Default not-xfce4
K("RC-Tab"): K("M-Tab"), # Default not-xfce4
K("RC-Shift-Tab"): K("M-Shift-Tab"), # 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
@@ -223,13 +239,21 @@ define_keymap(None,{
# K("M-Grave") : K("C-Shift-Tab"), # Chromebook/IBM - In-App Tab switching
K("Super-Tab"): K("LC-Tab"), # Default not-chromebook
K("Super-Shift-Tab"): K("LC-Shift-Tab"), # Default not-chromebook
# emacs style
K("Super-a"): K("Home"), # Beginning of Line
K("Super-e"): K("End"), # End of Line
K("Super-b"): K("Left"),
K("Super-f"): K("Right"),
K("Super-n"): K("Down"),
K("Super-p"): K("Up"),
K("Super-k"): [K("Shift-End"), K("Backspace")],
K("Super-d"): K("Delete"),
# 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
@@ -242,8 +266,8 @@ define_keymap(None,{
# K("M-Backspace"): K("Delete"), # Chromebook/IBM - 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("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(""), #
})
@@ -390,6 +414,16 @@ define_keymap(re.compile("Io.elementary.terminal|kitty", re.IGNORECASE),{
}, "Elementary Terminal tab switching")
define_keymap(re.compile(termStr, re.IGNORECASE),{
# K("LC-Right"):K("C-M-Right"), # Default SL - Change workspace (budgie)
# K("LC-Left"):K("C-M-Left"), # Default SL - Change workspace (budgie)
# K("LC-Left"):K("C-M-End"), # SL - Change workspace xfce4
# K("LC-Left"):K("Super-Left"), # SL - Change workspace eos
# K("LC-Right"):K("C-M-Home"), # SL - Change workspace xfce4
# K("LC-Right"):K("Super-Right"), # SL - Change workspace eos
# K("LC-Right"):K("Super-Page_Up"), # SL - Change workspace (ubuntu/fedora)
# K("LC-Left"):K("Super-Page_Down"), # SL - Change workspace (ubuntu/fedora)
# K("LC-Right"):K("Super-C-Up"), # SL - Change workspace (popos)
# K("LC-Left"):K("Super-C-Down"), # SL - Change workspace (popos)
# Ctrl Tab - In App Tab Switching
K("LC-Tab") : K("LC-PAGE_DOWN"),
K("LC-Shift-Tab") : K("LC-PAGE_UP"),

View File

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

After

Width:  |  Height:  |  Size: 3.0 KiB

View File

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

After

Width:  |  Height:  |  Size: 3.0 KiB

View File

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

After

Width:  |  Height:  |  Size: 2.2 KiB

View File

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

After

Width:  |  Height:  |  Size: 2.2 KiB

View File

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

After

Width:  |  Height:  |  Size: 2.1 KiB

View File

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

After

Width:  |  Height:  |  Size: 2.1 KiB

View File

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

After

Width:  |  Height:  |  Size: 2.4 KiB

View File

@@ -43,8 +43,8 @@ class Indicator():
menu = Gtk.Menu()
menukb = Gtk.Menu()
checkbox_autostart = Gtk.CheckMenuItem('Autostart')
checkbox_enable = Gtk.CheckMenuItem('Kinto Enabled')
restart = Gtk.MenuItem('Restart')
stop = Gtk.MenuItem('Stop')
keyboards = Gtk.MenuItem('Keyboard Types')
keyboards.set_submenu(menukb)
winkb = Gtk.RadioMenuItem(label='Windows')
@@ -112,28 +112,10 @@ class Indicator():
self.checkbox_autostart.set_active(False)
self.chkautostart_id = self.checkbox_autostart.connect('activate',self.setAutostart,True)
# Kinto Enable
# res = Popen(['sudo', 'systemctl','is-active','--quiet','xkeysnail'])
# res.wait()
# time.sleep(5)
# self.checkbox_enable.set_label("Kinto Enabled")
# self.checkbox_enable.set_active(True)
# self.enable_id = self.checkbox_enable.connect('activate',self.setEnable,False)
if res.returncode == 0:
self.checkbox_enable.set_active(True)
# self.indicator.set_icon(os.environ['HOME']+'/.config/kinto/kinto-invert.svg')
self.enable_id = self.checkbox_enable.connect('activate',self.setEnable,False)
else:
self.checkbox_enable.set_active(False)
# self.indicator.set_icon(os.environ['HOME']+'/.config/kinto/kinto-color.svg')
self.enable_id = self.checkbox_enable.connect('activate',self.setEnable,True)
self.menu.append(self.checkbox_enable)
self.restart.connect('activate',self.runRestart)
self.menu.append(self.restart)
self.stop.connect('activate',self.runStop)
self.menu.append(self.stop)
self.refreshKB()
@@ -267,7 +249,7 @@ class Indicator():
countkb += 1
if countkb > 1:
Popen(['notify-send','Kinto: Remove ' + str(countkb-1) + ' kb type(s)','-i','budgie-desktop-symbolic'])
Popen(['notify-send','Kinto: Remove ' + str(countkb-1) + ' kb type(s)'])
return
@@ -298,21 +280,9 @@ class Indicator():
status = self.non_block_read().strip()
nowts = int(time.time())
if (nowts - self.unixts) > 5 and (status=='active' and self.indicator.get_icon() != os.environ['HOME']+'/.config/kinto/kinto-invert.svg'):
self.checkbox_enable.disconnect(self.enable_id)
self.checkbox_enable.set_active(True)
self.enable_id = self.checkbox_enable.connect('activate',self.setEnable,False)
self.indicator.set_icon(os.environ['HOME']+'/.config/kinto/kinto-invert.svg')
elif (nowts - self.unixts) > 5 and (status == 'inactive' and self.indicator.get_icon() != os.environ['HOME']+'/.config/kinto/kinto.svg'):
self.checkbox_enable.disconnect(self.enable_id)
self.checkbox_enable.set_active(False)
self.enable_id = self.checkbox_enable.connect('activate',self.setEnable,True)
self.indicator.set_icon(os.environ['HOME']+'/.config/kinto/kinto.svg')
# print('stats: ' + status + ' last: ' + self.last_status)
# if status != self.last_status and status == 'active':
# # print('inside')
# self.refreshKB()
self.last_status = status
return self.kinto_status.poll() is None
@@ -481,7 +451,7 @@ class Indicator():
restartsvc = False
except CalledProcessError:
Popen(['notify-send','Kinto: Error restarting Kinto after setting tweaks!','-i','budgie-desktop-symbolic'])
Popen(['notify-send','Kinto: Error restarting Kinto after setting tweaks!'])
self.hide()
self.destroy()
@@ -510,7 +480,7 @@ class Indicator():
restartsvc = True
except CalledProcessError:
Popen(['notify-send','Kinto: Error Resetting AltGr!','-i','budgie-desktop-symbolic'])
Popen(['notify-send','Kinto: Error Resetting AltGr!'])
return
@@ -530,7 +500,7 @@ class Indicator():
restartsvc = True
except CalledProcessError:
Popen(['notify-send','Kinto: Error Resetting SublimeText remaps for VSCode!','-i','budgie-desktop-symbolic'])
Popen(['notify-send','Kinto: Error Resetting SublimeText remaps for VSCode!'])
return
def setCaps2Esc(self,button):
@@ -554,7 +524,7 @@ class Indicator():
restartsvc = True
except CalledProcessError:
Popen(['notify-send','Kinto: Error resetting caps2esc!','-i','budgie-desktop-symbolic'])
Popen(['notify-send','Kinto: Error resetting caps2esc!'])
return
@@ -580,7 +550,7 @@ class Indicator():
restartsvc = True
except CalledProcessError:
Popen(['notify-send','Kinto: Error resetting caps2cmd!','-i','budgie-desktop-symbolic'])
Popen(['notify-send','Kinto: Error resetting caps2cmd!'])
return
@@ -593,17 +563,28 @@ class Indicator():
res.wait()
if res.returncode == 0:
# Popen(['notify-send','Kinto: Ending Debug','-i','budgie-desktop-symbolic'])
# Popen(['notify-send','Kinto: Ending Debug'])
pkillxkey = Popen(['sudo', 'pkill','-f','bin/xkeysnail'])
pkillxkey.wait()
Popen(['sudo', 'systemctl','start','xkeysnail'])
except:
Popen(['notify-send','Kinto: Error restarting Kinto!','-i','budgie-desktop-symbolic'])
# self.checkbox_enable.set_active(False)
# self.checkbox_enable.disconnect(self.enable_id)
# self.enable_id = self.checkbox_enable.connect('activate',self.setEnable,True)
# self.indicator.set_icon(os.environ['HOME']+'/.config/kinto/kinto-color.svg')
Popen(['notify-send','Kinto: Error restarting Kinto!'])
def runStop(self,button):
try:
stop = Popen(['sudo', 'systemctl','stop','xkeysnail'])
stop.wait()
time.sleep(1)
res = Popen(['pgrep','xkeysnail'])
res.wait()
if res.returncode == 0:
# Popen(['notify-send','Kinto: Ending Debug'])
pkillxkey = Popen(['sudo', 'pkill','-f','bin/xkeysnail'])
pkillxkey.wait()
except:
Popen(['notify-send','Kinto: Error stopping Kinto!'])
def runDebug(self,button,opendebug):
try:
@@ -612,43 +593,13 @@ class Indicator():
else:
Popen([os.environ['HOME']+'/.config/kinto/gui/kinto-gui.py'])
except:
Popen(['notify-send','Kinto: Error opening Kinto!','-i','budgie-desktop-symbolic'])
Popen(['notify-send','Kinto: Error opening Kinto!'])
def queryConfig(self,query):
res = Popen(query, stdout=PIPE, stderr=None, shell=True)
res.wait()
return res.communicate()[0].strip().decode('UTF-8')
def setEnable(self,button,enableKinto):
try:
if enableKinto:
res = Popen(['pgrep','xkeysnail'])
res.wait()
print(res.returncode)
if res.returncode == 0:
# Popen(['notify-send','Kinto: Err in debug mode?','-i','budgie-desktop-symbolic'])
pkillxkey = Popen(['sudo', 'pkill','-f','bin/xkeysnail'])
pkillxkey.wait()
Popen(['sudo', 'systemctl','restart','xkeysnail'])
self.checkbox_enable.disconnect(self.enable_id)
self.checkbox_enable.set_active(True)
self.enable_id = self.checkbox_enable.connect('activate',self.setEnable,False)
self.indicator.set_icon(os.environ['HOME']+'/.config/kinto/kinto-invert.svg')
else:
Popen(['sudo', 'systemctl','stop','xkeysnail'])
self.checkbox_enable.disconnect(self.enable_id)
self.checkbox_enable.set_active(False)
self.enable_id = self.checkbox_enable.connect('activate',self.setEnable,True)
self.indicator.set_icon(os.environ['HOME']+'/.config/kinto/kinto.svg')
self.unixts = int(time.time())
except CalledProcessError:
Popen(['notify-send','Kinto: Error enabling!','-i','budgie-desktop-symbolic'])
def setAutostart(self,button,autostart):
try:
if autostart == False:
@@ -663,31 +614,39 @@ class Indicator():
self.chkautostart_id = self.checkbox_autostart.connect('activate',self.setAutostart,False)
except CalledProcessError:
Popen(['notify-send','Kinto: Error setting autostart!','-i','budgie-desktop-symbolic'])
Popen(['notify-send','Kinto: Error setting autostart!'])
def setConfig(self,button):
try:
if os.path.exists('/opt/sublime_text/sublime_text'):
Popen(['/opt/sublime_text/sublime_text',os.environ['HOME']+'/.config/kinto/kinto.py'])
elif which(gedit) is not None:
elif which('gedit') is not None:
Popen(['gedit',os.environ['HOME']+'/.config/kinto/kinto.py'])
elif which(mousepad) is not None:
elif which('mousepad') is not None:
Popen(['mousepad',os.environ['HOME']+'/.config/kinto/kinto.py'])
elif which('kate') is not None:
Popen(['kate',os.environ['HOME']+'/.config/kinto/kinto.py'])
elif which('kwrite') is not None:
Popen(['kwrite',os.environ['HOME']+'/.config/kinto/kinto.py'])
except CalledProcessError: # Notify user about error on running restart commands.
Popen(['notify-send','Kinto: Error could not open config file!','-i','budgie-desktop-symbolic'])
Popen(['notify-send','Kinto: Error could not open config file!'])
def setService(self,button):
try:
if os.path.exists('/opt/sublime_text/sublime_text'):
Popen(['/opt/sublime_text/sublime_text','/lib/systemd/system/xkeysnail.service'])
elif which(gedit) is not None:
elif which('gedit') is not None:
Popen(['gedit','/lib/systemd/system/xkeysnail.service'])
elif which(mousepad) is not None:
elif which('mousepad') is not None:
Popen(['mousepad','/lib/systemd/system/xkeysnail.service'])
elif which('kate') is not None:
Popen(['kate','/lib/systemd/system/xkeysnail.service'])
elif which('kwrite') is not None:
Popen(['kwrite','/lib/systemd/system/xkeysnail.service'])
except CalledProcessError: # Notify user about error on running restart commands.
Popen(['notify-send','Kinto: Error could not open config file!','-i','budgie-desktop-symbolic'])
Popen(['notify-send','Kinto: Error could not open config file!'])
def setKB(self,button,kbtype):
try:
@@ -734,17 +693,21 @@ class Indicator():
Popen(restart)
except CalledProcessError:
Popen(['notify-send','Kinto: Error Resetting KB Type!','-i','budgie-desktop-symbolic'])
Popen(['notify-send','Kinto: Error Resetting KB Type!'])
def setSysKB(self,button):
if self.ostype == "XFCE":
Popen(['xfce4-keyboard-settings'])
elif self.ostype == "KDE":
self.queryConfig('systemsettings >/dev/null 2>&1 || systemsettings5 >/dev/null 2>&1')
else:
Popen(['gnome-control-center','keyboard'])
def setRegion(self,button):
if self.ostype == "XFCE":
Popen(['gnome-language-selector'])
elif self.ostype == "KDE":
self.queryConfig('kcmshell4 kcm_translations >/dev/null 2>&1 || kcmshell5 kcm_translations >/dev/null 2>&1')
else:
Popen(['gnome-control-center','region'])

View File

@@ -4,7 +4,7 @@ Description=xkeysnail
[Service]
Type=simple
KillMode=process
ExecStart=/usr/bin/sudo /bin/bash -c '/usr/bin/xhost +SI:localuser:root && {homedir}/.config/kinto/killdups.sh && /usr/local/bin/xkeysnail --quiet --watch {homedir}/.config/kinto/kinto.py'
ExecStart=/usr/bin/sudo /bin/bash -c '/usr/bin/xhost +SI:localuser:root && {homedir}/.config/kinto/killdups.sh && {xkeysnail} --quiet --watch {homedir}/.config/kinto/kinto.py'
ExecStop=/usr/bin/sudo /bin/bash -c '/usr/bin/sudo pkill -f bin/xkeysnail && exit 0'
Restart=on-failure
RestartSec=3

View File

@@ -4,31 +4,32 @@
# to false for wordwise to work in Firefox
typeset -l distro
distro=$(awk -F= '$1=="NAME" { print $2 ;}' /etc/os-release)
distro=$(awk -F= '$1=="NAME" { gsub("[\",!,_, ]","",$2);print $2 ;}' /etc/os-release)
typeset -l dename
dename=$(./system-config/dename.sh | cut -d " " -f1)
function uninstall {
echo -e "\nNote: Restoring keys is only relevant if you had installed a version prior to 1.2 of Kinto. You should skip this step if 1.2+ is all you have installed."
while true; do
read -rep $'\nPress R to restore your original shortcuts.\nPress F to reset to factory shortcuts. (f/r)\n' yn
read -rep $'\nPress R to restore your original shortcuts.\nPress F to reset to factory shortcuts.\nPress N to skip. (f/r/N)\n' yn
case $yn in
[Ff]* ) yn="f"; break;;
[Rr]* ) yn="r";break;;
* ) echo "Please answer yes or no.";;
[Nn]* ) yn="n";break;;
* ) yn="n";break;;
esac
done
if [ "$yn" == "f" ];then
echo "Reset to factory shortcuts"
if [ "$dename" == "gnome" ];then
if [[ $dename == "gnome" || $dename == "budgie" ]];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
@@ -41,7 +42,7 @@ function uninstall {
fi
elif [ "$yn" == "r" ]; then
echo "Restore original user shortcuts"
if [ "$dename" == "gnome" ]; then
if [[ $dename == "gnome" || $dename == "budgie" ]]; then
echo "Restoring DE hotkeys..."
wmkeys=$(ls | grep -m1 "keybinding")
mutterkeys=$(ls | grep -m1 "mutter_")
@@ -69,6 +70,13 @@ function uninstall {
xfcekeys=$(ls | grep -m1 "xfce4-keyboard")
cp ./"$xfcekeys" ~/.config/xfce4/xfconf/xfce-perchannel-xml/xfce4-keyboard-shortcuts.xml
fi
elif [ "$yn" == "n" ]; then
echo "Skipping..."
fi
if [[ $dename == "gnome" || $dename == "budgie" || $dename == "mate" ]]; then
echo -e "\nWill still be restoring the overlay key"
echo -e "gsettings set org.gnome.mutter overlay-key 'super'\n"
gsettings set org.gnome.mutter overlay-key 'super'
fi
}
@@ -88,7 +96,8 @@ function removeAppleKB {
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..."
echo -e "\nYour system may log you off immediately during the restoration of budgie-daemon.\n"
read -n 1 -s -r -p "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
@@ -149,6 +158,134 @@ function budgieUpdate {
fi
}
if [[ $1 == "5" || $1 == "uninstall" || $1 == "Uninstall" ]]; then
echo "Uninstalling Kinto - xkeysnail (udev)"
uninstall
echo "Removing any Apple driver settings Kinto may have have set..."
removeAppleKB
echo "Killing the Kinto tray..."
pkill -f kintotray >/dev/null 2>&1
echo "Stopping the Kinto service..."
sudo systemctl stop xkeysnail >/dev/null 2>&1
echo "Disabling the Kinto service..."
sudo systemctl disable xkeysnail >/dev/null 2>&1
echo "Killing any remaining xkeysnail processes..."
sudo pkill -f bin/xkeysnail >/dev/null 2>&1
echo "Killing any Kinto related threads from Kinto tray or the gui..."
sudo pkill -f "is-active xkeysnail" >/dev/null 2>&1
echo -e "\nRemoving Kinto..."
echo "rm /etc/sudoers.d/limitedadmins"
echo "rm ~/.config/autostart/xkeysnail.desktop"
echo "rm ~/.config/autostart/kintotray.desktop"
echo "rm -rf ~/.config/kinto"
echo "rm /usr/share/applications/kinto.desktop"
sudo rm /etc/sudoers.d/limitedadmins >/dev/null 2>&1
rm ~/.config/autostart/xkeysnail.desktop >/dev/null 2>&1
rm ~/.config/autostart/kintotray.desktop >/dev/null 2>&1
rm -rf ~/.config/kinto >/dev/null 2>&1
sudo rm /usr/share/applications/kinto.desktop >/dev/null 2>&1
echo -e "\nRemoving Kinto's systemd service files..."
echo "rm /etc/systemd/system/xkeysnail.service"
echo "rm /etc/systemd/system/graphical.target.wants/xkeysnail.service"
echo "rm /usr/lib/systemd/system/xkeysnail.service"
echo "rm /lib/systemd/system/xkeysnail.service"
sudo rm /etc/systemd/system/xkeysnail.service >/dev/null 2>&1
sudo rm /etc/systemd/system/graphical.target.wants/xkeysnail.service >/dev/null 2>&1
sudo rm /usr/lib/systemd/system/xkeysnail.service >/dev/null 2>&1
sudo rm /lib/systemd/system/xkeysnail.service >/dev/null 2>&1
if [ -f /usr/local/bin/logoff.sh ];then
sudo rm /usr/local/bin/logoff.sh
fi
sudo systemctl daemon-reload
# sudo systemctl --state=not-found --all | grep xkeysnail
exit 0
fi
sudo systemctl stop xkeysnail >/dev/null 2>&1
sudo systemctl disable xkeysnail >/dev/null 2>&1
sudo pkill -f bin/xkeysnail >/dev/null 2>&1
sudo pkill -f "is-active xkeysnail" >/dev/null 2>&1
pip3 install pillow
# Add additional shortcuts if needed, does not modify existing ones
if [[ $dename == 'gnome' || $dename == 'budgie' ]];then
if [[ $(gsettings get org.gnome.mutter overlay-key | grep "''\|' '" | wc -l) != 1 ]];then
bound=$(gsettings get org.gnome.mutter overlay-key)
echo "Overlay key, " $bound ", detected. Will be removing so Super-Space can remap to Cmd-Space for app launching.."
gsettings set org.gnome.mutter overlay-key ''
fi
fi
# if ls /etc/apt/sources.list.d/system76* 1> /dev/null 2>&1; then
if [[ $distro == 'popos' ]]; then
# Addition, does not overwrite existing
if [[ $(gsettings get org.gnome.desktop.wm.keybindings minimize | grep "\[\]" | wc -l) != 1 ]];then
echo "Adding Super-h (Cmd+h) to hide/minimize Window."
gsettings set org.gnome.desktop.wm.keybindings minimize "['<Super>h','<Alt>F9']"
# work around to make sure settings survive reboot
dconf dump /org/gnome/desktop/wm/keybindings/ > tempkb.conf
dconf load /org/gnome/desktop/wm/keybindings/ < tempkb.conf
else
bound=$(gsettings get org.gnome.desktop.wm.keybindings minimize)
echo "Hide/minimize Window is already bound to " $bound " , please remap it to Super-H for kinto."
echo "gsettings set org.gnome.desktop.wm.keybindings minimize \"['<Super>h','<Alt>F9']\""
fi
fi
if ! [ -x "$(command -v xhost)" ] || ! [ -x "$(command -v gcc)" ]; then
if [ "$distro" == "manjarolinux" ]; then
sudo ./system-config/unipkg.sh "xorg-xhost gcc"
fi
fi
if [[ $dename == "kde" ]]; then
if [[ $distro == "manjarolinux" ]]; then
sudo ./system-config/unipkg.sh vte3
else
sudo ./system-config/unipkg.sh libvte-2.91-dev
fi
fi
if [[ $distro == 'kdeneon' ]]; then
kwriteconfig5 --file "$HOME/.config/kglobalshortcutsrc" --group "kwin" --key "Show Desktop" "Meta+D,none,Show Desktop"
kwriteconfig5 --file "$HOME/.config/kglobalshortcutsrc" --group "kwin" --key "Window Close" "Alt+F4,none,Close Window"
kwriteconfig5 --file "$HOME/.config/kglobalshortcutsrc" --group "kwin" --key "Window Minimize" "Meta+PgDown,none,Minimize Window"
kwriteconfig5 --file "$HOME/.config/kglobalshortcutsrc" --group "kwin" --key "Window Maximize" "Meta+PgUp,none,Maximize Window"
kquitapp5 kglobalaccel && sleep 2s && kglobalaccel5 &
fi
if [[ $distro == 'fedora' ]]; then
echo "Checking SELinux status..."
if [[ $(perl -ne 'print if /^SELINUX=enforcing/' /etc/selinux/config | wc -l) != 0 ]]; then
while true; do
read -rep $'\nWould you like to update your SELinux state from enforcing to permissive? (y/n)\n' yn
case $yn in
[Yy]* ) setSE='yes'; break;;
[Nn]* ) exp='no'; expsh=" " break;;
# * ) echo "Please answer yes or no.";;
esac
done
if [[ $yn == "yes" ]]; then
sed -i "s/SELINUX=enforcing/SELINUX=permissive/g" /etc/selinux/config
echo "/etc/selinux/config has been updated. Please reboot your computer before continuing."
exit 0
fi
else
echo "SELinux state should be ok for Kinto to install"
fi
if [[ $(gsettings get org.gnome.desktop.wm.keybindings show-desktop | grep "\[\]" | wc -l) == 1 ]];then
gsettings set org.gnome.desktop.wm.keybindings show-desktop "['<Super>d']"
else
if [[ $(gsettings get org.gnome.desktop.wm.keybindings show-desktop | grep "<Super>d" | wc -l) == 0 ]]; then
echo 'Kinto will not set your "Show Desktop" hotkey due to it already being set.\nPlease set Show Desktop to Super-D, or Edit Kinto'"'"'s config.'
echo "Did not run the following."
echo "gsettings set org.gnome.desktop.wm.keybindings show-desktop \"['<Super>d']\""
fi
fi
fi
# if [ $# -eq 0 ]; then
# echo "Install Kinto - xkeysnail (udev)"
# echo " 1) Windows & Mac (HID driver) - Most Standard keyboards (& 1st party usb/bt Apple keyboards)"
@@ -187,22 +324,25 @@ if ! [ -x "$(command -v pip3)" ]; then
sudo ./system-config/unipkg.sh python3-pip
fi
if ! [ -x "$(command -v python3-config)" ]; then
if [ "$distro" == "ubuntu" ] || [ "$distro" == "debian" ] || [ "$distro" == '"linux mint"' ]; then
if [ "$distro" == "ubuntu" ] || [ "$distro" == "debian" ] || [ "$distro" == 'linuxmint' ]; then
pydev="python3-dev"
elif [ "$distro" == "fedora" ]; then
pydev="python3-devel"
fi
if [ "$distro" == "gnome" ] || [ "$distro" == "fedora" ] || [ "$distro" == "debian" ] || [ "$distro" == '"linux mint"' ]; then
if [ "$distro" == "gnome" ] || [ "$distro" == "fedora" ] || [ "$distro" == "debian" ] || [ "$distro" == 'linuxmint' ]; then
echo "Will need to install $pydev..."
sudo ./system-config/unipkg.sh "$pydev"
fi
fi
# if [ "$distro" == "ubuntu" ] && [ "$dename" == "gnome" ];then
# sudo ./system-config/unipkg.sh gnome-tweaks gnome-shell-extension-appindicator gir1.2-appindicator3-0.1
# 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
if [ "$distro" == 'linuxmint' ]; then
pip3 install setuptools
fi
@@ -230,13 +370,12 @@ yes | cp -rf ./xkeysnail-config/xkeysnail.desktop ~/.config/kinto/xkeysnail.desk
# 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
git describe --tags --always origin master | perl -ne "print \"\$1 build `git rev-parse --short HEAD`\n\" for m/\b(.*)-\w+-\w{8}/" | head -n 1 > ~/.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 ./xkeysnail-config/limitedadmins ./xkeysnail-config/limitedadmins.new
yes | cp -rf ./xkeysnail-config/gui/ ~/.config/kinto/
yes | cp -nrf ./xkeysnail-config/initkb ~/.config/kinto/initkb
yes | cp -rf ./xkeysnail-config/killdups.sh ~/.config/kinto/killdups.sh
yes | cp -rf ./xkeysnail-config/appleKB.sh ~/.config/kinto/appleKB.sh
yes | cp -rf ./xkeysnail-config/trayapps/appindicator/kintotray.py ~/.config/kinto/kintotray.py
yes | cp -rf ./xkeysnail-config/trayapps/appindicator/kintotray.desktop ~/.config/kinto/kintotray.desktop
yes | cp -rf ./xkeysnail-config/gui/kinto.desktop ./xkeysnail-config/gui/kinto.desktop.new
@@ -264,9 +403,6 @@ 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#{systemctl}#`\\which systemctl`#g" ./xkeysnail-config/limitedadmins.new
sed -i "s#{pkill}#`\\which pkill`#g" ./xkeysnail-config/limitedadmins.new
sed -i "s#{xkeysnail}#/usr/local/bin/xkeysnail#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/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
@@ -274,15 +410,37 @@ sed -i "s#{homedir}#`echo "$HOME"`#g" ~/.config/kinto/xkeysnail.desktop
sed -i "s/{displayid}/`echo "$DISPLAY"`/g" ./xkeysnail-config/xkeysnail.service.new
# sed -i "s/{displayid}/`echo "$DISPLAY"`/g" ~/.config/kinto/prexk.sh
if [[ $dename == "gnome" || dename == "budgie" ]]; then
perl -pi -e "s/(# )(.*)(# gnome)/\$2\$3/g" ./xkeysnail-config/kinto.py.new >/dev/null 2>&1
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
fi
if [[ $distro == "popos" ]]; then
perl -pi -e "\s{4}(# )(K.*)(# SL - .*popos.*)/ \$2\$3/g" ./xkeysnail-config/kinto.py.new >/dev/null 2>&1
fi
if [[ $distro == "fedora" ]]; then
perl -pi -e "\s{4}(# )(K.*)(# SL - .*fedora.*)/ \$2\$3/g" ./xkeysnail-config/kinto.py.new >/dev/null 2>&1
fi
if [[ $distro == "elementaryos" ]]; then
perl -pi -e "\s{4}(# )(K.*)(# SL - .*eos.*)/ \$2\$3/g" ./xkeysnail-config/kinto.py.new >/dev/null 2>&1
fi
if [[ "$distro" == "manjaro"* ]]; then
perl -pi -e "\s{4}(# )(K.*)(# SL - .*manjaro.*)/ \$2\$3/g" ./xkeysnail-config/kinto.py.new >/dev/null 2>&1
fi
if [[ $dename == "gnome" ]]; then
perl -pi -e "\s{4}(# )(K.*)(# SL - .*ubuntu.*)/ \$2\$3/g" ./xkeysnail-config/kinto.py.new >/dev/null 2>&1
fi
if [[ $dename == "kde" ]]; then
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
fi
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/(# )(.*)(# 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
@@ -302,14 +460,10 @@ if ! [[ $1 == "5" || $1 == "uninstall" || $1 == "Uninstall" ]]; then
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
git clone --depth 10 https://github.com/rbreaves/xkeysnail.git
cd xkeysnail
git pull --depth 10
git checkout 51c369084e0045a8410d227bab52411bf84fb65b
giturl=$(git ls-remote --get-url)
if [ "$giturl" != "https://github.com/rbreaves/xkeysnail.git" ];then
@@ -322,6 +476,23 @@ if ! [[ $1 == "5" || $1 == "uninstall" || $1 == "Uninstall" ]]; then
fi
sudo pip3 install --upgrade .
cd ..
which xkeysnail
if [ $? -eq 1 ]; then
echo -e "\nKinto install has \e[1m\033[0;91mfailed\e[0m.\n"
echo -e "cd into ./xkeysnail"
echo -e "Run 'sudo pip3 install --upgrade .' to debug issue"
exit 0
fi
sed -i "s#{xkeysnail}#`which xkeysnail`#g" ./xkeysnail-config/xkeysnail.service.new
sed -i "s#{xkeysnail}#`which xkeysnail`#g" ./xkeysnail-config/limitedadmins.new
sudo mv ./xkeysnail-config/xkeysnail.service.new "$xkeypath"xkeysnail.service && echo "Service file added to "$xkeypath"xkeysnail.service"
sudo chown root:root ./xkeysnail-config/limitedadmins.new
# Add a check here for xkeysnail path resolving
sudo mv ./xkeysnail-config/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 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..."
sudo systemctl daemon-reload
sudo systemctl disable xkeysnail
sudo systemctl stop xkeysnail
@@ -332,9 +503,8 @@ if ! [[ $1 == "5" || $1 == "uninstall" || $1 == "Uninstall" ]]; then
# sudo systemctl enable xkeysnail.service
# fi
# sudo systemctl restart xkeysnail
if ! [[ $dename == "gnome" || $dename == "kde" ]];then
sudo pkill -f kintotray >/dev/null 2>&1
else
sudo pkill -f kintotray >/dev/null 2>&1
if [[ $dename == "gnome" || $dename == "kde" ]];then
sed -i "s/systray = true/systray = false/g" ~/.config/kinto/initkb
fi
nohup python3 ~/.config/kinto/gui/kinto-gui.py >/dev/null 2>&1 &
@@ -361,33 +531,21 @@ if ! [[ $1 == "5" || $1 == "uninstall" || $1 == "Uninstall" ]]; then
echo -e "Kinto install is \e[1m\e[32mcomplete\e[0m.\n"
elif [[ $1 == "5" || $1 == "uninstall" || $1 == "Uninstall" ]]; then
echo "Uninstalling Kinto - xkeysnail (udev)"
uninstall
removeAppleKB
pkill -f kintotray >/dev/null 2>&1
sudo systemctl stop xkeysnail >/dev/null 2>&1
sudo systemctl disable xkeysnail >/dev/null 2>&1
sudo pkill -f bin/xkeysnail >/dev/null 2>&1
sudo pkill -f "is-active xkeysnail" >/dev/null 2>&1
sudo rm /etc/sudoers.d/limitedadmins >/dev/null 2>&1
rm ~/.config/autostart/xkeysnail.desktop >/dev/null 2>&1
rm ~/.config/autostart/kintotray.desktop >/dev/null 2>&1
rm -rf ~/.config/kinto >/dev/null 2>&1
sudo rm /etc/systemd/system/xkeysnail.service >/dev/null 2>&1
sudo rm /usr/share/applications/kinto.desktop >/dev/null 2>&1
sudo rm /etc/systemd/system/graphical.target.wants/xkeysnail.service >/dev/null 2>&1
sudo rm /usr/lib/systemd/system/xkeysnail.service >/dev/null 2>&1
sudo rm /lib/systemd/system/xkeysnail.service >/dev/null 2>&1
if [ -f /usr/local/bin/logoff.sh ];then
sudo rm /usr/local/bin/logoff.sh
echo "If the setup wizard fails to appear then please run this command."
echo -e "~/.config/kinto/gui/kinto-gui.py\n"
echo -e "You can then either \e]8;;https://google.com\a\e[1m\e[36mG\033[0;91mo\033[0;93mo\e[1m\e[36mg\e[1m\e[32ml\033[0;91me\e[0m\e]8;;\a what dependencies you may be missing\nor \e]8;;https://github.com/rbreaves/kinto/issues/new\?assignees=rbreaves&labels=bug&template=bug_report.md&title=\aopen an issue ticket.\e]8;;\a\n"
if [ "$distro" == "manjarolinux" ]; then
echo "If you are using Manjaro and see an error about 'GLIBC_2.xx not found' appears then please update your system."
echo "sudo pacman -Syu"
fi
sudo systemctl daemon-reload
sudo systemctl --state=not-found --all | grep xkeysnail
budgieUninstall
exit 0
elif [[ $1 == "budgieUpdate" ]]; then
budgieUpdate
else
echo "Expected argument was not provided"
if [ "$dename" == "gnome" ];then
echo "Gnome may not support appindicators well, so by default you may need to install packages before enabling the System Tray."
echo "You may try one of the following extensions."
echo -e " 1) \e]8;;https://extensions.gnome.org/extension/615/appindicator-support/\aAppIndicator and KStatusNotifierItem Support\e]8;;\a"
echo -e " 2) \e]8;;https://extensions.gnome.org/extension/1031/topicons/\aTopIcons Plus\e]8;;\a"
echo -e "\nNote: you may want these supporting packages\n'sudo apt install gnome-tweaks gnome-shell-extension-appindicator gir1.2-appindicator3-0.1'"
fi
fi