Compare commits

..

54 Commits
gui ... 1.2-2

Author SHA1 Message Date
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
42 changed files with 665 additions and 919 deletions

BIN
Kinto.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 22 KiB

251
README.md
View File

@@ -9,12 +9,7 @@
Seamless copy and paste with all apps and terminals. The zero effort solution. Seamless copy and paste with all apps and terminals. The zero effort solution.
System tray supports the following, but Kinto can run without it on Linux. v1.2 Release - Kinto now includes a system tray and simple wizard to setup the install with minimal effort.
|<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.
## Table of Contents ## 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'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 (Linux)](#How-to-install-Linux)
[How to install (Windows)](#How-to-install-Windows) [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) [How to Upgrade/Control Kinto](#How-to-Upgrade-Kinto)
@@ -78,45 +71,12 @@ If your OS and macOS have similar functionality on the system level, but only di
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. 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%">
## How to install (Linux) ## 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 1. clone this repo
``` ```
git clone https://github.com/rbreaves/kinto.git git clone https://github.com/rbreaves/kinto.git
@@ -130,15 +90,22 @@ sudo apt update
sudo apt install python3 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 ./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 To Uninstall Kinto
``` ```
./setup.py ./setup.py -r
``` ```
## How to Install (Windows) ## How to Install (Windows)
@@ -168,6 +135,34 @@ To Uninstall Kinto - Select Uninstall
``` ```
py setup.py py setup.py
``` ```
## What does Kinto require?
- Python
- systemd
- x11
- xkeysnail
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.
### 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%">
## Shortcut Creation ## 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. 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.
@@ -258,33 +253,11 @@ I don't have too many examples on this one, most developers seem to be shying aw
## Shortcut Creation (XKB) ## Shortcut Creation (XKB)
The older xkb shortcut method info can be read about in ticket [#125](https://github.com/rbreaves/kinto/issues/125). 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 ## 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 git pull origin master
@@ -293,55 +266,26 @@ git pull origin master
## How to Control Kinto ## How to Control Kinto
Under systemd this is how you control Kinto. 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.
Recommended Install - Kinto (udev/xkeysnail/x11) = xkeysnail
Older Install - Kinto (xkb/x11) = keyswap
Status Status
``` ```
sudo systemctl status xkeysnail sudo systemctl status xkeysnail
systemctl --user status keyswap # older - you probably should not run this one
``` ```
Stop (your keymap will return to normal) Stop (your keymap will return to normal)
``` ```
sudo systemctl stop xkeysnail sudo systemctl stop xkeysnail
systemctl --user stop keyswap # older - you probably should not run this one
``` ```
Start Start
``` ```
sudo systemctl start xkeysnail sudo systemctl start xkeysnail
systemctl --user start keyswap # older - you probably should not run this one
``` ```
Restart Restart
``` ```
sudo systemctl restart xkeysnail 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 ## Troubleshooting
@@ -363,36 +307,26 @@ To disable keyboard mapping:
### Does not start when you log in or after you reboot? ### 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. 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 echo $DISPLAY
# :0.0 # :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 sudo nano /etc/systemd/system/xkeysnail.service
``` ```
@@ -406,73 +340,6 @@ Environment=DISPLAY=:0.0
If you continue to have issues then open a ticket and send me the info. 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 ## Language Support
I'd appreciate any help from people with non-US based keyboards, to help ensure that these keymaps and keyswap methods work in all or most languages. I'd appreciate any help from people with non-US based keyboards, to help ensure that these keymaps and keyswap methods work in all or most languages.

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") os.mkdir(homedir + "/.config/kinto")
time.sleep(0.5) time.sleep(0.5)
cmdline("git fetch")
color_arr = [bcolors.CBEIGE,bcolors.CRED2,bcolors.CGREEN,bcolors.CYELLOW ] 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: if args.uninstall:
subprocess.check_call(shlex.split("./xkeysnail_service.sh 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")) 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

@@ -235,11 +235,13 @@ GroupAdd, intellij, ahk_exe idea64.exe
; $LAlt::LCtrl ; CB/IBM ; $LAlt::LCtrl ; CB/IBM
; $RAlt::RCtrl ; CB/IBM ; $RAlt::RCtrl ; CB/IBM
; $RCtrl::RAlt ; CB/IBM
; $CapsLock::LWin ; IBM ; $CapsLock::LWin ; IBM
; $LCtrl::LAlt ; CB/IBM ; $LCtrl::LAlt ; CB/IBM
; $LAlt::LCtrl ; WinModifiers ; $LAlt::LCtrl ; WinModifiers
; $RAlt::RCtrl ; WinModifiers ; $RAlt::RCtrl ; WinModifiers
; $RCtrl::RAlt ; WinModifiers
; $LWin::LAlt ; WinModifiers ; $LWin::LAlt ; WinModifiers
; $LCtrl::LWin ; WinModifiers ; $LCtrl::LWin ; WinModifiers

View File

@@ -43,6 +43,8 @@ class MyWindow(Gtk.Window):
bgerror = Gtk.Image() bgerror = Gtk.Image()
bguninstall = Gtk.Image() bguninstall = Gtk.Image()
last_onward = Gtk.Button() last_onward = Gtk.Button()
first_onward = Gtk.ToggleButton()
page = 1
label = Gtk.Label() label = Gtk.Label()
label.set_alignment(1, 0) label.set_alignment(1, 0)
@@ -66,8 +68,6 @@ class MyWindow(Gtk.Window):
ibmkb.signal_id = 0 ibmkb.signal_id = 0
winmackb.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 = Gtk.CheckMenuItem(label="Autostart")
menuitem_auto.signal_id = 0 menuitem_auto.signal_id = 0
menuitem_systray = Gtk.CheckMenuItem(label="Tray Enabled") menuitem_systray = Gtk.CheckMenuItem(label="Tray Enabled")
@@ -80,6 +80,7 @@ class MyWindow(Gtk.Window):
homedir = os.path.expanduser("~") homedir = os.path.expanduser("~")
self.kconfig = homedir+"/.config/kinto/kinto.py" self.kconfig = homedir+"/.config/kinto/kinto.py"
autostart_bool = False
path = os.environ['HOME']+'/.config/kinto/kinto-color.svg' path = os.environ['HOME']+'/.config/kinto/kinto-color.svg'
width = -1 width = -1
@@ -119,7 +120,6 @@ class MyWindow(Gtk.Window):
self.InputToTerm(self.command) self.InputToTerm(self.command)
grid = Gtk.Grid() grid = Gtk.Grid()
grid.modify_bg(Gtk.StateFlags.NORMAL, Gdk.color_parse("#2d303b"))
self.add(grid) self.add(grid)
menubar = Gtk.MenuBar() menubar = Gtk.MenuBar()
@@ -130,7 +130,10 @@ class MyWindow(Gtk.Window):
scroller.set_vexpand(True) scroller.set_vexpand(True)
scroller.add(terminal) scroller.add(terminal)
grid.attach(scroller, 0, 1, 1, 1) 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: with open(self.kconfig) as configfile:
autostart_line = configfile.read().split('\n')[1] autostart_line = configfile.read().split('\n')[1]
@@ -150,7 +153,6 @@ class MyWindow(Gtk.Window):
menubar.append(menuitem_file) menubar.append(menuitem_file)
submenu_file = Gtk.Menu() submenu_file = Gtk.Menu()
menuitem_file.set_submenu(submenu_file) menuitem_file.set_submenu(submenu_file)
submenu_file.append(self.menuitem_enable)
submenu_file.append(self.menuitem_auto) submenu_file.append(self.menuitem_auto)
kintotray = int(self.queryConfig('ps -aux | grep [k]intotray >/dev/null 2>&1 && echo "1" || echo "0"')) 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'): if kintotray and os.path.exists(os.environ['HOME']+'/.config/autostart/kintotray.desktop'):
@@ -164,6 +166,9 @@ class MyWindow(Gtk.Window):
menuitem_restart = Gtk.MenuItem(label="Restart") menuitem_restart = Gtk.MenuItem(label="Restart")
menuitem_restart.connect('activate',self.runRestart) menuitem_restart.connect('activate',self.runRestart)
submenu_file.append(menuitem_restart) 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") menuitem_quit = Gtk.MenuItem(label="Quit")
submenu_file.append(menuitem_quit) submenu_file.append(menuitem_quit)
@@ -395,6 +400,7 @@ class MyWindow(Gtk.Window):
self.setupwin.set_position(Gtk.WindowPosition.CENTER) self.setupwin.set_position(Gtk.WindowPosition.CENTER)
self.setupwin.add(self.overlay) self.setupwin.add(self.overlay)
self.setupwin.signal_id = 0
from PIL import Image from PIL import Image
@@ -503,7 +509,7 @@ class MyWindow(Gtk.Window):
countkb += 1 countkb += 1
if 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 return
@@ -654,7 +660,7 @@ class MyWindow(Gtk.Window):
Popen(restart) Popen(restart)
except CalledProcessError: 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): def setTweaks(self,button):
win = Gtk.Window() win = Gtk.Window()
@@ -746,12 +752,12 @@ class MyWindow(Gtk.Window):
restartsvc = False restartsvc = False
except CalledProcessError: 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": if openWin and self.get_title() == "Keyboard Assistant":
openWin = False openWin = False
win.show_all() win.show_all()
else: elif self.get_title() == "Keyboard Assistant":
Gtk.main_quit() Gtk.main_quit()
self.hide() self.hide()
self.destroy() self.destroy()
@@ -786,7 +792,7 @@ class MyWindow(Gtk.Window):
restartsvc = True restartsvc = True
except CalledProcessError: except CalledProcessError:
Popen(['notify-send','Kinto: Error Resetting AltGr!','-i','budgie-desktop-symbolic']) Popen(['notify-send','Kinto: Error Resetting AltGr!'])
return return
@@ -806,7 +812,7 @@ class MyWindow(Gtk.Window):
restartsvc = True restartsvc = True
except CalledProcessError: 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 return
def setCaps2Esc(self,button): def setCaps2Esc(self,button):
@@ -830,7 +836,7 @@ class MyWindow(Gtk.Window):
restartsvc = True restartsvc = True
except CalledProcessError: except CalledProcessError:
Popen(['notify-send','Kinto: Error resetting caps2esc!','-i','budgie-desktop-symbolic']) Popen(['notify-send','Kinto: Error resetting caps2esc!'])
return return
@@ -856,7 +862,7 @@ class MyWindow(Gtk.Window):
restartsvc = True restartsvc = True
except CalledProcessError: except CalledProcessError:
Popen(['notify-send','Kinto: Error resetting caps2cmd!','-i','budgie-desktop-symbolic']) Popen(['notify-send','Kinto: Error resetting caps2cmd!'])
return return
@@ -875,33 +881,22 @@ class MyWindow(Gtk.Window):
self.command = "send \003 journalctl -f --unit=xkeysnail.service -b\n" self.command = "send \003 journalctl -f --unit=xkeysnail.service -b\n"
self.InputToTerm(self.command) self.InputToTerm(self.command)
except: 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: try:
if enableKinto: stop = Popen(['sudo', 'systemctl','stop','xkeysnail'])
res = Popen(['pgrep','xkeysnail']) stop.wait()
res.wait() time.sleep(1)
print(res.returncode) res = Popen(['pgrep','xkeysnail'])
res.wait()
if res.returncode == 0: if res.returncode == 0:
pkillxkey = Popen(['sudo', 'pkill','-f','bin/xkeysnail']) # Popen(['notify-send','Kinto: Ending Debug'])
pkillxkey.wait() pkillxkey = Popen(['sudo', 'pkill','-f','bin/xkeysnail'])
pkillxkey.wait()
Popen(['sudo', 'systemctl','restart','xkeysnail']) except:
self.menuitem_enable.disconnect(self.menuitem_enable.signal_id) Popen(['notify-send','Kinto: Error stopping Kinto!'])
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'])
def setAutostart(self,button,autostart): def setAutostart(self,button,autostart):
try: try:
@@ -917,7 +912,7 @@ class MyWindow(Gtk.Window):
self.menuitem_auto.signal_id = self.menuitem_auto.connect('activate',self.setAutostart,False) self.menuitem_auto.signal_id = self.menuitem_auto.connect('activate',self.setAutostart,False)
except CalledProcessError: except CalledProcessError:
Popen(['notify-send','Kinto: Error setting autostart!','-i','budgie-desktop-symbolic']) Popen(['notify-send','Kinto: Error setting autostart!'])
def setConfig(self,button): def setConfig(self,button):
try: try:
@@ -929,7 +924,7 @@ class MyWindow(Gtk.Window):
Popen(['mousepad',os.environ['HOME']+'/.config/kinto/kinto.py']) Popen(['mousepad',os.environ['HOME']+'/.config/kinto/kinto.py'])
except CalledProcessError: # Notify user about error on running restart commands. 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): def setService(self,button):
try: try:
@@ -941,7 +936,7 @@ class MyWindow(Gtk.Window):
Popen(['mousepad','/lib/systemd/system/xkeysnail.service']) Popen(['mousepad','/lib/systemd/system/xkeysnail.service'])
except CalledProcessError: # Notify user about error on running restart commands. 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): def setSysKB(self,button):
if self.ostype == "XFCE": if self.ostype == "XFCE":
@@ -994,66 +989,65 @@ class MyWindow(Gtk.Window):
status = self.non_block_read() status = self.non_block_read()
if self.label.get_text().strip() != self.remove_tags(status): if self.label.get_text().strip() != self.remove_tags(status):
self.label.set_markup(" " + 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 return self.kinto_status.poll() is None
def key_press_event(self, widget, event, page): def key_press_event(self, widget, event):
global openWin global openWin
trigger = "None" trigger = "None"
keyname = Gdk.keyval_name(event.keyval) keyname = Gdk.keyval_name(event.keyval)
current = self.second_page current = self.second_page
bg = self.bgsuccess4 bg = self.bgsuccess4
onward = self.success_page 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("IBM or Chromebook")
print("Continue to page 2") print("Continue to page 2")
bg = self.bgcaps bg = self.bgcaps
onward = self.caps_page onward = self.caps_page
trigger = "Half" 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") print("Set IBM Keyboard")
current = self.caps_page current = self.caps_page
self.options["kbtype"] = "ibm" self.options["kbtype"] = "ibm"
trigger = "Done" trigger = "Done"
elif page == 2 and "Super" in keyname: elif self.page == 2 and "Super" in keyname:
print("Set Chromebook Keyboard") print("Set Chromebook Keyboard")
current = self.caps_page current = self.caps_page
self.options["kbtype"] = "cbk" self.options["kbtype"] = "cbk"
trigger = "Done" trigger = "Done"
elif page == 1 and "Alt" in keyname: elif self.page == 1 and "Alt" in keyname:
print("Set Mac Keyboard") print("Set Mac Keyboard")
self.options["kbtype"] = "mac" self.options["kbtype"] = "mac"
trigger = "Done" trigger = "Done"
elif page == 1 and "Super" in keyname: elif self.page == 1 and "Super" in keyname:
print("Set Win Keyboard") print("Set Win Keyboard")
self.options["kbtype"] = "win" self.options["kbtype"] = "win"
trigger = "Done" trigger = "Done"
if trigger == "Half" or trigger == "Done": if trigger == "Half" or trigger == "Done" and openWin == False:
for grandkid in self.overlay.get_children(): for grandkid in self.overlay.get_children():
self.overlay.remove(grandkid) self.overlay.remove(grandkid)
self.overlay.add(bg) self.overlay.add(bg)
self.overlay.add_overlay(self.container) self.overlay.add_overlay(self.container)
self.container.add(onward) self.container.add(onward)
self.container.remove(current) self.container.remove(current)
self.setupwin.disconnect(self.setupwin.signal_id) # self.setupwin.disconnect(self.setupwin.signal_id)
if trigger == "Half": if trigger == "Half" and openWin == False:
self.setupwin.signal_id = self.setupwin.connect("key_press_event", self.key_press_event,2) # print("reset key_press_event")
# self.setupwin.signal_id = self.setupwin.connect("key_press_event", self.key_press_event)
self.setupwin.show_all() self.setupwin.show_all()
elif trigger == "Done": elif trigger == "Done" and openWin == False:
print("in Done")
self.setKinto() self.setKinto()
self.setupwin.show_all() self.setupwin.show_all()
openWin = True openWin = True
self.last_onward.grab_focus() 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): def InputToTerm(self,cmd):
# Not clearly known which VTE versions # Not clearly known which VTE versions
@@ -1162,15 +1156,22 @@ class FirstPage(Gtk.Box):
scroller.add(vbox) scroller.add(vbox)
hbox = Gtk.HBox() 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.connect("clicked", self.goback)
previous.set_margin_right(245) previous.set_margin_right(245)
hbox.add(previous) hbox.add(previous)
onward = Gtk.Button("Agree") self.__parent_window.first_onward.set_label("")
onward.connect("clicked", self.forward) 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_hexpand(False)
hbox.set_vexpand(False) hbox.set_vexpand(False)
hbox.set_margin_bottom(6) hbox.set_margin_bottom(6)
@@ -1188,19 +1189,22 @@ class FirstPage(Gtk.Box):
self.grid.add(vbox_container) self.grid.add(vbox_container)
self.grid.attach_next_to(hbox, vbox_container, Gtk.PositionType.BOTTOM, 2, 1) self.grid.attach_next_to(hbox, vbox_container, Gtk.PositionType.BOTTOM, 2, 1)
self.add(self.grid) self.add(self.grid)
onward.grab_focus() self.__parent_window.first_onward.grab_focus()
def goback(self, *args): def goback(self, *args):
Gtk.main_quit() Gtk.main_quit()
self.hide() self.hide()
def forward(self, button): def forward(self, button):
self.__parent_window.first_onward.set_active(True)
for grandkid in self.__parent_window.overlay.get_children(): for grandkid in self.__parent_window.overlay.get_children():
self.__parent_window.overlay.remove(grandkid) self.__parent_window.overlay.remove(grandkid)
self.__parent_window.overlay.add(self.__parent_window.bgspace) self.__parent_window.overlay.add(self.__parent_window.bgspace)
self.__parent_window.overlay.add_overlay(self.__parent_window.container) self.__parent_window.overlay.add_overlay(self.__parent_window.container)
self.__parent_window.container.add(self.__parent_window.second_page) 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.container.remove(self.__parent_window.first_page)
self.__parent_window.setupwin.show_all() self.__parent_window.setupwin.show_all()
self.hide() self.hide()
@@ -1224,7 +1228,10 @@ class SecondPage(Gtk.Box):
scroller.add(vbox) scroller.add(vbox)
hbox = Gtk.HBox() 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.connect("clicked", self.goback)
previous.set_margin_right(315) previous.set_margin_right(315)
hbox.add(previous) hbox.add(previous)
@@ -1260,29 +1267,31 @@ class SecondPage(Gtk.Box):
self.__parent_window.container.remove(self.__parent_window.second_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.disconnect(self.__parent_window.setupwin.signal_id)
self.__parent_window.setupwin.show_all() self.__parent_window.setupwin.show_all()
self.__parent_window.first_onward.grab_focus()
self.hide() self.hide()
def capsforward(self, *args): # def capsforward(self, *args):
for grandkid in self.__parent_window.overlay.get_children(): # for grandkid in self.__parent_window.overlay.get_children():
self.__parent_window.overlay.remove(grandkid) # self.__parent_window.overlay.remove(grandkid)
self.__parent_window.overlay.add(self.__parent_window.bgcaps) # self.__parent_window.overlay.add(self.__parent_window.bgcaps)
self.__parent_window.overlay.add_overlay(self.__parent_window.container) # self.__parent_window.overlay.add_overlay(self.__parent_window.container)
self.__parent_window.container.add(self.__parent_window.caps_page) # self.__parent_window.container.add(self.__parent_window.caps_page)
self.__parent_window.container.remove(self.__parent_window.second_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.disconnect(self.__parent_window.setupwin.signal_id)
self.__parent_window.setupwin.show_all() # self.__parent_window.setupwin.signal_id = self.__parent_window.setupwin.connect("key_press_event", self.__parent_window.key_press_event,2)
self.hide() # self.__parent_window.setupwin.show_all()
# self.hide()
def forward(self, *args): # def forward(self, *args):
for grandkid in self.__parent_window.overlay.get_children(): # for grandkid in self.__parent_window.overlay.get_children():
self.__parent_window.overlay.remove(grandkid) # self.__parent_window.overlay.remove(grandkid)
self.__parent_window.overlay.add(self.__parent_window.bgsuccess4) # self.__parent_window.overlay.add(self.__parent_window.bgsuccess4)
self.__parent_window.overlay.add_overlay(self.__parent_window.container) # self.__parent_window.overlay.add_overlay(self.__parent_window.container)
self.__parent_window.container.add(self.__parent_window.success_page) # self.__parent_window.container.add(self.__parent_window.success_page)
self.__parent_window.container.remove(self.__parent_window.second_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.disconnect(self.__parent_window.setupwin.signal_id)
self.__parent_window.setupwin.show_all() # self.__parent_window.setupwin.show_all()
self.hide() # self.hide()
class CapsPage(Gtk.Box): class CapsPage(Gtk.Box):
def __init__(self, parent_window): def __init__(self, parent_window):
@@ -1303,7 +1312,10 @@ class CapsPage(Gtk.Box):
scroller.add(vbox) scroller.add(vbox)
hbox = Gtk.HBox() 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.connect("clicked", self.goback)
previous.set_margin_right(315) previous.set_margin_right(315)
hbox.add(previous) hbox.add(previous)
@@ -1336,22 +1348,23 @@ class CapsPage(Gtk.Box):
self.__parent_window.overlay.add(self.__parent_window.bgspace) self.__parent_window.overlay.add(self.__parent_window.bgspace)
self.__parent_window.overlay.add_overlay(self.__parent_window.container) self.__parent_window.overlay.add_overlay(self.__parent_window.container)
self.__parent_window.container.add(self.__parent_window.second_page) self.__parent_window.container.add(self.__parent_window.second_page)
self.__parent_window.setupwin.disconnect(self.__parent_window.setupwin.signal_id) self.__parent_window.page = 1
self.__parent_window.setupwin.signal_id = self.__parent_window.setupwin.connect("key_press_event", self.__parent_window.key_press_event,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.container.remove(self.__parent_window.caps_page)
self.__parent_window.setupwin.show_all() self.__parent_window.setupwin.show_all()
self.hide() self.hide()
def forward(self, *args): # def forward(self, *args):
for grandkid in self.__parent_window.overlay.get_children(): # for grandkid in self.__parent_window.overlay.get_children():
self.__parent_window.overlay.remove(grandkid) # self.__parent_window.overlay.remove(grandkid)
self.__parent_window.overlay.add(self.__parent_window.bgsuccess4) # self.__parent_window.overlay.add(self.__parent_window.bgsuccess4)
self.__parent_window.overlay.add_overlay(self.__parent_window.container) # self.__parent_window.overlay.add_overlay(self.__parent_window.container)
self.__parent_window.container.add(self.__parent_window.success_page) # self.__parent_window.container.add(self.__parent_window.success_page)
self.__parent_window.container.remove(self.__parent_window.caps_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.disconnect(self.__parent_window.setupwin.signal_id)
self.__parent_window.setupwin.show_all() # self.__parent_window.setupwin.show_all()
self.hide() # self.hide()
class SuccessPage(Gtk.Box): class SuccessPage(Gtk.Box):
def __init__(self, parent_window): def __init__(self, parent_window):
@@ -1367,6 +1380,7 @@ class SuccessPage(Gtk.Box):
def forward(self, *args): def forward(self, *args):
self.hide() self.hide()
# self.__parent_window.setupwin.disconnect(self.__parent_window.setupwin.signal_id)/
self.__parent_window.setupwin.close() self.__parent_window.setupwin.close()
@@ -1375,5 +1389,6 @@ win = MyWindow()
win.connect("delete-event", Gtk.main_quit) win.connect("delete-event", Gtk.main_quit)
if openWin: if openWin:
win.show_all() win.show_all()
openWin = False
Gtk.main() Gtk.main()

View File

@@ -202,18 +202,34 @@ define_keymap(re.compile(browserStr, re.IGNORECASE),{
}) })
define_keymap(None,{ define_keymap(None,{
# Launch Application Menu K("RC-Space"): K("Alt-F1"), # Default SL - Launch Application Menu (gnome/kde)
# K("RC-Space"): K("Alt-F1"), # gnome/kde K("RC-F3"):K("Super-d"), # Default SL - Show Desktop (gnome/kde,eos)
# K("RC-Space"): K("LC-Esc"), # xfce4 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 # Basic App hotkey functions
K("RC-Q"): K("Alt-F4"), # K("RC-H"):K("M-F9"), # SL - Minimize app xfce4
K("RC-H"): K("Alt-F9"), # K("RC-LC-f"):K("Super-PAGE_DOWN"), # SL - Minimize app manjaro
# Cmd Tab - App Switching Default # 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-Tab"): K("RC-backslash"), # xfce4
# K("RC-Shift-Tab"): K("RC-Shift-backslash"), # xfce4 # K("RC-Shift-Tab"): K("RC-Shift-backslash"), # xfce4
# K("RC-Grave"): K("RC-Shift-backslash"), # xfce4 # K("RC-Grave"): K("RC-Shift-backslash"), # xfce4
@@ -242,8 +258,8 @@ define_keymap(None,{
# K("M-Backspace"): K("Delete"), # Chromebook/IBM - Delete # K("M-Backspace"): K("Delete"), # Chromebook/IBM - Delete
K("Super-Backspace"): K("C-Backspace"), # Default not-chromebook - Delete Left Word of Cursor 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("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-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-Delete"): K("C-Delete"), # Default not-chromebook - Delete Right Word of Cursor
# K(""): pass_through_key, # cancel # K(""): pass_through_key, # cancel
# K(""): K(""), # # K(""): K(""), #
}) })
@@ -390,6 +406,16 @@ define_keymap(re.compile("Io.elementary.terminal|kitty", re.IGNORECASE),{
}, "Elementary Terminal tab switching") }, "Elementary Terminal tab switching")
define_keymap(re.compile(termStr, re.IGNORECASE),{ 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 # Ctrl Tab - In App Tab Switching
K("LC-Tab") : K("LC-PAGE_DOWN"), K("LC-Tab") : K("LC-PAGE_DOWN"),
K("LC-Shift-Tab") : K("LC-PAGE_UP"), K("LC-Shift-Tab") : K("LC-PAGE_UP"),

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() menu = Gtk.Menu()
menukb = Gtk.Menu() menukb = Gtk.Menu()
checkbox_autostart = Gtk.CheckMenuItem('Autostart') checkbox_autostart = Gtk.CheckMenuItem('Autostart')
checkbox_enable = Gtk.CheckMenuItem('Kinto Enabled')
restart = Gtk.MenuItem('Restart') restart = Gtk.MenuItem('Restart')
stop = Gtk.MenuItem('Stop')
keyboards = Gtk.MenuItem('Keyboard Types') keyboards = Gtk.MenuItem('Keyboard Types')
keyboards.set_submenu(menukb) keyboards.set_submenu(menukb)
winkb = Gtk.RadioMenuItem(label='Windows') winkb = Gtk.RadioMenuItem(label='Windows')
@@ -112,28 +112,10 @@ class Indicator():
self.checkbox_autostart.set_active(False) self.checkbox_autostart.set_active(False)
self.chkautostart_id = self.checkbox_autostart.connect('activate',self.setAutostart,True) 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.restart.connect('activate',self.runRestart)
self.menu.append(self.restart) self.menu.append(self.restart)
self.stop.connect('activate',self.runStop)
self.menu.append(self.stop)
self.refreshKB() self.refreshKB()
@@ -267,7 +249,7 @@ class Indicator():
countkb += 1 countkb += 1
if 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 return
@@ -298,21 +280,9 @@ class Indicator():
status = self.non_block_read().strip() status = self.non_block_read().strip()
nowts = int(time.time()) 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'): 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') 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'): 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') 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 self.last_status = status
return self.kinto_status.poll() is None return self.kinto_status.poll() is None
@@ -481,7 +451,7 @@ class Indicator():
restartsvc = False restartsvc = False
except CalledProcessError: 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.hide()
self.destroy() self.destroy()
@@ -510,7 +480,7 @@ class Indicator():
restartsvc = True restartsvc = True
except CalledProcessError: except CalledProcessError:
Popen(['notify-send','Kinto: Error Resetting AltGr!','-i','budgie-desktop-symbolic']) Popen(['notify-send','Kinto: Error Resetting AltGr!'])
return return
@@ -530,7 +500,7 @@ class Indicator():
restartsvc = True restartsvc = True
except CalledProcessError: 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 return
def setCaps2Esc(self,button): def setCaps2Esc(self,button):
@@ -554,7 +524,7 @@ class Indicator():
restartsvc = True restartsvc = True
except CalledProcessError: except CalledProcessError:
Popen(['notify-send','Kinto: Error resetting caps2esc!','-i','budgie-desktop-symbolic']) Popen(['notify-send','Kinto: Error resetting caps2esc!'])
return return
@@ -580,7 +550,7 @@ class Indicator():
restartsvc = True restartsvc = True
except CalledProcessError: except CalledProcessError:
Popen(['notify-send','Kinto: Error resetting caps2cmd!','-i','budgie-desktop-symbolic']) Popen(['notify-send','Kinto: Error resetting caps2cmd!'])
return return
@@ -593,17 +563,28 @@ class Indicator():
res.wait() res.wait()
if res.returncode == 0: 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 = Popen(['sudo', 'pkill','-f','bin/xkeysnail'])
pkillxkey.wait() pkillxkey.wait()
Popen(['sudo', 'systemctl','start','xkeysnail']) Popen(['sudo', 'systemctl','start','xkeysnail'])
except: except:
Popen(['notify-send','Kinto: Error restarting Kinto!','-i','budgie-desktop-symbolic']) Popen(['notify-send','Kinto: Error restarting Kinto!'])
# self.checkbox_enable.set_active(False)
# self.checkbox_enable.disconnect(self.enable_id) def runStop(self,button):
# self.enable_id = self.checkbox_enable.connect('activate',self.setEnable,True) try:
# self.indicator.set_icon(os.environ['HOME']+'/.config/kinto/kinto-color.svg') 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): def runDebug(self,button,opendebug):
try: try:
@@ -612,43 +593,13 @@ class Indicator():
else: else:
Popen([os.environ['HOME']+'/.config/kinto/gui/kinto-gui.py']) Popen([os.environ['HOME']+'/.config/kinto/gui/kinto-gui.py'])
except: except:
Popen(['notify-send','Kinto: Error opening Kinto!','-i','budgie-desktop-symbolic']) Popen(['notify-send','Kinto: Error opening Kinto!'])
def queryConfig(self,query): def queryConfig(self,query):
res = Popen(query, stdout=PIPE, stderr=None, shell=True) res = Popen(query, stdout=PIPE, stderr=None, shell=True)
res.wait() res.wait()
return res.communicate()[0].strip().decode('UTF-8') 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): def setAutostart(self,button,autostart):
try: try:
if autostart == False: if autostart == False:
@@ -663,7 +614,7 @@ class Indicator():
self.chkautostart_id = self.checkbox_autostart.connect('activate',self.setAutostart,False) self.chkautostart_id = self.checkbox_autostart.connect('activate',self.setAutostart,False)
except CalledProcessError: except CalledProcessError:
Popen(['notify-send','Kinto: Error setting autostart!','-i','budgie-desktop-symbolic']) Popen(['notify-send','Kinto: Error setting autostart!'])
def setConfig(self,button): def setConfig(self,button):
try: try:
@@ -675,7 +626,7 @@ class Indicator():
Popen(['mousepad',os.environ['HOME']+'/.config/kinto/kinto.py']) Popen(['mousepad',os.environ['HOME']+'/.config/kinto/kinto.py'])
except CalledProcessError: # Notify user about error on running restart commands. 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): def setService(self,button):
try: try:
@@ -687,7 +638,7 @@ class Indicator():
Popen(['mousepad','/lib/systemd/system/xkeysnail.service']) Popen(['mousepad','/lib/systemd/system/xkeysnail.service'])
except CalledProcessError: # Notify user about error on running restart commands. 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): def setKB(self,button,kbtype):
try: try:
@@ -734,7 +685,7 @@ class Indicator():
Popen(restart) Popen(restart)
except CalledProcessError: 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): def setSysKB(self,button):
if self.ostype == "XFCE": if self.ostype == "XFCE":

View File

@@ -4,7 +4,7 @@ Description=xkeysnail
[Service] [Service]
Type=simple Type=simple
KillMode=process 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' ExecStop=/usr/bin/sudo /bin/bash -c '/usr/bin/sudo pkill -f bin/xkeysnail && exit 0'
Restart=on-failure Restart=on-failure
RestartSec=3 RestartSec=3

View File

@@ -4,31 +4,32 @@
# to false for wordwise to work in Firefox # to false for wordwise to work in Firefox
typeset -l distro 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 typeset -l dename
dename=$(./system-config/dename.sh | cut -d " " -f1) dename=$(./system-config/dename.sh | cut -d " " -f1)
function uninstall { 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 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 case $yn in
[Ff]* ) yn="f"; break;; [Ff]* ) yn="f"; break;;
[Rr]* ) yn="r";break;; [Rr]* ) yn="r";break;;
* ) echo "Please answer yes or no.";; [Nn]* ) yn="n";break;;
* ) yn="n";break;;
esac esac
done done
if [ "$yn" == "f" ];then if [ "$yn" == "f" ];then
echo "Reset to factory shortcuts" echo "Reset to factory shortcuts"
if [ "$dename" == "gnome" ];then if [[ $dename == "gnome" || $dename == "budgie" ]];then
echo "Resetting DE hotkeys..." echo "Resetting DE hotkeys..."
echo "gsettings reset-recursively org.gnome.desktop.wm.keybindings" echo "gsettings reset-recursively org.gnome.desktop.wm.keybindings"
gsettings reset-recursively org.gnome.desktop.wm.keybindings gsettings reset-recursively org.gnome.desktop.wm.keybindings
echo "gsettings reset-recursively org.gnome.mutter.keybindings" echo "gsettings reset-recursively org.gnome.mutter.keybindings"
gsettings reset-recursively org.gnome.mutter.keybindings gsettings reset-recursively org.gnome.mutter.keybindings
echo "gsettings set org.gnome.mutter overlay-key 'super'"
gsettings set org.gnome.mutter overlay-key 'super'
dconf dump /org/gnome/mutter/ > mutter.conf dconf dump /org/gnome/mutter/ > mutter.conf
dconf load /org/gnome/mutter/ < mutter.conf dconf load /org/gnome/mutter/ < mutter.conf
elif [ "$dename" == "kde" ];then elif [ "$dename" == "kde" ];then
@@ -41,7 +42,7 @@ function uninstall {
fi fi
elif [ "$yn" == "r" ]; then elif [ "$yn" == "r" ]; then
echo "Restore original user shortcuts" echo "Restore original user shortcuts"
if [ "$dename" == "gnome" ]; then if [[ $dename == "gnome" || $dename == "budgie" ]]; then
echo "Restoring DE hotkeys..." echo "Restoring DE hotkeys..."
wmkeys=$(ls | grep -m1 "keybinding") wmkeys=$(ls | grep -m1 "keybinding")
mutterkeys=$(ls | grep -m1 "mutter_") mutterkeys=$(ls | grep -m1 "mutter_")
@@ -69,6 +70,13 @@ function uninstall {
xfcekeys=$(ls | grep -m1 "xfce4-keyboard") xfcekeys=$(ls | grep -m1 "xfce4-keyboard")
cp ./"$xfcekeys" ~/.config/xfce4/xfconf/xfce-perchannel-xml/xfce4-keyboard-shortcuts.xml cp ./"$xfcekeys" ~/.config/xfce4/xfconf/xfce-perchannel-xml/xfce4-keyboard-shortcuts.xml
fi fi
elif [ "$yn" == "n" ]; then
echo "Skipping..."
fi
if [[ $dename == "gnome" || $dename == "budgie" ]]; 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 fi
} }
@@ -88,7 +96,8 @@ function removeAppleKB {
function budgieUninstall { function budgieUninstall {
if [ -f /usr/bin/budgie-desktop ];then 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 }')" bdmd5="$(md5sum /usr/bin/budgie-daemon | awk '{ print $1 }')"
oldbdmd5=$(md5sum ./budgie-daemon_10.5.1.bak | awk '{ print $1 }') oldbdmd5=$(md5sum ./budgie-daemon_10.5.1.bak | awk '{ print $1 }')
if [ "$bdmd5" != "$oldbdmd5" ]; then if [ "$bdmd5" != "$oldbdmd5" ]; then
@@ -149,6 +158,134 @@ function budgieUpdate {
fi 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 # if [ $# -eq 0 ]; then
# echo "Install Kinto - xkeysnail (udev)" # echo "Install Kinto - xkeysnail (udev)"
# echo " 1) Windows & Mac (HID driver) - Most Standard keyboards (& 1st party usb/bt Apple keyboards)" # 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 sudo ./system-config/unipkg.sh python3-pip
fi fi
if ! [ -x "$(command -v python3-config)" ]; then if ! [ -x "$(command -v python3-config)" ]; then
if [ "$distro" == "ubuntu" ] || [ "$distro" == "debian" ] || [ "$distro" == '"linux mint"' ]; then if [ "$distro" == "ubuntu" ] || [ "$distro" == "debian" ] || [ "$distro" == 'linuxmint' ]; then
pydev="python3-dev" pydev="python3-dev"
elif [ "$distro" == "fedora" ]; then elif [ "$distro" == "fedora" ]; then
pydev="python3-devel" pydev="python3-devel"
fi fi
if [ "$distro" == "gnome" ] || [ "$distro" == "fedora" ] || [ "$distro" == "debian" ] || [ "$distro" == '"linux mint"' ]; then if [ "$distro" == "gnome" ] || [ "$distro" == "fedora" ] || [ "$distro" == "debian" ] || [ "$distro" == 'linuxmint' ]; then
echo "Will need to install $pydev..." echo "Will need to install $pydev..."
sudo ./system-config/unipkg.sh "$pydev" sudo ./system-config/unipkg.sh "$pydev"
fi fi
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 ! [ -x "$(command -v xhost)" ] || ! [ -x "$(command -v gcc)" ]; then
if [ "$distro" == "\"manjaro linux\"" ]; then if [ "$distro" == "\"manjaro linux\"" ]; then
sudo ./system-config/unipkg.sh "xorg-xhost gcc" sudo ./system-config/unipkg.sh "xorg-xhost gcc"
fi fi
fi fi
if [ "$distro" == '"linux mint"' ]; then if [ "$distro" == 'linuxmint' ]; then
pip3 install setuptools pip3 install setuptools
fi 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 # logoff fix - not solid for every os. Prevents missed 1 character input on login
# yes | sudo cp -rf xkeysnail-config/gnome_logoff.sh ~/.config/kinto/logoff.sh # yes | sudo cp -rf 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/kinto.py ./xkeysnail-config/kinto.py.new
yes | cp -rf ./xkeysnail-config/limitedadmins ./xkeysnail-config/limitedadmins.new yes | cp -rf ./xkeysnail-config/limitedadmins ./xkeysnail-config/limitedadmins.new
yes | cp -rf ./xkeysnail-config/gui/ ~/.config/kinto/ yes | cp -rf ./xkeysnail-config/gui/ ~/.config/kinto/
yes | cp -nrf ./xkeysnail-config/initkb ~/.config/kinto/initkb 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/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.py ~/.config/kinto/kintotray.py
yes | cp -rf ./xkeysnail-config/trayapps/appindicator/kintotray.desktop ~/.config/kinto/kintotray.desktop 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 yes | cp -rf ./xkeysnail-config/gui/kinto.desktop ./xkeysnail-config/gui/kinto.desktop.new
@@ -261,10 +400,11 @@ sed -i "s#{homedir}#`echo "$HOME"`#g" ~/.config/kinto/gui/kinto-gui.py
sed -i "s#{homedir}#`echo "$HOME"`#g" ./xkeysnail-config/gui/kinto.desktop.new sed -i "s#{homedir}#`echo "$HOME"`#g" ./xkeysnail-config/gui/kinto.desktop.new
sudo mv ./xkeysnail-config/gui/kinto.desktop.new /usr/share/applications/kinto.desktop sudo mv ./xkeysnail-config/gui/kinto.desktop.new /usr/share/applications/kinto.desktop
sed -i "s#{xhost}#`\\which xhost`#g" ./xkeysnail-config/xkeysnail.service.new sed -i "s#{xhost}#`\\which xhost`#g" ./xkeysnail-config/xkeysnail.service.new
sed -i "s#{xkeysnail}#`which xkeysnail`#g" ./xkeysnail-config/xkeysnail.service.new
sed -i "s/{username}/`whoami`/g" ./xkeysnail-config/limitedadmins.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#{systemctl}#`\\which systemctl`#g" ./xkeysnail-config/limitedadmins.new
sed -i "s#{pkill}#`\\which pkill`#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 sed -i "s#{xkeysnail}#`which xkeysnail`#g" ./xkeysnail-config/limitedadmins.new
sudo chown root:root ./xkeysnail-config/limitedadmins.new sudo chown root:root ./xkeysnail-config/limitedadmins.new
sudo mv ./xkeysnail-config/limitedadmins.new /etc/sudoers.d/limitedadmins sudo mv ./xkeysnail-config/limitedadmins.new /etc/sudoers.d/limitedadmins
sed -i "s#{systemctl}#`\\which systemctl`#g" ~/.config/kinto/xkeysnail.desktop sed -i "s#{systemctl}#`\\which systemctl`#g" ~/.config/kinto/xkeysnail.desktop
@@ -274,15 +414,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" ./xkeysnail-config/xkeysnail.service.new
# sed -i "s/{displayid}/`echo "$DISPLAY"`/g" ~/.config/kinto/prexk.sh # sed -i "s/{displayid}/`echo "$DISPLAY"`/g" ~/.config/kinto/prexk.sh
if [[ $dename == "gnome" || dename == "budgie" ]]; then if [[ $dename == "budgie" ]]; then
perl -pi -e "s/(# )(.*)(# gnome)/\$2\$3/g" ./xkeysnail-config/kinto.py.new >/dev/null 2>&1 perl -pi -e "s/\s{4}(# )(K.*)(# Default SL - Change workspace.*budgie.*)/ \$2\$3/g" ./xkeysnail-config/kinto.py.new >/dev/null 2>&1
fi 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 if [[ $dename == "kde" ]]; then
echo "Applying Cmd-Space to open App Launcher for KDE..." echo "Applying Cmd-Space to open App Launcher for KDE..."
perl -pi -e "s/(# )(.*)(#.*kde)/\$2\$3/g" ./xkeysnail-config/kinto.py.new >/dev/null 2>&1 perl -pi -e "s/(# )(.*)(#.*kde)/\$2\$3/g" ./xkeysnail-config/kinto.py.new >/dev/null 2>&1
fi fi
if [[ $dename == "xfce" ]]; then if [[ $dename == "xfce" ]]; then
perl -pi -e "\s{4}(# )(K.*)(# SL - .*xfce.*)/ \$2\$3/g" ./xkeysnail-config/kinto.py.new >/dev/null 2>&1
perl -pi -e "s/(# )(.*)(# xfce4)/\$2\$3/g" ./xkeysnail-config/kinto.py.new perl -pi -e "s/(# )(.*)(# xfce4)/\$2\$3/g" ./xkeysnail-config/kinto.py.new
perl -pi -e "s/(\w.*)(# Default not-xfce4)/# \$1\$2/g" ./xkeysnail-config/kinto.py.new perl -pi -e "s/(\w.*)(# Default not-xfce4)/# \$1\$2/g" ./xkeysnail-config/kinto.py.new
fi fi
@@ -308,8 +470,9 @@ if ! [[ $1 == "5" || $1 == "uninstall" || $1 == "Uninstall" ]]; then
sudo ln -s "$xkeypath"xkeysnail.service /etc/systemd/system/xkeysnail.service && echo "Created soft symlink..." || echo "Failed to create soft symlink..." sudo ln -s "$xkeypath"xkeysnail.service /etc/systemd/system/xkeysnail.service && echo "Created soft symlink..." || echo "Failed to create soft symlink..."
sudo ln -s "$xkeypath"xkeysnail.service /etc/systemd/system/graphical.target.wants/xkeysnail.service && echo "Created soft symlink for graphical target..." || echo "Failed to create soft symlink for graphical target..." sudo ln -s "$xkeypath"xkeysnail.service /etc/systemd/system/graphical.target.wants/xkeysnail.service && echo "Created soft symlink for graphical target..." || echo "Failed to create soft symlink for graphical target..."
xhost +SI:localuser:root xhost +SI:localuser:root
git clone --depth 10 https://github.com/rbreaves/xkeysnail.git || git pull --depth 10 git clone --depth 10 https://github.com/rbreaves/xkeysnail.git
cd xkeysnail cd xkeysnail
git pull --depth 10
git checkout 51c369084e0045a8410d227bab52411bf84fb65b git checkout 51c369084e0045a8410d227bab52411bf84fb65b
giturl=$(git ls-remote --get-url) giturl=$(git ls-remote --get-url)
if [ "$giturl" != "https://github.com/rbreaves/xkeysnail.git" ];then if [ "$giturl" != "https://github.com/rbreaves/xkeysnail.git" ];then
@@ -332,9 +495,8 @@ if ! [[ $1 == "5" || $1 == "uninstall" || $1 == "Uninstall" ]]; then
# sudo systemctl enable xkeysnail.service # sudo systemctl enable xkeysnail.service
# fi # fi
# sudo systemctl restart xkeysnail # sudo systemctl restart xkeysnail
if ! [[ $dename == "gnome" || $dename == "kde" ]];then sudo pkill -f kintotray >/dev/null 2>&1
sudo pkill -f kintotray >/dev/null 2>&1 if [[ $dename == "gnome" || $dename == "kde" ]];then
else
sed -i "s/systray = true/systray = false/g" ~/.config/kinto/initkb sed -i "s/systray = true/systray = false/g" ~/.config/kinto/initkb
fi fi
nohup python3 ~/.config/kinto/gui/kinto-gui.py >/dev/null 2>&1 & nohup python3 ~/.config/kinto/gui/kinto-gui.py >/dev/null 2>&1 &
@@ -361,33 +523,21 @@ if ! [[ $1 == "5" || $1 == "uninstall" || $1 == "Uninstall" ]]; then
echo -e "Kinto install is \e[1m\e[32mcomplete\e[0m.\n" echo -e "Kinto install is \e[1m\e[32mcomplete\e[0m.\n"
elif [[ $1 == "5" || $1 == "uninstall" || $1 == "Uninstall" ]]; then echo "If the setup wizard fails to appear then please run this command."
echo "Uninstalling Kinto - xkeysnail (udev)" echo -e "~/.config/kinto/gui/kinto-gui.py\n"
uninstall 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"
removeAppleKB
pkill -f kintotray >/dev/null 2>&1 if [ "$distro" == "manjarolinux" ]; then
sudo systemctl stop xkeysnail >/dev/null 2>&1 echo "If you are using Manjaro and see an error about 'GLIBC_2.xx not found' appears then please update your system."
sudo systemctl disable xkeysnail >/dev/null 2>&1 echo "sudo pacman -Syu"
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
fi fi
sudo systemctl daemon-reload
sudo systemctl --state=not-found --all | grep xkeysnail if [ "$dename" == "gnome" ];then
budgieUninstall echo "Gnome may not support appindicators well, so by default you may need to install packages before enabling the System Tray."
exit 0 echo "You may try one of the following extensions."
elif [[ $1 == "budgieUpdate" ]]; then echo -e " 1) \e]8;;https://extensions.gnome.org/extension/615/appindicator-support/\aAppIndicator and KStatusNotifierItem Support\e]8;;\a"
budgieUpdate echo -e " 2) \e]8;;https://extensions.gnome.org/extension/1031/topicons/\aTopIcons Plus\e]8;;\a"
else echo -e "\nNote: you may want these supporting packages\n'sudo apt install gnome-tweaks gnome-shell-extension-appindicator gir1.2-appindicator3-0.1'"
echo "Expected argument was not provided" fi
fi fi