mirror of
https://github.com/rbreaves/kinto.git
synced 2025-08-02 09:06:40 +02:00
Compare commits
143 Commits
Author | SHA1 | Date | |
---|---|---|---|
![]() |
1d1971f7cc | ||
![]() |
eb113125b5 | ||
![]() |
c298bd2b5a | ||
![]() |
e1f1907e46 | ||
![]() |
5d1b1d6598 | ||
![]() |
7375dd78bf | ||
![]() |
e4540afcb5 | ||
![]() |
2490417b85 | ||
![]() |
9a3521d05c | ||
![]() |
32fba15d75 | ||
![]() |
23e2f7018b | ||
![]() |
eeb5cc9ecb | ||
![]() |
4a65034713 | ||
![]() |
3418e6bf3f | ||
![]() |
dbd614783f | ||
![]() |
cf15be6414 | ||
![]() |
87dae12d9b | ||
![]() |
3b5c35f806 | ||
![]() |
cf72e880d5 | ||
![]() |
0bcdb8c9b2 | ||
![]() |
e71fa554d3 | ||
![]() |
2ff2b4c082 | ||
![]() |
2b83e34c3f | ||
![]() |
9af4d29bbf | ||
![]() |
c3337b5682 | ||
![]() |
045598bcd5 | ||
![]() |
32806c956d | ||
![]() |
046c800295 | ||
![]() |
0cbbc94b2d | ||
![]() |
4d9d073997 | ||
![]() |
f0412438b4 | ||
![]() |
44d8be7822 | ||
![]() |
6bc73c1c23 | ||
![]() |
2d3dc5016d | ||
![]() |
5864765ed1 | ||
![]() |
022dedb1dd | ||
![]() |
3e3c27cde3 | ||
![]() |
93b7fe8d49 | ||
![]() |
68c3d23bfe | ||
![]() |
8fe1bc7772 | ||
![]() |
d640ebfce7 | ||
![]() |
1ae096daf5 | ||
![]() |
46354a971c | ||
![]() |
af6f56d2dc | ||
![]() |
fbc630f1d5 | ||
![]() |
e1e9b08442 | ||
![]() |
b0ba86623b | ||
![]() |
a798b736b6 | ||
![]() |
3dc68314f9 | ||
![]() |
5c40258265 | ||
![]() |
1529d90918 | ||
![]() |
56493b4eec | ||
![]() |
974cd13fae | ||
![]() |
d8ad4b874f | ||
![]() |
b532a9891d | ||
![]() |
294ba3b89f | ||
![]() |
c908b00a38 | ||
![]() |
56f4f679e4 | ||
![]() |
ba46c4ff97 | ||
![]() |
980ae6a237 | ||
![]() |
1a57dd9a5e | ||
![]() |
c9810838a1 | ||
![]() |
e60f7cffea | ||
![]() |
c8b169b6a0 | ||
![]() |
81c0c52902 | ||
![]() |
4d697d9cdc | ||
![]() |
307c9bc2d1 | ||
![]() |
7436825c93 | ||
![]() |
d680a58d04 | ||
![]() |
71af27be24 | ||
![]() |
2ce4bbdb82 | ||
![]() |
085485dcfc | ||
![]() |
e7188ca693 | ||
![]() |
4cf795619d | ||
![]() |
588fe1a0dc | ||
![]() |
18ae403188 | ||
![]() |
de8e674027 | ||
![]() |
625f775464 | ||
![]() |
4980c4a35e | ||
![]() |
c09d8b07e4 | ||
![]() |
a34acfb0b5 | ||
![]() |
9f694fd198 | ||
![]() |
4349c4f9dd | ||
![]() |
68395fd91c | ||
![]() |
482de09dcc | ||
![]() |
f075f3a927 | ||
![]() |
00cbd59a4e | ||
![]() |
cbfe1a4141 | ||
![]() |
d44247affb | ||
![]() |
4f1adbc358 | ||
![]() |
a362d704c2 | ||
![]() |
6e2631aa3c | ||
![]() |
4bcdcdea6a | ||
![]() |
f9d7cba452 | ||
![]() |
fb0c476c7f | ||
![]() |
afd7ec47bf | ||
![]() |
06ba71fa67 | ||
![]() |
539d916ae3 | ||
![]() |
6d49644151 | ||
![]() |
4a3877a5fa | ||
![]() |
12efd46dd7 | ||
![]() |
e255cb6727 | ||
![]() |
8e0828aa3b | ||
![]() |
ecbf8a7aed | ||
![]() |
93743cc4c5 | ||
![]() |
34dee0e9ef | ||
![]() |
261befaf7f | ||
![]() |
5410895d0a | ||
![]() |
319b506260 | ||
![]() |
6a8de98bbd | ||
![]() |
9aaac4f356 | ||
![]() |
e9911f3de8 | ||
![]() |
d76dcc9682 | ||
![]() |
6a32f41de4 | ||
![]() |
273d0e2ee4 | ||
![]() |
ce9b137c13 | ||
![]() |
dab65cd8f0 | ||
![]() |
50d53ba77f | ||
![]() |
a285e7ebe9 | ||
![]() |
231060ee5b | ||
![]() |
f693312dce | ||
![]() |
6d2dd55a96 | ||
![]() |
46430e3ec6 | ||
![]() |
d1d020ff80 | ||
![]() |
bc04c87042 | ||
![]() |
dc31e28e16 | ||
![]() |
30a9529940 | ||
![]() |
7c9887237b | ||
![]() |
a090725633 | ||
![]() |
1e694aa65f | ||
![]() |
7f771cb5da | ||
![]() |
20e73a060b | ||
![]() |
3cbb2efa4b | ||
![]() |
39aef1be43 | ||
![]() |
e526dfdda0 | ||
![]() |
c321e51a8f | ||
![]() |
43b4ae3986 | ||
![]() |
8eb14ee96a | ||
![]() |
b76154d046 | ||
![]() |
6fa0ec8ddd | ||
![]() |
c924d91440 | ||
![]() |
e9edc4891c | ||
![]() |
015faa4491 |
159
README.md
159
README.md
@@ -5,7 +5,7 @@
|
||||
|
||||
[](https://github.com/rbreaves/kinto/releases/latest)
|
||||
|
||||
\- Type in Linux & Windows like it's a Mac. \-
|
||||
\- Mac-style shortcut keys for Linux & Windows. \-
|
||||
|
||||
Seamless copy and paste with all apps and terminals. The zero effort solution.
|
||||
|
||||
@@ -22,7 +22,7 @@ If you like or appreciate this project then please consider donating.
|
||||
|**Wishlists**|[Amazon](https://smile.amazon.com/hz/wishlist/ls/3EVXR21VFKD9Z?ref_=wl_share)|[Adafruit](https://www.adafruit.com/wishlists/515932)|[eBay](https://www.ebay.com/mye/myebay/WatchList?custom_list_id=636668138019)|
|
||||
|---|---|---|---|
|
||||
|
||||
If you would like to send me a keyboard directly then please reach out to me over [twitter](https://twitter.com/gbit86) and send me a DM. I will accept shipments (of keyboards in particular) as well.
|
||||
If you would like to send me a keyboard directly then please reach out to me over [twitter](https://twitter.com/gbit86) and send me a DM.
|
||||
|
||||
## How to install (Linux)
|
||||
|
||||
@@ -32,52 +32,82 @@ Video Tutorial: [Install Kinto.sh for Linux in less than a minute](https://www.y
|
||||
|
||||
<img src="https://user-images.githubusercontent.com/10969616/97070698-179c4500-15a0-11eb-8064-c03aa7f4d4a5.png" width="75%">
|
||||
|
||||
1. clone this repo
|
||||
### Quick Install Method
|
||||
|
||||
Paste the following into your Terminal
|
||||
```
|
||||
/bin/bash -c "$(wget -qO- https://raw.githubusercontent.com/rbreaves/kinto/HEAD/install/linux.sh || curl -fsSL https://raw.githubusercontent.com/rbreaves/kinto/HEAD/install/linux.sh)"
|
||||
```
|
||||
|
||||
Uninstall
|
||||
```
|
||||
/bin/bash <( wget -qO- https://raw.githubusercontent.com/rbreaves/kinto/HEAD/install/linux.sh || curl -fsSL https://raw.githubusercontent.com/rbreaves/kinto/HEAD/install/linux.sh ) -r
|
||||
```
|
||||
|
||||
### Old Install Method
|
||||
|
||||
```
|
||||
git clone https://github.com/rbreaves/kinto.git
|
||||
cd kinto
|
||||
```
|
||||
2. Install python3 (If needed)
|
||||
|
||||
Debian or Ubuntu 16.04 or 18.04
|
||||
```
|
||||
sudo apt update
|
||||
sudo apt install python3
|
||||
```
|
||||
|
||||
3. Run the script, press 1 or 2 keys and you are done.
|
||||
```
|
||||
./setup.py
|
||||
```
|
||||
|
||||
Troubleshoot
|
||||
**Troubleshoot**
|
||||
|
||||
If the wizard does not appear then either type in "kinto.sh" in your application overview search bar or run this following command.
|
||||
```
|
||||
~/.config/kinto/gui/kinto-gui.py
|
||||
```
|
||||
|
||||
To Uninstall Kinto
|
||||
**Issues with Numpad?**
|
||||
|
||||
Try toggling numlock on & off (clear key on official mac keyboards). If it still does not work then restart the Kinto service and try toggling the numlock/clear key again, it will likely work after that. #369
|
||||
|
||||
**Uninstall Kinto**
|
||||
|
||||
```
|
||||
./setup.py -r
|
||||
```
|
||||
|
||||
Other tips
|
||||
**Other tips**
|
||||
|
||||
If you want a global menu app similar to what mac users have then I strongly recommend Ubuntu Budgie as it has the Vala Appmenu built in and ready for activation. Short of that Vala-AppMenu can be installed in various distros, mileage will vary. If you try to activate it in the latest 20.xx releases with XFCE then you may need to run the following commands.
|
||||
|
||||
```
|
||||
sudo apt install xfce4-appmenu-plugin vala-panel-appmenu-common
|
||||
sudo apt install xfce4-appmenu-plugin vala-panel-appmenu-common appmenu-gtk2-module appmenu-gtk3-module appmenu-gtk-module-common
|
||||
xfconf-query -c xsettings -p /Gtk/Modules -n -t string -s "appmenu-gtk-module"
|
||||
```
|
||||
|
||||
**Perfect HiDPI fractional scaling on Ubuntu Budgie 20.04 under x11**
|
||||
|
||||
https://discourse.ubuntubudgie.org/t/ubuntu-budgie-20-04-fractional-hidpi-for-x11/4777
|
||||
|
||||
## How to Install (Windows)
|
||||
|
||||
Video Tutorial: [How to Install Kinto.sh on Windows 10](https://youtu.be/sRk8A8krz40)
|
||||
|
||||
[Windows 10 Requirements](#Kinto-for-Windows-10-Requirements)
|
||||
|
||||
### Quick install
|
||||
Open Powershell as Administrator and copy and paste the following. This will download & extract Kinto, install chocolatey, python3 and then install Kinto.
|
||||
|
||||
**⚠ NOTE: Please inspect https://raw.githubusercontent.com/rbreaves/kinto/master/install/windows.ps1 and https://chocolatey.org/install.ps1 before running scripts directly. More information about running powershell scripts in this context can be found [here](https://chocolatey.org/install).**
|
||||
|
||||
```
|
||||
Set-ExecutionPolicy Bypass -Scope Process -Force
|
||||
iwr https://raw.githubusercontent.com/rbreaves/kinto/master/install/windows.ps1 -UseBasicParsing | iex
|
||||
```
|
||||
|
||||
|
||||
Update system tray to show Kinto icon at all times (optional)
|
||||
```
|
||||
cmd /c "explorer shell:::{05d7b0f4-2121-4eff-bf6b-ed3f69b894d9}"
|
||||
```
|
||||
|
||||
### Old method
|
||||
|
||||
1. Open Powershell (Right click and Run as Administrator)
|
||||
|
||||
2. clone this repo
|
||||
@@ -96,25 +126,68 @@ py setup.py
|
||||
<img src="https://user-images.githubusercontent.com/10969616/85195079-30fd4f80-b295-11ea-8bcd-257990b77dcb.png" width="50%" height="50%">
|
||||
<img src="https://user-images.githubusercontent.com/10969616/85195082-322e7c80-b295-11ea-8c81-320dab424c3c.png" width="50%" height="50%">
|
||||
|
||||
To Uninstall Kinto - Select Uninstall
|
||||
**Uninstall Kinto**
|
||||
|
||||
```
|
||||
py setup.py
|
||||
```
|
||||
|
||||
Select Uninstall
|
||||
|
||||
## How to use in Remote Desktop Solutions
|
||||
|
||||
Currently this may be limited to Windows RDP Clients and Servers on both ends, but in theory any remote desktop solution that properly handles the Windows key should work is what I am finding. The latest version of Kinto may need to be suspended via the system tray on the computer running the Client software of the Remote Desktop solution you are using - or you can add it to the "virtm" group of the Kinto.ahk script for Windows 10. On the linux side a 3rd, but similar "define_conditional_modmap" terminals like group may need to be added to align with virtm.
|
||||
RDP fully works as long as the entire keyboard input is being captured. RDP had been working for awhile with Windows but as of 2/14/2021 Linux & macOS is now supported. VNC & other protocols may work, but is likely most dependent on how the keyboard input is captured on the computer running the client.
|
||||
|
||||
Note: virtm is just a shortname for virtual machine and remote desktop exceptions - so that remapping can happen within their OS & not on your host machine - if it can be avoided.
|
||||
|Program|Src/Remote Client ⇒|Dst/Remote Server|Works? |Notes|
|
||||
|---|---|---|---|---|
|
||||
|Official MS RDP (mstsc.exe)| ❖Windows ⇒| ❖Windows | ✅ Yes| |
|
||||
|Official MS RDP| ChromeOS 87+⇒| ❖Windows | ✅ Yes|May work on earlier versions as well, if they support Android apps|
|
||||
|Remmina| 🐧Linux*/ChromeOS 87+⇒| ❖Windows | ✅ Yes|*Use hover menu to enable "Grab all keyboard events"|
|
||||
|FreeRDP| 🐧Linux/ChromeOS 87+⇒| ❖Windows | ✅ Yes | |
|
||||
|FreeRDP| 🍎macOS⇒| ❖Windows | ✅ Yes| [FreeRDP for macOS](#FreeRDP-for-macOS)|
|
||||
|Remote Desktop Manager Free|🍎iOS⇒| ❖Windows | ✅ Yes| |
|
||||
|Jump Desktop (RDP)| 🍎macOS*/iOS ⇒| ❖Windows | ✅ Yes|*Preferences -> Keyboard -> Disable "Key Conversions", Enabled "Send macOS Shortcuts" under Keyboard shortcuts|
|
||||
|Official MS RDP| 🍎macOS⇒| ❖Windows | ❌ No|Initial Cmd key press not being passed|
|
||||
|Remote Desktop Manager Free| 🍎macOS⇒| ❖Windows | ❌ No|Initial Cmd key press not being passed|
|
||||
|Royal TSX Client| 🍎macOS⇒| ❖Windows | ❌ No|Initial Cmd key press not being passed|
|
||||
|Official MS RDP| 🍎🤖iOS/Android⇒| ❖Windows | ❌ No|No workaround atm|
|
||||
|
||||
Scenarios confirmed working?
|
||||
Windows RDP Client -> Windows Computer
|
||||
## FreeRDP for macOS
|
||||
|
||||
1. Install [brew.sh](https://brew.sh).
|
||||
|
||||
```/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"```
|
||||
|
||||
2. Install XQuartz (x11/xorg)
|
||||
|
||||
```brew install --cask xquartz```
|
||||
|
||||
3. log off and back on.
|
||||
4. Install FreeRDP
|
||||
|
||||
```brew install freerdp```
|
||||
|
||||
5. Disable [NLA](https://kb.parallels.com/en/123661), if it is enabled on the destination.
|
||||
6. Run command to access machine
|
||||
Note: 192.168.x.x = Your IP.
|
||||
|
||||
```xfreerdp /u:your_username /v:192.168.x.x /cert-ignore /auto-reconnect-max-retries:0 /f +clipboard -decorations```
|
||||
|
||||
7. Click on XQuartz -> Preferences and set these checkmarks so that fullscreen can work, may need to quit it and re-run the xfreerdp command from step 6.
|
||||
|
||||
<img src="https://user-images.githubusercontent.com/10969616/108144025-68bfcf80-708e-11eb-96cc-2930b7b1694a.png" width="50%">
|
||||
|
||||
More info here
|
||||
https://medium.com/idomongodb/macos-rdp-to-a-windows-machine-1e0f52f777b
|
||||
|
||||
## Jump Desktop for macOS
|
||||
|
||||
Screenshots of how to configure Jump Desktop for macOS users accessing a Windows PC with Kinto installed. I apologize that it is not a free RDP client - BUT it does work, and at $15 it is reasonable if you plan to use it frequently.
|
||||
|
||||
<img src="https://user-images.githubusercontent.com/10969616/107990246-a2fb7500-6f99-11eb-8c19-0a9b538b996f.png" width="25%">
|
||||
<img src="https://user-images.githubusercontent.com/10969616/107990265-a8f15600-6f99-11eb-9922-bbcfa0b92031.png" width="50%">
|
||||
<img src="https://user-images.githubusercontent.com/10969616/107990256-a68efc00-6f99-11eb-9f31-575ed6016944.png" width="50%">
|
||||
|
||||
Scenarios that don't appear to work?
|
||||
Microsoft RDP Client on a Mac -> Windows Computer
|
||||
FreeRDP based client on a Mac -> Windows Computer
|
||||
Android/iOS RDP Client -> Windows Computer
|
||||
|
||||
## Table of Contents
|
||||
|
||||
@@ -195,6 +268,9 @@ Other programs that will be installed when you run ./setup.py
|
||||
- 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.
|
||||
|
||||
You may also want to disable the Xbox Game Bar so that Win+G or other shortcuts will not interfer with any of your remaps. Start menu -> Game bar shortcuts -> toggle Off.
|
||||
|
||||
## Shortcut Creation
|
||||
|
||||
[Linux Shortcut Creation (Xkeysnail)](#Linux-Xkeysnail)
|
||||
@@ -379,10 +455,30 @@ I'd appreciate any help from people with non-US based keyboards, to help ensure
|
||||
|
||||
Yet another keyboard remapping tool for X environment
|
||||
|
||||
[libinput-gestures](https://github.com/bulletmark/libinput-gestures)
|
||||
Three finger gesture or other type of gestures for desktop switching or other features within a Linux distro. More info here for quickly setting it up. Make sure you logoff after setting your user to access input. https://www.reddit.com/r/GalliumOS/comments/5lgrxe/psa_multitouch_gestures_on_galliumos/
|
||||
|
||||
[Interception](https://gitlab.com/interception/linux/tools)
|
||||
|
||||
Another low level key remapper, not as easily configurable as Xkeysnail, but does not rely on X11.
|
||||
|
||||
[Wincent](https://github.com/wincent/wincent) by Greg Hurrell
|
||||
|
||||
Dot files and configurations that may help those that want mac-style shortcut keys that work under Wayland, or w/o x11.
|
||||
[Vim #102: macOS keyboard bindings on Linux](https://www.youtube.com/watch?v=TBqTHesnzkI)
|
||||
|
||||
[mac-precision-touchpad](https://github.com/imbushuo/mac-precision-touchpad) by imbushuo
|
||||
|
||||
Windows 10 touchpad to precision touchpad driver
|
||||
|
||||
[macOS-cursors-for-Windows](https://github.com/antiden/macOS-cursors-for-Windows) by antiden
|
||||
|
||||
macOS cursors for Windows
|
||||
|
||||
[QuickLook](https://github.com/QL-Win/QuickLook) for Windows by QL-Win
|
||||
|
||||
It allows users to peek into a file content in lightning speed by just pressing the Space key
|
||||
|
||||
[fusuma](https://github.com/iberianpig/fusuma) by iberianpig
|
||||
|
||||
Multitouch gestures with libinput driver on Linux
|
||||
@@ -391,10 +487,11 @@ Multitouch gestures with libinput driver on Linux
|
||||
|
||||
Linux driver for Facetime HD on macbooks
|
||||
|
||||
[Fluent Terminal - Windows only](https://github.com/felixse/FluentTerminal) by felixse
|
||||
[Windows Terminal Preview](https://aka.ms/terminal-preview) by Microsoft
|
||||
|
||||
The best Terminal app built for Windows hands down. I have tried countless, but this one actually seems to get everything right, despite the lack of a GUI to configure all aspects of the program. Custom configurations have to be done via a json file - but given the performance and feature set I feel like it is the a decent trade off.
|
||||
|
||||
A Terminal Emulator based on UWP and web technologies.
|
||||
I will update Kinto to have custom configurations for this specific Terminal in the future. Will make seamless copy & paste, which already works, work even better (Cmd-C can still trigger sigint - but there is a fix for that that involves updating the json config).
|
||||
|
||||
[PowerToys - Windows only](https://github.com/microsoft/PowerToys) by microsoft
|
||||
|
||||
@@ -444,7 +541,7 @@ Dark & Light Theme w/ OSX controls for Elementary OS
|
||||
|
||||
Auto-detect the connected display hardware and load the appropriate X11 setup using xrandr
|
||||
|
||||
[Barrier](https://github.com/debauchee/barrier) by debauchee
|
||||
[Barrier](https://github.com/debauchee/barrier) by debauchee (Note: Does not appear to work with Kinto v1.2+, may work w/ Kinto v1.1?)
|
||||
|
||||
Open-source KVM software
|
||||
|
||||
@@ -470,11 +567,9 @@ Vala rewrite of SimplePanel - GitHub mirror (Global Menu for XFCE)
|
||||
|
||||
## Contributing
|
||||
|
||||
I welcome any and all contributors who want to contribute something to this project.
|
||||
I welcome any and all contributors who want to add something to this project.
|
||||
|
||||
If you are specifically wanting to contribute additional custom keymaps to help with aligning Kinto's behavior to that of a mac keyboard then I would strongly recommend that you read Glen Whitney's comment on Superuser (the link is below). You may also look at the .xkb directory, mac_wordwise.sh and xactive.sh files to better understand how Kinto operates so that you can test your own keymaps without having to use the systemd service or running the xactive.sh script.
|
||||
|
||||
https://superuser.com/questions/385748/binding-superc-superv-to-copy-and-paste
|
||||
You can read the configuration files and the open issue tickets such as [#44 Shortcut Translation Tables](https://github.com/rbreaves/kinto/issues/44), [#115 Shortcut Creation (xkeysnail)](https://github.com/rbreaves/kinto/issues/115), and [#348 Missing Shortcuts: Post them here](https://github.com/rbreaves/kinto/issues/348) to best understand what's currently happening and how best to contribute.
|
||||
|
||||
## More information about Kinto
|
||||
|
||||
|
21
install/linux.sh
Executable file
21
install/linux.sh
Executable file
@@ -0,0 +1,21 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
# /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/rbreaves/kinto/master/install/linux.sh)"
|
||||
|
||||
wget https://github.com/rbreaves/kinto/archive/refs/heads/master.zip -O ~/Downloads/kinto.zip || curl https://github.com/rbreaves/kinto/archive/refs/heads/master.zip -J -L -o ~/Downloads/kinto.zip
|
||||
unzip ~/Downloads/kinto.zip -d ~/Downloads/
|
||||
cd ~/Downloads/kinto-master/
|
||||
|
||||
kintorelease=`wget -qO- https://api.github.com/repos/rbreaves/kinto/releases/latest | awk -F'tag_name": ' '{if ($2) print $2}' | tr -d \", || curl -s https://api.github.com/repos/rbreaves/kinto/releases/latest | awk -F'tag_name": ' '{if ($2) print $2}' | tr -d \",`
|
||||
kintohash=`unzip -z ~/Downloads/kinto.zip | tail -n1`
|
||||
kintoshort=${kintohash::7}
|
||||
|
||||
echo "$kintorelease" "build" "$kintoshort" > ./dl_version
|
||||
|
||||
if [ $# -eq 0 ];then
|
||||
echo "Installing Kinto..."
|
||||
./setup.py
|
||||
elif [ $1 == "-r" ];then
|
||||
echo "Uninstall Kinto..."
|
||||
./setup.py -r
|
||||
fi
|
7
install/windows.ps1
Normal file
7
install/windows.ps1
Normal file
@@ -0,0 +1,7 @@
|
||||
Invoke-WebRequest -Uri https://github.com/rbreaves/kinto/archive/refs/heads/master.zip -OutFile $env:USERPROFILE\Downloads\kinto.zip
|
||||
Expand-Archive -LiteralPath "$env:USERPROFILE\Downloads\kinto.zip" -DestinationPath "$env:USERPROFILE\Downloads" -Force
|
||||
Set-ExecutionPolicy Bypass -Scope Process -Force
|
||||
iwr https://chocolatey.org/install.ps1 -UseBasicParsing | iex
|
||||
choco install -y python3
|
||||
cd "$env:USERPROFILE\Downloads\kinto-master"
|
||||
py .\setup.py
|
190
linux/gui/kinto-gui.py
Normal file → Executable file
190
linux/gui/kinto-gui.py
Normal file → Executable file
@@ -1,6 +1,8 @@
|
||||
#!/usr/bin/env python3
|
||||
|
||||
import gi,os,time,fcntl,argparse,re
|
||||
import warnings
|
||||
warnings.filterwarnings("ignore")
|
||||
gi.require_version('Gtk', '3.0')
|
||||
gi.require_version('Vte', '2.91')
|
||||
from gi.repository import Gtk,Gdk,GdkPixbuf
|
||||
@@ -48,13 +50,21 @@ class MyWindow(Gtk.Window):
|
||||
page = 1
|
||||
|
||||
label = Gtk.Label()
|
||||
label.set_alignment(1, 0)
|
||||
label.set_halign(Gtk.Align.END)
|
||||
ostype = os.environ.get('XDG_CURRENT_DESKTOP')
|
||||
global openWin
|
||||
openWin = False
|
||||
|
||||
global child_pid
|
||||
kinto_status = Popen("while :; do clear; systemctl is-active xkeysnail; sleep 2; done", stdout=PIPE, shell=True)
|
||||
global sysv
|
||||
try:
|
||||
sysv = int(Popen("pidof systemd >/dev/null 2>&1 && echo '0' || echo '1'", stdout=PIPE, shell=True).communicate()[0].strip().decode('UTF-8'))
|
||||
except:
|
||||
sysv = 2
|
||||
if sysv:
|
||||
kinto_status = Popen("while :; do clear; pgrep 'xkeysnail' && echo 'active'; sleep 2; done", stdout=PIPE, shell=True)
|
||||
else:
|
||||
kinto_status = Popen("while :; do clear; systemctl is-active xkeysnail; sleep 2; done", stdout=PIPE, shell=True)
|
||||
child_pid = kinto_status.pid
|
||||
|
||||
winkb = Gtk.RadioMenuItem(label='Windows')
|
||||
@@ -114,9 +124,15 @@ class MyWindow(Gtk.Window):
|
||||
None,
|
||||
)
|
||||
if self.args.debug:
|
||||
self.command = 'sudo systemctl stop xkeysnail && sudo pkill -f bin/xkeysnail && sudo xkeysnail ~/.config/kinto/kinto.py\n'
|
||||
if sysv:
|
||||
self.command = 'sudo /etc/init.d/kinto stop && sudo pkill -f bin/xkeysnail && sudo xkeysnail ~/.config/kinto/kinto.py\n'
|
||||
else:
|
||||
self.command = 'sudo systemctl stop xkeysnail && sudo pkill -f bin/xkeysnail && sudo xkeysnail ~/.config/kinto/kinto.py\n'
|
||||
else:
|
||||
self.command = "journalctl -f --unit=xkeysnail.service -b\n"
|
||||
if sysv:
|
||||
self.command = "tail -f /tmp/kinto.log\n"
|
||||
else:
|
||||
self.command = "journalctl -f --unit=xkeysnail.service -b\n"
|
||||
|
||||
self.InputToTerm(self.command)
|
||||
|
||||
@@ -153,6 +169,14 @@ class MyWindow(Gtk.Window):
|
||||
menuitem_file = Gtk.MenuItem(label="File")
|
||||
menubar.append(menuitem_file)
|
||||
submenu_file = Gtk.Menu()
|
||||
|
||||
menuitem_restart = Gtk.MenuItem(label="Restart")
|
||||
menuitem_restart.connect('activate',self.runRestart)
|
||||
submenu_file.append(menuitem_restart)
|
||||
menuitem_stop = Gtk.MenuItem(label="Stop")
|
||||
menuitem_stop.connect('activate',self.runStop)
|
||||
submenu_file.append(menuitem_stop)
|
||||
|
||||
menuitem_file.set_submenu(submenu_file)
|
||||
submenu_file.append(self.menuitem_auto)
|
||||
kintotray = int(self.queryConfig('ps -aux | grep [k]intotray >/dev/null 2>&1 && echo "1" || echo "0"'))
|
||||
@@ -164,12 +188,6 @@ class MyWindow(Gtk.Window):
|
||||
self.menuitem_systray.signal_id = self.menuitem_systray.connect('activate',self.checkTray,True)
|
||||
menuitem_file.connect('activate',self.refreshFile)
|
||||
submenu_file.append(self.menuitem_systray)
|
||||
menuitem_restart = Gtk.MenuItem(label="Restart")
|
||||
menuitem_restart.connect('activate',self.runRestart)
|
||||
submenu_file.append(menuitem_restart)
|
||||
menuitem_stop = Gtk.MenuItem(label="Stop")
|
||||
menuitem_stop.connect('activate',self.runStop)
|
||||
submenu_file.append(menuitem_stop)
|
||||
|
||||
menuitem_quit = Gtk.MenuItem(label="Quit")
|
||||
submenu_file.append(menuitem_quit)
|
||||
@@ -179,19 +197,19 @@ class MyWindow(Gtk.Window):
|
||||
menubar.append(menuitem_edit)
|
||||
submenu_edit = Gtk.Menu()
|
||||
menuitem_edit.set_submenu(submenu_edit)
|
||||
edititem_tweaks = Gtk.MenuItem("Tweaks")
|
||||
edititem_tweaks = Gtk.MenuItem(label="Tweaks")
|
||||
edititem_tweaks.connect('activate',self.setTweaks)
|
||||
submenu_edit.append(edititem_tweaks)
|
||||
edititem_config = Gtk.MenuItem("Kinto Config (shortcuts)")
|
||||
edititem_config = Gtk.MenuItem(label="Kinto Config (shortcuts)")
|
||||
edititem_config.connect('activate',self.setConfig)
|
||||
submenu_edit.append(edititem_config)
|
||||
edititem_service = Gtk.MenuItem("Kinto Service")
|
||||
edititem_service = Gtk.MenuItem(label="Kinto Service")
|
||||
edititem_service.connect('activate',self.setService)
|
||||
submenu_edit.append(edititem_service)
|
||||
edititem_shortcuts = Gtk.MenuItem("System Shortcuts")
|
||||
edititem_shortcuts = Gtk.MenuItem(label="System Shortcuts")
|
||||
edititem_shortcuts.connect('activate',self.setSysKB)
|
||||
submenu_edit.append(edititem_shortcuts)
|
||||
edititem_language = Gtk.MenuItem("Change Language")
|
||||
edititem_language = Gtk.MenuItem(label="Change Language")
|
||||
edititem_language.connect('activate',self.setRegion)
|
||||
submenu_edit.append(edititem_language)
|
||||
|
||||
@@ -205,11 +223,11 @@ class MyWindow(Gtk.Window):
|
||||
helpitem_debug = Gtk.MenuItem(label="Debug")
|
||||
helpitem_debug.connect('activate',self.runDebug)
|
||||
submenu_help.append(helpitem_debug)
|
||||
helpitem_support = Gtk.MenuItem("Support")
|
||||
helpitem_support = Gtk.MenuItem(label="Support")
|
||||
helpitem_support.connect('activate',self.openSupport)
|
||||
submenu_help.append(helpitem_support)
|
||||
menuitem_help.set_submenu(submenu_help)
|
||||
helpitem_about = Gtk.MenuItem("About")
|
||||
helpitem_about = Gtk.MenuItem(label="About")
|
||||
helpitem_about.connect('activate',self.runAbout)
|
||||
submenu_help.append(helpitem_about)
|
||||
|
||||
@@ -341,7 +359,6 @@ class MyWindow(Gtk.Window):
|
||||
self.menuitem_systray.signal_id = self.menuitem_systray.connect('activate',self.checkTray,False)
|
||||
|
||||
restartsvc = True
|
||||
|
||||
|
||||
def initSetup(self):
|
||||
global win,openWin,restartsvc
|
||||
@@ -418,21 +435,20 @@ class MyWindow(Gtk.Window):
|
||||
pixbuf = GdkPixbuf.Pixbuf.new_from_file(os.environ['HOME']+'/.config/kinto/gui/tuxcry4.png')
|
||||
pixbuf = pixbuf.scale_simple(600, 360, GdkPixbuf.InterpType.BILINEAR)
|
||||
self.bgsuccess4 = self.bgsuccess4.new_from_pixbuf(pixbuf)
|
||||
self.bgsuccess4.set_alignment(0, 1)
|
||||
self.bgsuccess4.set_valign(Gtk.Align.END)
|
||||
|
||||
pixbuf = GdkPixbuf.Pixbuf.new_from_file(os.environ['HOME']+'/.config/kinto/gui/tuxuninstall.png')
|
||||
pixbuf = pixbuf.scale_simple(600, 360, GdkPixbuf.InterpType.BILINEAR)
|
||||
self.bguninstall = self.bguninstall.new_from_pixbuf(pixbuf)
|
||||
self.bguninstall.set_alignment(0, 1)
|
||||
self.bguninstall.set_valign(Gtk.Align.END)
|
||||
|
||||
pixbuf = GdkPixbuf.Pixbuf.new_from_file(os.environ['HOME']+'/.config/kinto/gui/tuxbg.png')
|
||||
pixbuf = pixbuf.scale_simple(600, 360, GdkPixbuf.InterpType.BILINEAR)
|
||||
self.background = self.background.new_from_pixbuf(pixbuf)
|
||||
self.background.set_alignment(0, 1)
|
||||
self.background.set_valign(Gtk.Align.END)
|
||||
self.bgcaps = self.bgcaps.new_from_pixbuf(pixbuf2)
|
||||
self.bgcaps.set_alignment(0, 1)
|
||||
self.bgspace = self.bgspace.new_from_pixbuf(pixbuf3)
|
||||
self.bgspace.set_alignment(0, 1)
|
||||
self.bgspace.set_valign(Gtk.Align.END)
|
||||
self.overlay.add(self.background)
|
||||
self.overlay.add_overlay(self.container)
|
||||
self.setupwin.add(self.container)
|
||||
@@ -454,7 +470,7 @@ class MyWindow(Gtk.Window):
|
||||
def image2pixbuf(self,im):
|
||||
data = im.tobytes()
|
||||
w, h = im.size
|
||||
print(im.size)
|
||||
# print(im.size)
|
||||
data = GLib.Bytes.new(data)
|
||||
pix = GdkPixbuf.Pixbuf.new_from_bytes(data, GdkPixbuf.Colorspace.RGB,True, 8, w, h, w * 4)
|
||||
return pix
|
||||
@@ -515,7 +531,10 @@ class MyWindow(Gtk.Window):
|
||||
return
|
||||
|
||||
def runDebug(self,button):
|
||||
command = 'send \003 sudo systemctl stop xkeysnail && sudo pkill -f bin/xkeysnail && sudo xkeysnail ~/.config/kinto/kinto.py\n'
|
||||
if sysv:
|
||||
command = 'send \003 sudo /etc/init.d/kinto stop && sudo pkill -f bin/xkeysnail && sudo xkeysnail ~/.config/kinto/kinto.py\n'
|
||||
else:
|
||||
command = 'send \003 sudo systemctl stop xkeysnail && sudo pkill -f bin/xkeysnail && sudo xkeysnail ~/.config/kinto/kinto.py\n'
|
||||
self.InputToTerm(command)
|
||||
|
||||
def openSupport(self,button):
|
||||
@@ -608,7 +627,10 @@ class MyWindow(Gtk.Window):
|
||||
self.queryConfig(killspawn)
|
||||
time.sleep(1)
|
||||
global child_pid
|
||||
self.kinto_status = Popen("while :; do clear; systemctl is-active xkeysnail; sleep 2; done", stdout=PIPE, shell=True)
|
||||
if sysv:
|
||||
self.kinto_status = Popen("while :; do clear; pgrep 'xkeysnail'; sleep 2; done", stdout=PIPE, shell=True)
|
||||
else:
|
||||
self.kinto_status = Popen("while :; do clear; systemctl is-active xkeysnail; sleep 2; done", stdout=PIPE, shell=True)
|
||||
child_pid = self.kinto_status.pid
|
||||
self.menuitem_systray.disconnect(self.menuitem_systray.signal_id)
|
||||
self.menuitem_systray.set_active(False)
|
||||
@@ -616,6 +638,7 @@ class MyWindow(Gtk.Window):
|
||||
return
|
||||
|
||||
def setKB(self,button,kbtype):
|
||||
global sysv
|
||||
try:
|
||||
if kbtype == "win":
|
||||
setkb = 's/^(\s{3})(\s{1}#)(.*# WinMac.*)|^(?!\s{4}#)(\s{3})(\s{1})(.*)( # )(Mac.*)|^(?!\s{4}#)(\s{3})(\s{1})(.*)( # )(IBM.*)|^(?!\s{4}#)(\s{3})(\s{1})(.*)( # )(Chromebook.*)|^(\s{3})(\s{1}# )(-)( Default Win)|^(\s{3})(\s{1}# )(-)(- Default Mac*)/ $3$7$6$7$8$12$11$12$13$17$16$17$18$20$21$21$22$24$26/g'
|
||||
@@ -652,7 +675,10 @@ class MyWindow(Gtk.Window):
|
||||
elif kbtype == "ibm":
|
||||
setkb ='s/^(\s{3})(\s{1}#)(.*# IBM.*)|^(?!\s{4}#)(\s{3})(\s{1})(.*)( # )(WinMac.*)|^(?!\s{4}#)(\s{3})(\s{1})(.*)( # )(Mac.*)|^(?!\s{4}#)(\s{3})(\s{1})(.*)( # )(Chromebook.*)|^(\s{3})(\s{1}# )(-)(- Default (Win|Mac.*))/ $3$7$6$7$8$12$11$12$13$17$16$17$18$20$22/g'
|
||||
|
||||
restart = ['sudo', 'systemctl','restart','xkeysnail']
|
||||
if sysv:
|
||||
restart = ['sudo', '-E','/etc/init.d/kinto','restart']
|
||||
else:
|
||||
restart = ['sudo', 'systemctl','restart','xkeysnail']
|
||||
cmds = ['perl','-pi','-e',setkb,self.kconfig]
|
||||
|
||||
cmdsTerm = Popen(cmds)
|
||||
@@ -744,11 +770,14 @@ class MyWindow(Gtk.Window):
|
||||
}
|
||||
|
||||
def on_delete_event(event, self, widget):
|
||||
global restartsvc, openWin
|
||||
global restartsvc, openWin, sysv
|
||||
|
||||
if restartsvc == True:
|
||||
try:
|
||||
restartcmd = ['sudo', 'systemctl','restart','xkeysnail']
|
||||
if sysv:
|
||||
restartcmd = ['sudo', '-E','/etc/init.d/kinto','restart']
|
||||
else:
|
||||
restartcmd = ['sudo', 'systemctl','restart','xkeysnail']
|
||||
Popen(restartcmd)
|
||||
restartsvc = False
|
||||
|
||||
@@ -868,8 +897,12 @@ class MyWindow(Gtk.Window):
|
||||
return
|
||||
|
||||
def runRestart(self,button):
|
||||
global sysv
|
||||
try:
|
||||
stop = Popen(['sudo', 'systemctl','stop','xkeysnail'])
|
||||
if sysv:
|
||||
stop = Popen(['sudo', '-E','/etc/init.d/kinto','stop'])
|
||||
else:
|
||||
stop = Popen(['sudo', 'systemctl','stop','xkeysnail'])
|
||||
stop.wait()
|
||||
time.sleep(1)
|
||||
res = Popen(['pgrep','xkeysnail'])
|
||||
@@ -878,15 +911,23 @@ class MyWindow(Gtk.Window):
|
||||
if res.returncode == 0:
|
||||
pkillxkey = Popen(['sudo', 'pkill','-f','bin/xkeysnail'])
|
||||
pkillxkey.wait()
|
||||
Popen(['sudo', 'systemctl','start','xkeysnail'])
|
||||
self.command = "send \003 journalctl -f --unit=xkeysnail.service -b\n"
|
||||
if sysv:
|
||||
Popen(['sudo','-E','/etc/init.d/kinto','start'])
|
||||
self.command = "send \003 tail -f /tmp/kinto.log\n"
|
||||
else:
|
||||
Popen(['sudo','systemctl','start','xkeysnail'])
|
||||
self.command = "send \003 journalctl -f --unit=xkeysnail.service -b\n"
|
||||
self.InputToTerm(self.command)
|
||||
except:
|
||||
Popen(['notify-send','Kinto: Errror restarting Kinto!'])
|
||||
|
||||
def runStop(self,button):
|
||||
global sysv
|
||||
try:
|
||||
stop = Popen(['sudo', 'systemctl','stop','xkeysnail'])
|
||||
if sysv:
|
||||
stop = Popen(['sudo', '-E','/etc/init.d/kinto','stop'])
|
||||
else:
|
||||
stop = Popen(['sudo', 'systemctl','stop','xkeysnail'])
|
||||
stop.wait()
|
||||
time.sleep(1)
|
||||
res = Popen(['pgrep','xkeysnail'])
|
||||
@@ -1075,7 +1116,7 @@ class MyWindow(Gtk.Window):
|
||||
except:
|
||||
pass
|
||||
|
||||
print(Vte.get_minor_version())
|
||||
# print(Vte.get_minor_version())
|
||||
|
||||
# def on_menu_auto(self, widget):
|
||||
# print("add file open dialog")
|
||||
@@ -1104,34 +1145,36 @@ class UninstallPage(Gtk.Box):
|
||||
|
||||
label_start = Gtk.Label()
|
||||
label_start.set_markup('<b>Uninstall</b>\n\n\n\nWould you like to uninstall kinto?\n\n If you need support please visit <a href="http://kinto.sh">kinto.sh</a>.')
|
||||
label_start.set_alignment(0,0)
|
||||
label_start.set_valign(Gtk.Align.START)
|
||||
label_start.set_halign(Gtk.Align.START)
|
||||
|
||||
label_start.set_line_wrap(True)
|
||||
vbox.add(label_start)
|
||||
scroller.add(vbox)
|
||||
|
||||
hbox = Gtk.HBox()
|
||||
previous = Gtk.Button("Uninstall")
|
||||
previous = Gtk.Button(label="Uninstall")
|
||||
previous.connect("clicked", self.goback)
|
||||
previous.set_margin_right(206)
|
||||
previous.set_margin_end(206)
|
||||
hbox.add(previous)
|
||||
|
||||
onward = Gtk.Button("Continue")
|
||||
onward = Gtk.Button(label="Continue")
|
||||
onward.connect("clicked", self.forward)
|
||||
hbox.add(onward)
|
||||
|
||||
hbox.set_hexpand(False)
|
||||
hbox.set_vexpand(False)
|
||||
hbox.set_margin_bottom(6)
|
||||
hbox.set_margin_right(25)
|
||||
hbox.set_margin_end(25)
|
||||
|
||||
scroller.set_hexpand(True)
|
||||
scroller.set_vexpand(True)
|
||||
vbox_container.add(scroller)
|
||||
vbox_container.set_margin_top(55)
|
||||
vbox_container.set_margin_right(25)
|
||||
self.grid.set_margin_left(157)
|
||||
vbox_container.set_margin_end(25)
|
||||
self.grid.set_margin_start(157)
|
||||
vbox_container.set_margin_bottom(18)
|
||||
vbox.set_margin_right(10)
|
||||
vbox.set_margin_end(10)
|
||||
vbox.set_margin_bottom(18)
|
||||
self.grid.add(vbox_container)
|
||||
self.grid.attach_next_to(hbox, vbox_container, Gtk.PositionType.BOTTOM, 2, 1)
|
||||
@@ -1163,18 +1206,19 @@ class FirstPage(Gtk.Box):
|
||||
|
||||
label_start = Gtk.Label()
|
||||
label_start.set_markup("Before we continue please make sure you do not have any other remappers running. Kinto works best when it is the only application remapping your keys.\n\nBy continuing you also agree that Kinto is not held liable for any harm, damage(s) or unexpected behaviors.\nThis software is free, open-source, and provided as-is.\n\n<sup><b>© 2019, 2020 by Ben Reaves ~ Kinto is licensed on GPLv2.</b></sup>")
|
||||
label_start.set_alignment(0,0)
|
||||
label_start.set_valign(Gtk.Align.START)
|
||||
label_start.set_halign(Gtk.Align.START)
|
||||
label_start.set_line_wrap(True)
|
||||
vbox.add(label_start)
|
||||
scroller.add(vbox)
|
||||
|
||||
hbox = Gtk.HBox()
|
||||
previous = Gtk.Button("")
|
||||
previous = Gtk.Button(label="")
|
||||
for child in previous.get_children():
|
||||
child.set_label("<b>Decline</b>")
|
||||
child.set_use_markup(True)
|
||||
previous.connect("clicked", self.goback)
|
||||
previous.set_margin_right(245)
|
||||
previous.set_margin_end(245)
|
||||
hbox.add(previous)
|
||||
|
||||
self.__parent_window.first_onward.set_label("")
|
||||
@@ -1188,16 +1232,16 @@ class FirstPage(Gtk.Box):
|
||||
hbox.set_hexpand(False)
|
||||
hbox.set_vexpand(False)
|
||||
hbox.set_margin_bottom(6)
|
||||
hbox.set_margin_right(25)
|
||||
hbox.set_margin_end(25)
|
||||
|
||||
scroller.set_hexpand(True)
|
||||
scroller.set_vexpand(True)
|
||||
vbox_container.add(scroller)
|
||||
vbox_container.set_margin_top(55)
|
||||
vbox_container.set_margin_right(28)
|
||||
self.grid.set_margin_left(157)
|
||||
vbox_container.set_margin_end(28)
|
||||
self.grid.set_margin_start(157)
|
||||
vbox_container.set_margin_bottom(18)
|
||||
vbox.set_margin_right(10)
|
||||
vbox.set_margin_end(10)
|
||||
vbox.set_margin_bottom(18)
|
||||
self.grid.add(vbox_container)
|
||||
self.grid.attach_next_to(hbox, vbox_container, Gtk.PositionType.BOTTOM, 2, 1)
|
||||
@@ -1236,37 +1280,38 @@ class SecondPage(Gtk.Box):
|
||||
label_start = Gtk.Label()
|
||||
|
||||
label_start.set_markup('<b>Identifying your Keyboard...</b>\n\nPress the <b>2nd</b> key <b>Left</b> of the spacebar.\n\n<sub>If stuck here then unset Overlay (Super) key on your DE.</sub>')
|
||||
label_start.set_alignment(0,0)
|
||||
label_start.set_valign(Gtk.Align.START)
|
||||
label_start.set_halign(Gtk.Align.START)
|
||||
label_start.set_line_wrap(True)
|
||||
vbox.add(label_start)
|
||||
scroller.add(vbox)
|
||||
|
||||
hbox = Gtk.HBox()
|
||||
previous = Gtk.Button("")
|
||||
previous = Gtk.Button(label="")
|
||||
for child in previous.get_children():
|
||||
child.set_label("<b>Go Back</b>")
|
||||
child.set_use_markup(True)
|
||||
previous.connect("clicked", self.goback)
|
||||
previous.set_margin_right(315)
|
||||
previous.set_margin_end(315)
|
||||
hbox.add(previous)
|
||||
|
||||
# onward = Gtk.Button("Continue")
|
||||
# onward = Gtk.Button(label="Continue")
|
||||
# onward.connect("clicked", self.forward)
|
||||
# hbox.add(onward)
|
||||
|
||||
hbox.set_hexpand(False)
|
||||
hbox.set_vexpand(False)
|
||||
hbox.set_margin_bottom(6)
|
||||
hbox.set_margin_right(25)
|
||||
hbox.set_margin_end(25)
|
||||
|
||||
scroller.set_hexpand(True)
|
||||
scroller.set_vexpand(True)
|
||||
vbox_container.add(scroller)
|
||||
vbox_container.set_margin_top(55)
|
||||
vbox_container.set_margin_right(25)
|
||||
self.grid.set_margin_left(157)
|
||||
vbox_container.set_margin_end(25)
|
||||
self.grid.set_margin_start(157)
|
||||
vbox_container.set_margin_bottom(18)
|
||||
vbox.set_margin_right(10)
|
||||
vbox.set_margin_end(10)
|
||||
vbox.set_margin_bottom(18)
|
||||
self.grid.add(vbox_container)
|
||||
self.grid.attach_next_to(hbox, vbox_container, Gtk.PositionType.BOTTOM, 2, 1)
|
||||
@@ -1320,37 +1365,38 @@ class CapsPage(Gtk.Box):
|
||||
|
||||
label_start = Gtk.Label()
|
||||
label_start.set_markup('<b>Identifying your Keyboard...</b>\n\nPress the <b>capslock</b> key twice.')
|
||||
label_start.set_alignment(0,0)
|
||||
label_start.set_valign(Gtk.Align.START)
|
||||
label_start.set_halign(Gtk.Align.START)
|
||||
label_start.set_line_wrap(True)
|
||||
vbox.add(label_start)
|
||||
scroller.add(vbox)
|
||||
|
||||
hbox = Gtk.HBox()
|
||||
previous = Gtk.Button("")
|
||||
previous = Gtk.Button(label="")
|
||||
for child in previous.get_children():
|
||||
child.set_label("<b>Go Back</b>")
|
||||
child.set_use_markup(True)
|
||||
previous.connect("clicked", self.goback)
|
||||
previous.set_margin_right(315)
|
||||
previous.set_margin_end(315)
|
||||
hbox.add(previous)
|
||||
|
||||
# onward = Gtk.Button("Continue")
|
||||
# onward = Gtk.Button(label="Continue")
|
||||
# onward.connect("clicked", self.forward)
|
||||
# hbox.add(onward)
|
||||
|
||||
hbox.set_hexpand(False)
|
||||
hbox.set_vexpand(False)
|
||||
hbox.set_margin_bottom(6)
|
||||
hbox.set_margin_right(25)
|
||||
hbox.set_margin_end(25)
|
||||
|
||||
scroller.set_hexpand(True)
|
||||
scroller.set_vexpand(True)
|
||||
vbox_container.add(scroller)
|
||||
vbox_container.set_margin_top(55)
|
||||
vbox_container.set_margin_right(25)
|
||||
self.grid.set_margin_left(157)
|
||||
vbox_container.set_margin_end(25)
|
||||
self.grid.set_margin_start(157)
|
||||
vbox_container.set_margin_bottom(18)
|
||||
vbox.set_margin_right(10)
|
||||
vbox.set_margin_end(10)
|
||||
vbox.set_margin_bottom(18)
|
||||
self.grid.add(vbox_container)
|
||||
self.grid.attach_next_to(hbox, vbox_container, Gtk.PositionType.BOTTOM, 2, 1)
|
||||
@@ -1387,9 +1433,9 @@ class SuccessPage(Gtk.Box):
|
||||
self.grid = Gtk.Grid()
|
||||
|
||||
hbox = Gtk.HBox()
|
||||
previous = Gtk.Button(" ")
|
||||
previous = Gtk.Button(label=" ")
|
||||
previous.props.relief = Gtk.ReliefStyle.NONE
|
||||
previous.set_margin_right(245)
|
||||
previous.set_margin_end(245)
|
||||
hbox.add(previous)
|
||||
|
||||
self.__parent_window.last_onward.set_label("")
|
||||
@@ -1402,7 +1448,7 @@ class SuccessPage(Gtk.Box):
|
||||
hbox.set_hexpand(False)
|
||||
hbox.set_vexpand(False)
|
||||
hbox.set_margin_bottom(6)
|
||||
hbox.set_margin_right(25)
|
||||
hbox.set_margin_end(25)
|
||||
|
||||
scroller = Gtk.ScrolledWindow()
|
||||
scroller.set_policy(Gtk.PolicyType.NEVER, Gtk.PolicyType.NEVER)
|
||||
@@ -1411,11 +1457,11 @@ class SuccessPage(Gtk.Box):
|
||||
vbox = Gtk.VBox()
|
||||
vbox_container = Gtk.VBox()
|
||||
vbox_container.set_margin_top(55)
|
||||
vbox_container.set_margin_right(28)
|
||||
vbox_container.set_margin_end(28)
|
||||
vbox_container.add(scroller)
|
||||
self.grid.set_margin_left(157)
|
||||
self.grid.set_margin_start(157)
|
||||
vbox_container.set_margin_bottom(18)
|
||||
vbox.set_margin_right(10)
|
||||
vbox.set_margin_end(10)
|
||||
vbox.set_margin_bottom(18)
|
||||
self.grid.add(vbox_container)
|
||||
self.grid.attach_next_to(hbox, vbox_container, Gtk.PositionType.BOTTOM, 2, 1)
|
||||
@@ -1435,4 +1481,4 @@ if openWin:
|
||||
win.show_all()
|
||||
openWin = False
|
||||
|
||||
Gtk.main()
|
||||
Gtk.main()
|
||||
|
0
linux/gui/kinto.desktop
Normal file → Executable file
0
linux/gui/kinto.desktop
Normal file → Executable file
57
linux/kinto-service.sh
Executable file
57
linux/kinto-service.sh
Executable file
@@ -0,0 +1,57 @@
|
||||
#!/bin/bash
|
||||
#
|
||||
# chkconfig: 35 90 12
|
||||
# description: Kinto service
|
||||
#
|
||||
|
||||
# Get function from functions library
|
||||
# . /etc/init.d/functions
|
||||
|
||||
# Start the service
|
||||
start() {
|
||||
echo -n "Starting Kinto (xkeynsail)" | logger
|
||||
xkeycount=$(pgrep 'xkeysnail' | wc -l)
|
||||
|
||||
if [[ $xkeycount -eq 0 ]]; then
|
||||
/usr/bin/xhost +SI:localuser:root && script -q -c "xkeysnail --quiet --watch `echo $HOME`/.config/kinto/kinto.py" /dev/null | tee -a /tmp/kinto.log &
|
||||
### Create the lock file ###
|
||||
touch /var/lock/subsys/kinto
|
||||
success $"Kinto (xkeynsail) started"
|
||||
else
|
||||
echo "Kinto (xkeynsail) service is already running."
|
||||
fi
|
||||
|
||||
echo
|
||||
}
|
||||
|
||||
# Restart the service
|
||||
stop() {
|
||||
echo -n "Stopping Kinto (xkeynsail)" | logger
|
||||
sudo pkill -f bin/xkeysnail >/dev/null 2>&1
|
||||
### Now, delete the lock file ###
|
||||
rm -f /var/lock/subsys/kinto
|
||||
echo
|
||||
}
|
||||
|
||||
### main logic ###
|
||||
case "$1" in
|
||||
start)
|
||||
start
|
||||
;;
|
||||
stop)
|
||||
stop
|
||||
;;
|
||||
status)
|
||||
status
|
||||
;;
|
||||
restart|reload|condrestart)
|
||||
stop
|
||||
sleep 5
|
||||
start
|
||||
;;
|
||||
*)
|
||||
echo $"Usage: $0 {start|stop|restart|reload|status}"
|
||||
exit 1
|
||||
esac
|
||||
|
||||
exit 0
|
303
linux/kinto.py
Normal file → Executable file
303
linux/kinto.py
Normal file → Executable file
@@ -7,16 +7,70 @@ from xkeysnail.transform import *
|
||||
# Use the following for testing terminal keymaps
|
||||
# terminals = [ "", ... ]
|
||||
# xbindkeys -mk
|
||||
terminals = ["kinto-gui.py","gnome-terminal","konsole","io.elementary.terminal","terminator","sakura","guake","tilda","xterm","eterm","kitty","alacritty","mate-terminal","tilix","xfce4-terminal","hyper"]
|
||||
terminals = [
|
||||
"alacritty",
|
||||
"deepin-terminal",
|
||||
"eterm",
|
||||
"gnome-terminal",
|
||||
"guake",
|
||||
"hyper",
|
||||
"io.elementary.terminal",
|
||||
"kinto-gui.py",
|
||||
"kitty",
|
||||
"konsole",
|
||||
"lxterminal",
|
||||
"mate-terminal",
|
||||
"qterminal",
|
||||
"sakura",
|
||||
"terminator",
|
||||
"tilda",
|
||||
"tilix",
|
||||
"xfce4-terminal",
|
||||
"xterm",
|
||||
]
|
||||
terminals = [term.casefold() for term in terminals]
|
||||
termStr = "|".join(str(x) for x in terminals)
|
||||
|
||||
mscodes = ["code","vscodium"]
|
||||
codeStr = "|".join(str(x) for x in mscodes)
|
||||
|
||||
# Add remote desktop clients & VM software here
|
||||
# Ideally we'd only exclude the client window,
|
||||
# but that may not be easily done.
|
||||
remotes = [
|
||||
"org.remmina.Remmina",
|
||||
"xfreerdp",
|
||||
"VirtualBox Machine",
|
||||
"VirtualBox",
|
||||
"Gnome-boxes",
|
||||
]
|
||||
remotes = [client.casefold() for client in remotes]
|
||||
|
||||
# Add remote desktop clients & VMs for no remapping
|
||||
terminals.extend(remotes)
|
||||
mscodes.extend(remotes)
|
||||
|
||||
# Use for browser specific hotkeys
|
||||
browsers = ["Chromium","Chromium-browser","Google-chrome","microsoft-edge-dev","microsoft-edge","Epiphany","Firefox","Discord"]
|
||||
browsers = [
|
||||
"Chromium",
|
||||
"Chromium-browser",
|
||||
"Discord",
|
||||
"Epiphany",
|
||||
"Firefox",
|
||||
"Google-chrome",
|
||||
"microsoft-edge",
|
||||
"microsoft-edge-dev",
|
||||
]
|
||||
browsers = [browser.casefold() for browser in browsers]
|
||||
browserStr = "|".join(str(x) for x in browsers)
|
||||
|
||||
chromes = ["Chromium","Chromium-browser","Google-chrome","microsoft-edge-dev","microsoft-edge"]
|
||||
chromes = [
|
||||
"Chromium",
|
||||
"Chromium-browser",
|
||||
"Google-chrome",
|
||||
"microsoft-edge",
|
||||
"microsoft-edge-dev",
|
||||
]
|
||||
chromes = [chrome.casefold() for chrome in chromes]
|
||||
chromeStr = "|".join(str(x) for x in chromes)
|
||||
|
||||
@@ -24,9 +78,6 @@ chromeStr = "|".join(str(x) for x in chromes)
|
||||
# edges = [edge.casefold() for edge in edges]
|
||||
# edgeStr = "|".join(str(x) for x in edges)
|
||||
|
||||
mscodes = ["code","vscodium"]
|
||||
codeStr = "|".join(str(x) for x in mscodes)
|
||||
|
||||
define_multipurpose_modmap(
|
||||
# {Key.ENTER: [Key.ENTER, Key.RIGHT_CTRL] # Enter2Cmd
|
||||
# {Key.CAPSLOCK: [Key.ESC, Key.RIGHT_CTRL] # Caps2Esc
|
||||
@@ -34,6 +85,12 @@ define_multipurpose_modmap(
|
||||
{ # Placeholder
|
||||
})
|
||||
|
||||
# Fix for avoiding modmapping when using Synergy keyboard/mouse sharing.
|
||||
# Synergy doesn't set a wm_class, so this may cause issues with other
|
||||
# applications that also don't set the wm_class.
|
||||
# Enable only if you use Synergy.
|
||||
# define_conditional_modmap(lambda wm_class: wm_class == '', {})
|
||||
|
||||
# [Global modemap] Change modifier keys as in xmodmap
|
||||
define_conditional_modmap(lambda wm_class: wm_class.casefold() not in terminals,{
|
||||
|
||||
@@ -107,7 +164,7 @@ define_conditional_modmap(re.compile(termStr, re.IGNORECASE), {
|
||||
})
|
||||
|
||||
# Keybindings for IntelliJ
|
||||
define_keymap(re.compile("jetbrains-idea", re.IGNORECASE),{
|
||||
define_keymap(re.compile("^jetbrains-(?!.*toolbox).*$", re.IGNORECASE),{
|
||||
# General
|
||||
K("C-Key_0"): K("M-Key_0"), # Open corresponding tool window
|
||||
K("C-Key_1"): K("M-Key_1"), # Open corresponding tool window
|
||||
@@ -160,8 +217,7 @@ define_keymap(re.compile("jetbrains-idea", re.IGNORECASE),{
|
||||
K("C-M-o"): K("C-M-Shift-n"), # Go to symbol
|
||||
K("Super-Right"): K("M-Right"), # Go to next editor tab
|
||||
K("Super-Left"): K("M-Left"), # Go to previous editor tab
|
||||
K("Super-l"): K("C-g"), # Go to line
|
||||
K("Super-e"): K("C-e"), # Recent files popup
|
||||
K("C-l"): K("C-g"), # Go to line
|
||||
K("M-Space"): K("C-Shift-i"), # Open quick definition lookup
|
||||
K("C-Y"): K("C-Shift-i"), # Open quick definition lookup
|
||||
K("Super-Shift-b"): K("C-Shift-b"), # Go to type declaration
|
||||
@@ -194,45 +250,198 @@ define_keymap(re.compile("jetbrains-idea", re.IGNORECASE),{
|
||||
# VCS/Local History
|
||||
K("Super-v"): K("M-Grave"), # VCS quick popup
|
||||
K("Super-c"): K("LC-c"), # Sigints - interrupt
|
||||
})
|
||||
},"Jetbrains")
|
||||
|
||||
# Keybindings for Nautilus
|
||||
define_keymap(re.compile("org.gnome.nautilus", re.IGNORECASE),{
|
||||
K("RC-Up"): K("M-Up"), # Go Up dir
|
||||
K("RC-Down"): K("M-Down"), # Go Down dir
|
||||
K("RC-Left"): K("M-Left"), # Go Back
|
||||
K("RC-Right"): K("M-Right"), # Go Forward
|
||||
})
|
||||
##############################################
|
||||
### START OF FILE MANAGER GROUP OF KEYMAPS ###
|
||||
##############################################
|
||||
|
||||
# Keybindings overrides for Caja
|
||||
# (overrides some bindings from general file manager code block below)
|
||||
define_keymap(re.compile("caja", re.IGNORECASE),{
|
||||
# K("RC-Super-o"): K("RC-Shift-Enter"), # Open in new tab
|
||||
K("RC-Super-o"): K("RC-Shift-W"), # Open in new window
|
||||
},"Overrides for Caja - Finder")
|
||||
|
||||
# Keybindings overrides for DDE (Deepin) File Manager
|
||||
# (overrides some bindings from general file manager code block below)
|
||||
define_keymap(re.compile("dde-file-manager", re.IGNORECASE),{
|
||||
K("RC-i"): K("RC-i"), # File properties dialog (Get Info)
|
||||
K("RC-comma"): None, # Disable preferences shortcut (no shortcut available)
|
||||
K("RC-Up"): K("RC-Up"), # Go Up dir
|
||||
},"Overrides for DDE File Manager - Finder")
|
||||
|
||||
# Keybindings overrides for Dolphin
|
||||
# (overrides some bindings from general file manager code block below)
|
||||
define_keymap(re.compile("dolphin", re.IGNORECASE),{
|
||||
##########################################################################################
|
||||
### "Open in new window" requires manually setting custom shortcut of Ctrl+Shift+o
|
||||
### in Dolphin's keyboard shortcuts. There is no default shortcut set for this function.
|
||||
##########################################################################################
|
||||
### "Open in new tab" requires manually setting custom shortcut of Ctrl+Shift+o in
|
||||
### Dolphin's keyboard shortcuts. There is no default shortcut set for this function.
|
||||
##########################################################################################
|
||||
K("RC-Super-o"): K("RC-Shift-o"), # Open in new window (or new tab, user's choice, see above)
|
||||
K("RC-Shift-N"): K("F10"), # Create new folder
|
||||
K("RC-comma"): K("RC-Shift-comma"), # Open preferences dialog
|
||||
},"Overrides for Dolphin - Finder")
|
||||
|
||||
# Keybindings overrides for elementary OS Files
|
||||
# (overrides some bindings from general file manager code block below)
|
||||
define_keymap(re.compile("io.elementary.files", re.IGNORECASE),{
|
||||
# K("RC-Super-o"): K("Shift-Enter"), # Open folder in new tab
|
||||
K("RC-Comma"): None, # Disable preferences shortcut since none available
|
||||
},"Overrides for Pantheon - Finder")
|
||||
|
||||
# Keybindings overrides for Nautilus
|
||||
# (overrides some bindings from general file manager code block below)
|
||||
define_keymap(re.compile("org.gnome.nautilus|nautilus", re.IGNORECASE),{
|
||||
K("RC-Super-o"): K("Shift-Enter"), # Open in new window
|
||||
# K("RC-Super-o"): K("RC-Enter"), # Open in new tab
|
||||
K("RC-comma"): K("RC-comma"), # Overrides "Open preferences dialog" shortcut below
|
||||
},"Overrides for Nautilus - Finder")
|
||||
|
||||
# Keybindings overrides for PCManFM and PCManFM-Qt
|
||||
# (overrides some bindings from general file manager code block below)
|
||||
define_keymap(re.compile("pcmanfm|pcmanfm-qt", re.IGNORECASE),{
|
||||
K("RC-Backspace"): [K("Delete"),K("Enter")], # Move to Trash (delete, bypass dialog)
|
||||
},"Overrides for PCManFM - Finder")
|
||||
|
||||
# Keybindings overrides for SpaceFM
|
||||
# (overrides some bindings from general file manager code block below)
|
||||
define_keymap(re.compile("spacefm", re.IGNORECASE),{
|
||||
K("RC-Shift-N"): [K("RC-F")], # Create new folder is Ctrl+F by default
|
||||
K("RC-Backspace"): [K("Delete"),K("Enter")], # Move to Trash (delete, bypass dialog)
|
||||
K("RC-comma"): [K("M-V"),K("p")], # Overrides "Open preferences dialog" shortcut below
|
||||
# This shortcut ^^^^^^^^^^^^^^^ is not fully working in SpaceFM. Opens "View" menu but not Preferences.
|
||||
# SpaceFM seems to be doing some nasty binding that blocks things like Alt+Tab while the menu is open.
|
||||
},"Overrides for SpaceFM - Finder")
|
||||
|
||||
# Keybindings overrides for Thunar
|
||||
# (overrides some bindings from general file manager code block below)
|
||||
define_keymap(re.compile("thunar", re.IGNORECASE),{
|
||||
K("RC-Super-o"): K("RC-Shift-P"), # Open in new tab
|
||||
K("RC-comma"): [K("M-E"),K("E")], # Overrides "Open preferences dialog" shortcut below
|
||||
},"Overrides for Thunar - Finder")
|
||||
|
||||
filemanagers = [
|
||||
"caja",
|
||||
"dde-file-manager",
|
||||
"dolphin",
|
||||
"io.elementary.files",
|
||||
"nautilus",
|
||||
"nemo",
|
||||
"org.gnome.nautilus",
|
||||
"pcmanfm",
|
||||
"pcmanfm-qt",
|
||||
"spacefm",
|
||||
"thunar",
|
||||
]
|
||||
filemanagers = [filemanager.casefold() for filemanager in filemanagers]
|
||||
filemanagerStr = "|".join(str(x) for x in filemanagers)
|
||||
|
||||
# Currently supported Linux file managers (file browsers):
|
||||
#
|
||||
# Caja File Browser (MATE file manager, fork of Nautilus)
|
||||
# DDE File Manager (Deepin Linux file manager)
|
||||
# Dolphin (KDE file manager)
|
||||
# Nautilus (GNOME file manager, may be named "Files")
|
||||
# Nemo (Cinnamon file manager, fork of Nautilus, may be named "Files")
|
||||
# Pantheon Files (elementary OS file manager, may be named "Files")
|
||||
# PCManFM (LXDE file manager)
|
||||
# PCManFM-Qt (LXQt file manager)
|
||||
# SpaceFM (Fork of PCManFM file manager)
|
||||
# Thunar File Manager (Xfce file manager)
|
||||
#
|
||||
# Keybindings for general Linux file managers group:
|
||||
define_keymap(re.compile(filemanagerStr, re.IGNORECASE),{
|
||||
###########################################################################################################
|
||||
### Show Properties (Get Info) | Open Settings/Preferences | Show/Hide hidden files ###
|
||||
###########################################################################################################
|
||||
K("RC-i"): K("M-Enter"), # File properties dialog (Get Info)
|
||||
K("RC-comma"): [K("M-E"),K("N")], # Open preferences dialog
|
||||
K("RC-Shift-dot"): K("RC-H"), # Show/hide hidden files ("dot" files)
|
||||
###########################################################################################################
|
||||
### Navigation ###
|
||||
###########################################################################################################
|
||||
K("RC-Left"): K("M-Left"), # Go Back
|
||||
K("RC-Right"): K("M-Right"), # Go Forward
|
||||
K("RC-Up"): K("M-Up"), # Go Up dir
|
||||
# K("RC-Down"): K("M-Down"), # Go Down dir (only works on folders) [not universal]
|
||||
# K("RC-Down"): K("RC-O"), # Go Down dir (open folder/file) [not universal]
|
||||
K("RC-Down"): K("Enter"), # Go Down dir (open folder/file) [universal]
|
||||
###########################################################################################################
|
||||
### Open in New Window | Move to Trash | Duplicate file/folder ###
|
||||
###########################################################################################################
|
||||
K("RC-Super-o"): K("RC-Shift-o"), # Open in new window (or tab, depends on FM setup) [not universal]
|
||||
K("RC-Backspace"): K("Delete"), # Move to Trash (delete)
|
||||
K("RC-D"): [K("RC-C"),K("RC-V")], # Mimic Finder's Duplicate command (Copy, then Paste)
|
||||
###########################################################################################################
|
||||
### To enable renaming files with the Enter key, uncomment the two keymapping lines just below this. ###
|
||||
### Use Ctrl+Shift+Enter to escape or activate text fields such as "[F]ind" and "[L]ocation" fields. ###
|
||||
###########################################################################################################
|
||||
# K("Enter"): K("F2"), # Rename with Enter key
|
||||
# K("RC-Shift-Enter"): K("Enter"), # Remap alternative "Enter" key to easily activate/exit text fields
|
||||
},"File Managers - Finder")
|
||||
|
||||
############################################
|
||||
### END OF FILE MANAGER GROUP OF KEYMAPS ###
|
||||
############################################
|
||||
|
||||
# Keybindings for Browsers
|
||||
define_keymap(re.compile(browserStr, re.IGNORECASE),{
|
||||
K("RC-Q"): K("RC-Q"), # Close all browsers Instances
|
||||
K("M-RC-I"): K("RC-Shift-I"), # Dev tools
|
||||
K("M-RC-J"): K("RC-Shift-J"), # Dev tools
|
||||
K("RC-Key_1"): K("M-Key_1"), # Jump to Tab #1-#8
|
||||
K("RC-Key_2"): K("M-Key_2"),
|
||||
K("RC-Key_3"): K("M-Key_3"),
|
||||
K("RC-Key_4"): K("M-Key_4"),
|
||||
K("RC-Key_5"): K("M-Key_5"),
|
||||
K("RC-Key_6"): K("M-Key_6"),
|
||||
K("RC-Key_7"): K("M-Key_7"),
|
||||
K("RC-Key_8"): K("M-Key_8"),
|
||||
K("RC-Key_9"): K("M-Key_9"), # Jump to last tab
|
||||
K("C-Left_Brace"): K("C-Page_Up"),
|
||||
K("C-Right_Brace"): K("C-Page_Down"),
|
||||
})
|
||||
|
||||
# Open preferences in browsers
|
||||
define_keymap(re.compile("Firefox", re.IGNORECASE),{
|
||||
K("C-comma"): [K("C-T"),K("a"),K("b"),K("o"),K("u"),K("t"),K("Shift-SEMICOLON"),K("p"),K("r"),K("e"),K("f"),K("e"),K("r"),K("e"),K("n"),K("c"),K("e"),K("s"),K("Enter")],
|
||||
K("C-comma"): [
|
||||
K("C-T"),K("a"),K("b"),K("o"),K("u"),K("t"),
|
||||
K("Shift-SEMICOLON"),K("p"),K("r"),K("e"),K("f"),
|
||||
K("e"),K("r"),K("e"),K("n"),K("c"),K("e"),K("s"),K("Enter")
|
||||
],
|
||||
})
|
||||
define_keymap(re.compile(chromeStr, re.IGNORECASE),{
|
||||
K("C-comma"): [K("M-e"), K("s"),K("Enter")],
|
||||
})
|
||||
}, "Browsers")
|
||||
# Opera C-F12
|
||||
|
||||
define_keymap(None,{
|
||||
# Note: terminals extends to remotes as well
|
||||
define_keymap(lambda wm_class: wm_class.casefold() not in terminals,{
|
||||
K("RC-Dot"): K("Esc"), # Mimic macOS Cmd+dot = Escape key (not in terminals)
|
||||
})
|
||||
|
||||
# None referenced here originally
|
||||
# - but remote clients and VM software ought to be set here
|
||||
# These are the typical remaps for ALL GUI based apps
|
||||
define_keymap(lambda wm_class: wm_class.casefold() not in remotes,{
|
||||
K("RC-Space"): K("Alt-F1"), # Default SL - Launch Application Menu (gnome/kde)
|
||||
K("RC-F3"):K("Super-d"), # Default SL - Show Desktop (gnome/kde,eos)
|
||||
K("RC-LC-f"):K("M-F10"), # Default SL - Maximize app (gnome/kde)
|
||||
K("RC-Super-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("M-Tab"): pass_through_key, # Default - Cmd Tab - App Switching Default
|
||||
K("RC-Tab"): K("M-Tab"), # Default - Cmd Tab - App Switching Default
|
||||
K("RC-Shift-Tab"): K("M-Shift-Tab"), # Default - Cmd Tab - App Switching Default
|
||||
K("RC-Grave"): K("M-Grave"), # Default not-xfce4 - Cmd ` - Same App Switching
|
||||
K("RC-Shift-Grave"): K("M-Grave"), # Default not-xfce4 - Cmd ` - Same App Switching
|
||||
K("RC-Shift-Grave"): K("M-Shift-Grave"), # Default not-xfce4 - Cmd ` - Same App Switching
|
||||
# K("RC-Grave"): K("Super-Tab"), # xfce4 Switch within app group
|
||||
# K("RC-Shift-Grave"): K("Super-Shift-Tab"), # xfce4 Switch within app group
|
||||
# K("Super-Right"):K("Super-Page_Up"), # SL - Change workspace (ubuntu/fedora)
|
||||
# K("Super-Left"):K("Super-Page_Down"), # SL - Change workspace (ubuntu/fedora)
|
||||
# K("Super-Right"):K("Super-C-Up"), # SL - Change workspace (popos)
|
||||
@@ -248,16 +457,15 @@ define_keymap(None,{
|
||||
# Basic App hotkey functions
|
||||
# K("RC-H"):K("M-F9"), # SL - Minimize app xfce4
|
||||
# K("RC-LC-f"):K("Super-PAGE_DOWN"), # SL - Minimize app manjaro
|
||||
# Cmd Tab - App Switching Default
|
||||
# K("RC-Tab"): K("RC-backslash"), # xfce4
|
||||
# K("RC-Shift-Tab"): K("RC-Shift-backslash"), # xfce4
|
||||
# K("RC-Grave"): K("RC-Shift-backslash"), # xfce4
|
||||
# In-App Tab switching
|
||||
# K("M-Tab"): K("C-Tab"), # Chromebook/IBM - In-App Tab switching
|
||||
# K("M-Shift-Tab"): K("C-Shift-Tab"), # Chromebook/IBM - In-App Tab switching
|
||||
# K("M-Grave") : K("C-Shift-Tab"), # Chromebook/IBM - In-App Tab switching
|
||||
K("Super-Tab"): K("LC-Tab"), # Default not-chromebook
|
||||
K("Super-Shift-Tab"): K("LC-Shift-Tab"), # Default not-chromebook
|
||||
|
||||
# Fn to Alt style remaps
|
||||
K("RM-Enter"): K("insert"), # Insert
|
||||
|
||||
# emacs style
|
||||
K("Super-a"): K("Home"), # Beginning of Line
|
||||
@@ -269,6 +477,8 @@ define_keymap(None,{
|
||||
K("Super-k"): [K("Shift-End"), K("Backspace")],
|
||||
K("Super-d"): K("Delete"),
|
||||
|
||||
# K("M-RC-Space"): K(""), # Open Finder - Placeholder
|
||||
|
||||
# Wordwise
|
||||
K("RC-Left"): K("Home"), # Beginning of Line
|
||||
K("RC-Shift-Left"): K("Shift-Home"), # Select all to Beginning of Line
|
||||
@@ -282,14 +492,16 @@ define_keymap(None,{
|
||||
K("RC-Shift-Up"): K("C-Shift-Home"), # Select all to Beginning of File
|
||||
K("RC-Down"): K("C-End"), # End of File
|
||||
K("RC-Shift-Down"): K("C-Shift-End"), # Select all to End of File
|
||||
# K("M-Backspace"): K("Delete"), # Chromebook/IBM - Delete
|
||||
K("Super-Backspace"): K("C-Backspace"), # Default not-chromebook - Delete Left Word of Cursor
|
||||
K("Super-Delete"): K("C-Delete"), # Default not-chromebook - Delete Right Word of Cursor
|
||||
K("Alt-Backspace"): K("C-Backspace"), # Default not-chromebook - Delete Left Word of Cursor
|
||||
K("Alt-Delete"): K("C-Delete"), # Default not-chromebook - Delete Right Word of Cursor
|
||||
# K("RM-Backspace"): K("Delete"), # Chromebook/IBM - Delete
|
||||
K("Super-Backspace"): K("C-Backspace"), # Delete Left Word of Cursor
|
||||
K("Super-Delete"): K("C-Delete"), # Delete Right Word of Cursor
|
||||
# K("LM-Backspace"): K("C-Backspace"), # Chromebook/IBM - Delete Left Word of Cursor
|
||||
K("M-Backspace"): K("C-Backspace"), # Default not-chromebook
|
||||
K("RC-Backspace"): K("C-Shift-Backspace"), # Delete Entire Line Left of Cursor
|
||||
K("Alt-Delete"): K("C-Delete"), # Delete Right Word of Cursor
|
||||
# K(""): pass_through_key, # cancel
|
||||
# K(""): K(""), #
|
||||
})
|
||||
}, "General GUI")
|
||||
|
||||
define_keymap(lambda wm_class: wm_class.casefold() not in mscodes,{
|
||||
# Wordwise remaining - for Everything but VS Code
|
||||
@@ -312,7 +524,7 @@ define_keymap(lambda wm_class: wm_class.casefold() not in mscodes,{
|
||||
# https://superuser.com/questions/770301/pentadactyl-how-to-disable-menu-bar-toggle-by-alt
|
||||
# **
|
||||
#
|
||||
})
|
||||
}, "Wordwise - not vscode")
|
||||
|
||||
# Keybindings for VS Code
|
||||
define_keymap(re.compile(codeStr, re.IGNORECASE),{
|
||||
@@ -341,8 +553,8 @@ define_keymap(re.compile(codeStr, re.IGNORECASE),{
|
||||
K("C-g"): K("f3"), # find_next
|
||||
K("Shift-f3"): pass_through_key, # cancel find_prev
|
||||
K("C-Shift-g"): K("Shift-f3"), # find_prev
|
||||
# K("Super-c"): K("LC-c"), # Default - Terminal - Sigint
|
||||
# K("Super-x"): K("LC-x"), # Default - Terminal - Exit nano
|
||||
# K("Super-c"): K("LC-c"), # Default - Terminal - Sigint
|
||||
# K("Super-x"): K("LC-x"), # Default - Terminal - Exit nano
|
||||
# K("M-c"): K("LC-c"), # Chromebook/IBM - Terminal - Sigint
|
||||
# K("M-x"): K("LC-x"), # Chromebook/IBM - Terminal - Exit nano
|
||||
# K("Super-C-g"): K("C-f2"), # Default - Sublime - find_all_under
|
||||
@@ -355,8 +567,8 @@ define_keymap(re.compile(codeStr, re.IGNORECASE),{
|
||||
|
||||
# Keybindings for Sublime Text
|
||||
define_keymap(re.compile("Sublime_text", re.IGNORECASE),{
|
||||
# K("Super-c"): K("LC-c"), # Default - Terminal - Sigint
|
||||
# K("Super-x"): K("LC-x"), # Default - Terminal - Exit nano
|
||||
# K("Super-c"): K("LC-c"), # Default - Terminal - Sigint
|
||||
# K("Super-x"): K("LC-x"), # Default - Terminal - Exit nano
|
||||
# K("M-c"): K("LC-c"), # Chromebook/IBM - Terminal - Sigint
|
||||
# K("M-x"): K("LC-x"), # Chromebook/IBM - Terminal - Exit nano
|
||||
K("Super-Space"): K("C-Space"), # Basic code completion
|
||||
@@ -440,6 +652,8 @@ define_keymap(re.compile("Io.elementary.terminal|kitty", re.IGNORECASE),{
|
||||
}, "Elementary Terminal tab switching")
|
||||
|
||||
define_keymap(re.compile(termStr, re.IGNORECASE),{
|
||||
# K("RC-Grave"): K("Super-Tab"), # xfce4 Switch within app group
|
||||
# K("RC-Shift-Grave"): K("Super-Shift-Tab"), # xfce4 Switch within app group
|
||||
# K("LC-Right"):K("C-M-Right"), # Default SL - Change workspace (budgie)
|
||||
# K("LC-Left"):K("C-M-Left"), # Default SL - Change workspace (budgie)
|
||||
# K("LC-Left"):K("C-M-End"), # SL - Change workspace xfce4
|
||||
@@ -454,10 +668,10 @@ define_keymap(re.compile(termStr, re.IGNORECASE),{
|
||||
K("LC-Tab") : K("LC-PAGE_DOWN"),
|
||||
K("LC-Shift-Tab") : K("LC-PAGE_UP"),
|
||||
K("LC-Grave") : K("LC-PAGE_UP"),
|
||||
# K("M-Tab"): pass_through_key, # Default - Cmd Tab - App Switching Default
|
||||
# K("RC-Tab"): K("M-Tab"), # Default - Cmd Tab - App Switching Default
|
||||
# K("RC-Shift-Tab"): K("M-Shift-Tab"), # Default - Cmd Tab - App Switching Default
|
||||
# Converts Cmd to use Ctrl-Shift
|
||||
K("RC-Tab"): K("RC-F13"),
|
||||
K("RC-Shift-Tab"): K("RC-Shift-F13"),
|
||||
K("RC-V"): K("C-Shift-V"),
|
||||
K("RC-MINUS"): K("C-Shift-MINUS"),
|
||||
K("RC-EQUAL"): K("C-Shift-EQUAL"),
|
||||
K("RC-BACKSPACE"): K("C-Shift-BACKSPACE"),
|
||||
@@ -484,7 +698,6 @@ define_keymap(re.compile(termStr, re.IGNORECASE),{
|
||||
K("RC-SEMICOLON"): K("C-Shift-SEMICOLON"),
|
||||
K("RC-APOSTROPHE"): K("C-Shift-APOSTROPHE"),
|
||||
K("RC-GRAVE"): K("C-Shift-GRAVE"),
|
||||
K("RC-BACKSLASH"): K("C-Shift-BACKSLASH"),
|
||||
K("RC-Z"): K("C-Shift-Z"),
|
||||
K("RC-X"): K("C-Shift-X"),
|
||||
K("RC-C"): K("C-Shift-C"),
|
||||
@@ -493,7 +706,7 @@ define_keymap(re.compile(termStr, re.IGNORECASE),{
|
||||
K("RC-N"): K("C-Shift-N"),
|
||||
K("RC-M"): K("C-Shift-M"),
|
||||
K("RC-COMMA"): K("C-Shift-COMMA"),
|
||||
K("RC-DOT"): K("C-Shift-DOT"),
|
||||
K("RC-Dot"): K("LC-c"),
|
||||
K("RC-SLASH"): K("C-Shift-SLASH"),
|
||||
K("RC-KPASTERISK"): K("C-Shift-KPASTERISK"),
|
||||
}, "terminals")
|
||||
|
@@ -1,4 +1,7 @@
|
||||
# /etc/sudoers.d/limitedadmins
|
||||
Defaults secure_path="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/X11/bin"
|
||||
Defaults!/etc/init.d/kinto setenv,env_reset,env_delete+=PATH,env_delete+=LD_PRELOAD,env_delete+=LD_LIBRARY_PATH,env_delete+=SSH_AUTH_SOCK,env_delete+=PYTHONPATH,env_delete+=PERL5LIB
|
||||
%{username} ALL=NOPASSWD: /etc/init.d/kinto *
|
||||
%{username} ALL=NOPASSWD: {systemctl} restart xkeysnail
|
||||
%{username} ALL=NOPASSWD: {systemctl} start xkeysnail
|
||||
%{username} ALL=NOPASSWD: {systemctl} stop xkeysnail
|
||||
@@ -6,5 +9,5 @@
|
||||
%{username} ALL=(root) NOPASSWD: /usr/local/bin/logoff.sh
|
||||
%{username} ALL=NOPASSWD: {pkill} -f logoff
|
||||
%{username} ALL=NOPASSWD: {pkill} -f bin/xkeysnail
|
||||
%{username} ALL=NOPASSWD: {xkeysnail} /home/{username}/.config/kinto/kinto.py
|
||||
%{username} ALL=NOPASSWD: {xkeysnail} *
|
||||
%{username} ALL=NOPASSWD: {systemctl} is-active --quiet xkeysnail
|
||||
|
46
linux/trayapps/appindicator/kintotray.py
Normal file → Executable file
46
linux/trayapps/appindicator/kintotray.py
Normal file → Executable file
@@ -29,7 +29,15 @@ APPINDICATOR_ID = 'Kinto'
|
||||
class Indicator():
|
||||
|
||||
global child_pid
|
||||
kinto_status = Popen("while :; do clear; systemctl is-active xkeysnail; sleep 2s; done", stdout=PIPE, shell=True)
|
||||
global sysv
|
||||
try:
|
||||
sysv = int(Popen("pidof systemd >/dev/null 2>&1 && echo '0' || echo '1'", stdout=PIPE, shell=True).communicate()[0].strip().decode('UTF-8'))
|
||||
except:
|
||||
sysv = 2
|
||||
if sysv:
|
||||
kinto_status = Popen("while :; do clear; pgrep 'xkeysnail' && echo 'active'; sleep 2; done", stdout=PIPE, shell=True)
|
||||
else:
|
||||
kinto_status = Popen("while :; do clear; systemctl is-active xkeysnail; sleep 2; done", stdout=PIPE, shell=True)
|
||||
child_pid = kinto_status.pid
|
||||
|
||||
homedir = os.path.expanduser("~")
|
||||
@@ -79,7 +87,15 @@ class Indicator():
|
||||
last_status = ""
|
||||
|
||||
def __init__(self):
|
||||
res = Popen(['sudo', 'systemctl','is-active','--quiet','xkeysnail'])
|
||||
global sysv
|
||||
try:
|
||||
sysv = check_output("pidof systemd >/dev/null 2>&1 && echo '0' || echo '1'").strip().decode('UTF-8')
|
||||
except:
|
||||
sysv = 1
|
||||
if sysv:
|
||||
res = Popen(['pgrep','xkeysnail'])
|
||||
else:
|
||||
res = Popen(['sudo', 'systemctl','is-active','--quiet','xkeysnail'])
|
||||
res.wait()
|
||||
|
||||
if res.returncode == 0:
|
||||
@@ -446,7 +462,10 @@ class Indicator():
|
||||
global restartsvc
|
||||
if restartsvc == True:
|
||||
try:
|
||||
restartcmd = ['sudo', 'systemctl','restart','xkeysnail']
|
||||
if sysv:
|
||||
restartcmd = ['sudo', '-E','/etc/init.d/kinto','restart']
|
||||
else:
|
||||
restartcmd = ['sudo', 'systemctl','restart','xkeysnail']
|
||||
Popen(restartcmd)
|
||||
restartsvc = False
|
||||
|
||||
@@ -555,8 +574,12 @@ class Indicator():
|
||||
return
|
||||
|
||||
def runRestart(self,button):
|
||||
global sysv
|
||||
try:
|
||||
stop = Popen(['sudo', 'systemctl','stop','xkeysnail'])
|
||||
if sysv:
|
||||
stop = Popen(['sudo', '-E','/etc/init.d/kinto','stop'])
|
||||
else:
|
||||
stop = Popen(['sudo', 'systemctl','stop','xkeysnail'])
|
||||
stop.wait()
|
||||
time.sleep(1)
|
||||
res = Popen(['pgrep','xkeysnail'])
|
||||
@@ -567,13 +590,19 @@ class Indicator():
|
||||
pkillxkey = Popen(['sudo', 'pkill','-f','bin/xkeysnail'])
|
||||
pkillxkey.wait()
|
||||
|
||||
Popen(['sudo', 'systemctl','start','xkeysnail'])
|
||||
if sysv:
|
||||
Popen(['sudo', '-E','/etc/init.d/kinto','start'])
|
||||
else:
|
||||
Popen(['sudo', 'systemctl','start','xkeysnail'])
|
||||
except:
|
||||
Popen(['notify-send','Kinto: Error restarting Kinto!'])
|
||||
|
||||
def runStop(self,button):
|
||||
try:
|
||||
stop = Popen(['sudo', 'systemctl','stop','xkeysnail'])
|
||||
if sysv:
|
||||
stop = Popen(['sudo', '-E','/etc/init.d/kinto','stop'])
|
||||
else:
|
||||
stop = Popen(['sudo', 'systemctl','stop','xkeysnail'])
|
||||
stop.wait()
|
||||
time.sleep(1)
|
||||
res = Popen(['pgrep','xkeysnail'])
|
||||
@@ -689,7 +718,10 @@ class Indicator():
|
||||
cmdsTerm = Popen(cmds)
|
||||
cmdsTerm.wait()
|
||||
|
||||
restart = ['sudo', 'systemctl','restart','xkeysnail']
|
||||
if sysv:
|
||||
restart = ['sudo', '-E','/etc/init.d/kinto','restart']
|
||||
else:
|
||||
restart = ['sudo', 'systemctl','restart','xkeysnail']
|
||||
Popen(restart)
|
||||
|
||||
except CalledProcessError:
|
||||
|
0
linux/xkeysnail.desktop
Normal file → Executable file
0
linux/xkeysnail.desktop
Normal file → Executable file
0
linux/xkeysnail.service
Normal file → Executable file
0
linux/xkeysnail.service
Normal file → Executable file
8
linux/xkeysnail_sysv.desktop
Executable file
8
linux/xkeysnail_sysv.desktop
Executable file
@@ -0,0 +1,8 @@
|
||||
[Desktop Entry]
|
||||
Name=Kinto_xkey
|
||||
GenericName=Kinto_xkey
|
||||
Comment=Make Linux Type Like it's a Mac
|
||||
Exec=/bin/bash -c "grep -q 'autostart = true' {homedir}/.config/kinto/kinto.py && sudo -E /etc/init.d/kinto restart"
|
||||
Terminal=false
|
||||
Type=Application
|
||||
X-GNOME-Autostart-enabled=true
|
8
setup.py
8
setup.py
@@ -55,14 +55,14 @@ def windows_setup():
|
||||
os.system('C:\\Strawberry\\perl\\bin\\perl.exe -pi -e "s/(; )(.*)(; Chromebook)/$2$3/g" .\\windows\\kinto-new.ahk')
|
||||
os.system('C:\\Strawberry\\perl\\bin\\perl.exe -pi -e "s/(; )(.*)(; WinModifiers/CB)/$2$3/g" .\\windows\\kinto-new.ahk')
|
||||
if default == 3 or default == 4:
|
||||
os.system('C:\\Strawberry\\perl\\bin\\perl.exe -pi -e "s/(; )(.*)(; CB/IBM)/$2$3/g" .\\windows\\kinto-new.ahk')
|
||||
os.system('C:\\Strawberry\\perl\\bin\\perl.exe -pi -e "s/(; )(.*)(; CB\/IBM)/$2$3/g" .\\windows\\kinto-new.ahk')
|
||||
os.system('C:\\Strawberry\\perl\\bin\\perl.exe -pi -e "s/(; )(.*)(; WinModifiers\/CB\/IBM)/$2$3/g" .\\windows\\kinto-new.ahk')
|
||||
if default == 4:
|
||||
kbtype = "ibm"
|
||||
os.system('C:\\Strawberry\\perl\\bin\\perl.exe -pi -e "s/(; )(.*)(; IBM)/$2$3/g" .\\windows\\kinto-new.ahk')
|
||||
os.system('C:\\Strawberry\\perl\\bin\\perl.exe -pi -e "s/(; )(.*)(; WinModifiers/CB/IBM)/$2$3/g" .\\windows\\kinto-new.ahk')
|
||||
if default > 0 and default < 5:
|
||||
stvscode = yn_choice(bcolors.CYELLOW2 + "Would you like to use Sublime Text 3 keymaps in VS Code?\n" + bcolors.ENDC)
|
||||
print("\nWill now install Ubuntu Termimnal Theme as default...")
|
||||
print("\nWill now install Ubuntu Terminal Theme as default...")
|
||||
os.system('regedit "' + path + '\\windows\\theme_ubuntu.reg"')
|
||||
os.system('robocopy "'+ path + '\\assets" "%userprofile%\\.kinto\\assets" /E')
|
||||
if (stvscode and (default > 0 or default < 3)):
|
||||
@@ -73,7 +73,7 @@ def windows_setup():
|
||||
os.system('C:\\Strawberry\\perl\\bin\\perl.exe -pi -e "s/{kbtype}/' + kbtype + '/g" "%userprofile%\\.kinto\\kinto-start.vbs"')
|
||||
os.system('copy /Y "' + path + '\\windows\\usb.vbs" "%userprofile%\\.kinto\\usb.vbs"')
|
||||
os.system('copy /Y "' + path + '\\windows\\detectUSB.ahk" "%userprofile%\\.kinto\\detectUSB.ahk"')
|
||||
os.system('mklink "%userprofile%\\Start Menu\\Programs\\Startup\\kinto-start.vbs" "%userprofile%\\.kinto\\kinto-start.vbs"')
|
||||
os.system('mklink "%userprofile%\\AppData\\Roaming\\Microsoft\\Windows\\STARTM~1\\Programs\\Startup\\kinto-start.vbs" "%userprofile%\\.kinto\\kinto-start.vbs"')
|
||||
os.system('copy /Y "'+ path + '\\windows\\NoShell.vbs" "%userprofile%\\.kinto\\NoShell.vbs"')
|
||||
os.system('copy /Y "'+ path + '\\windows\\toggle_kb.bat" "%userprofile%\\.kinto\\toggle_kb.bat"')
|
||||
os.system('copy /Y "'+ path + '\\windows\\kinto-new.ahk" "%userprofile%\\.kinto\\kinto.ahk"')
|
||||
|
@@ -9,7 +9,7 @@
|
||||
; https://www.autohotkey.com/boards/viewtopic.php?t=9501
|
||||
OnMessage(0x404, "AHK_NOTIFYICON")
|
||||
|
||||
AHK_NOTIFYICON(wParam, lParam)
|
||||
AHK_NOTIFYICON(wParam, lParam)
|
||||
{
|
||||
if (lParam = 0x202) { ; user left-clicked tray icon
|
||||
;ADD ANY SUBROUTINE OR FUNCTION HERE
|
||||
@@ -131,6 +131,7 @@ Exit() {
|
||||
SetTitleMatchMode, 2
|
||||
|
||||
GroupAdd, terminals, ahk_exe ubuntu.exe
|
||||
GroupAdd, terminals, ahk_exe ubuntu2004.exe
|
||||
GroupAdd, terminals, ahk_exe ConEmu.exe
|
||||
GroupAdd, terminals, ahk_exe ConEmu64.exe
|
||||
GroupAdd, terminals, ahk_exe powershell.exe
|
||||
@@ -144,6 +145,7 @@ GroupAdd, terminals, Fluent Terminal ahk_class ApplicationFrameWindow
|
||||
GroupAdd, terminals, ahk_class Console_2_Main
|
||||
|
||||
GroupAdd, posix, ahk_exe ubuntu.exe
|
||||
GroupAdd, posix, ahk_exe ubuntu2004.exe
|
||||
GroupAdd, posix, ahk_exe ConEmu.exe
|
||||
GroupAdd, posix, ahk_exe ConEmu64.exe
|
||||
GroupAdd, posix, ahk_exe Hyper.exe
|
||||
@@ -244,7 +246,7 @@ GroupAdd, intellij, ahk_exe idea64.exe
|
||||
; Tertiary::LWin
|
||||
|
||||
; $LAlt::LCtrl ; CB/IBM
|
||||
; $RAlt::RCtrl ; CB/IBM
|
||||
; $RAlt::RCtrl ; IBM
|
||||
; $RCtrl::RAlt ; CB/IBM
|
||||
; $CapsLock::LWin ; IBM
|
||||
; $LCtrl::LAlt ; CB/IBM
|
||||
@@ -260,8 +262,15 @@ GroupAdd, intellij, ahk_exe idea64.exe
|
||||
; $LCtrl::LWin ; MacModifiers
|
||||
|
||||
; Hack to disable start menu on winkey
|
||||
; Static
|
||||
$LCtrl up::Send {Ctrl down}{LWin up}{Ctrl up}
|
||||
; Static - Does not apply to IBM or Chromebooks
|
||||
; $LCtrl up::Send {Ctrl down}{LWin up}{Ctrl up} ; Default
|
||||
; LWin::return ; Chromebook
|
||||
; RWin::return ; Chromebook
|
||||
; RAlt::return ; Chromebook
|
||||
|
||||
; Disable Win-Up/Down - interferes with Sublime text 3 multi-cursors
|
||||
#Down::return
|
||||
#Up::return
|
||||
|
||||
; temporary hack to ensure keys don't get stuck
|
||||
; impacts Alt-Tab fix
|
||||
@@ -270,6 +279,17 @@ GroupAdd, intellij, ahk_exe idea64.exe
|
||||
; $LWin up::Send {LWin up}{LAlt up}{LCtrl up} ; MacModifiers
|
||||
; $LAlt up::Send {LWin up}{CapsLock up}{LAlt up}{LCtrl up} ; CB/IBM
|
||||
|
||||
!Enter::
|
||||
{
|
||||
if (GetKeyState("RAlt", "P")) {
|
||||
Send {Insert}
|
||||
}
|
||||
else{
|
||||
Send {Alt down}{Enter}{Alt up}
|
||||
}
|
||||
Return
|
||||
}
|
||||
|
||||
; Remap Alt+Esc to Break/Pause
|
||||
!Esc::SendInput, {Pause}
|
||||
|
||||
@@ -319,7 +339,8 @@ GroupAdd, intellij, ahk_exe idea64.exe
|
||||
^F3::Send #d
|
||||
|
||||
; Emoji Panel
|
||||
#^Space::Send {LWin down};{LWin up}
|
||||
; #^Space::Send {LWin down};{LWin up} ; Default
|
||||
; !^Space::Send {LWin down};{LWin up} ; CB/IBM
|
||||
|
||||
; Full Screenshot
|
||||
^+3::Send {PrintScreen}
|
||||
@@ -327,11 +348,11 @@ GroupAdd, intellij, ahk_exe idea64.exe
|
||||
; Region Screenshot
|
||||
^+4::Send #+{S}
|
||||
|
||||
; Open File Browser
|
||||
; !^space::Send #e ; Default
|
||||
; #^space::Send #e ; CB/IBM
|
||||
|
||||
; wordwise support
|
||||
$^Left::Send {Home}
|
||||
$^+Left::Send +{Home}
|
||||
$^Right::Send {End}
|
||||
$^+Right::Send +{End}
|
||||
^Up::Send ^{Home}
|
||||
^+Up::Send ^+{Home}
|
||||
^Down::Send ^{End}
|
||||
@@ -342,8 +363,57 @@ GroupAdd, intellij, ahk_exe idea64.exe
|
||||
!+Left::Send ^+{Left}
|
||||
!Right::Send ^{Right}
|
||||
!+Right::Send ^+{Right}
|
||||
$^Left::Send {Home}
|
||||
$^+Left::Send +{Home}
|
||||
$^Right::Send {End}
|
||||
$^+Right::Send +{End}
|
||||
|
||||
; #if GetKeyState("LWin", "P") || GetKeyState("RAlt", "P") ; Chromebook
|
||||
; Space::Send ^{Esc} ; Chromebook
|
||||
; 0::Send #0 ; Chromebook
|
||||
; 1::Send #1 ; Chromebook
|
||||
; 2::Send #2 ; Chromebook
|
||||
; 3::Send #3 ; Chromebook
|
||||
; 4::Send #4 ; Chromebook
|
||||
; 5::Send #5 ; Chromebook
|
||||
; 6::Send #6 ; Chromebook
|
||||
; 7::Send #7 ; Chromebook
|
||||
; 8::Send #8 ; Chromebook
|
||||
; 9::Send #9 ; Chromebook
|
||||
; -::Send #- ; Chromebook
|
||||
; =::Send #= ; Chromebook
|
||||
; `::Send #` ; Chromebook
|
||||
; `;::Send #; ; Chromebook
|
||||
; a::Send #a ; Chromebook
|
||||
; b::Send #b ; Chromebook
|
||||
; c::Send #c ; Chromebook
|
||||
; d::Send #d ; Chromebook
|
||||
; e::Send #e ; Chromebook
|
||||
; f::Send #f ; Chromebook
|
||||
; g::Send #g ; Chromebook
|
||||
; h::Send #h ; Chromebook
|
||||
; i::Send #i ; Chromebook
|
||||
; j::Send #j ; Chromebook
|
||||
; k::Send #k ; Chromebook
|
||||
; l::Send #l ; Chromebook
|
||||
; m::Send #m ; Chromebook
|
||||
; n::Send #n ; Chromebook
|
||||
; o::Send #o ; Chromebook
|
||||
; p::Send #p ; Chromebook
|
||||
; q::Send #q ; Chromebook
|
||||
; r::Send #r ; Chromebook
|
||||
; s::Send #s ; Chromebook
|
||||
; t::Send #t ; Chromebook
|
||||
; u::Send #u ; Chromebook
|
||||
; v::Send #v ; Chromebook
|
||||
; w::Send #w ; Chromebook
|
||||
; x::Send #x ; Chromebook
|
||||
; y::Send #y ; Chromebook
|
||||
; z::Send #z ; Chromebook
|
||||
; #If ; Chromebook
|
||||
|
||||
#IfWinNotActive ahk_group terminals
|
||||
^.::Send {Esc}
|
||||
; emacs style
|
||||
#n::Send {Down}
|
||||
#p::Send {Up}
|
||||
@@ -359,6 +429,8 @@ GroupAdd, intellij, ahk_exe idea64.exe
|
||||
$^Space::Send ^{Esc}
|
||||
|
||||
#IfWinActive ahk_group intellij
|
||||
; $#c::Send ^{c} ; Default - Sigints interrupt
|
||||
; $!c::Send ^{c} ; CB/IBM
|
||||
; General
|
||||
^0::Send !{0} ;Open corresponding tool window
|
||||
^1::Send !{1} ;Open corresponding tool window
|
||||
@@ -509,8 +581,8 @@ GroupAdd, intellij, ahk_exe idea64.exe
|
||||
^!Down::send ^{Down} ; scroll_lines down
|
||||
; #+Up::send {shift up}^!{Up} ; Default - multi-cursor up
|
||||
; #+Down::send {shift up}^!{Down} ; Default - multi-cursor down
|
||||
; #+Up::send {shift up}^!{Up} ; CB/IBM - multi-cursor up
|
||||
; #+Down::send {shift up}^!{Down} ; CB/IBM - multi-cursor down
|
||||
; !+Up::send {shift up}^!{Up} ; CB/IBM - multi-cursor up
|
||||
; !+Down::send {shift up}^!{Down} ; CB/IBM - multi-cursor down
|
||||
^PgDn::Return ; cancel next_view
|
||||
^PgUp::Return ; cancel prev_view
|
||||
^+{::send ^{PgDn} ; next_view
|
||||
@@ -519,7 +591,8 @@ GroupAdd, intellij, ahk_exe idea64.exe
|
||||
^!Left::send ^{PgUp} ; prev_view
|
||||
Insert::Return ; cancel toggle_overwrite
|
||||
^!O::send {Insert} ; toggle_overwrite
|
||||
!c::Return ; cancel toggle_case_sensitive
|
||||
; !c::Return ; Default - cancel toggle_case_sensitive
|
||||
; $!c::send ^{c} ; CB/IBM - Sigint
|
||||
^!c::send !{c} ; toggle_case_sensitive
|
||||
; ^h::Return ; cancel replace
|
||||
^!f::send ^{h} ; replace
|
||||
@@ -538,6 +611,7 @@ GroupAdd, intellij, ahk_exe idea64.exe
|
||||
^+Down::Return ; cancel swap_line_down
|
||||
#!Down::send ^+{Down} ; swap_line_down
|
||||
^Pause::Return ; cancel cancel_build
|
||||
; #c::send ^{Pause} ; cancel_build
|
||||
F9::Return ; cancel sort_lines case_s false
|
||||
F5::send {F9} ; sort_lines case_s false
|
||||
#F9::Return ; cancel sort_lines case_s true
|
||||
@@ -601,6 +675,7 @@ GroupAdd, intellij, ahk_exe idea64.exe
|
||||
; Sigints - interrupt
|
||||
; $#c::Send {Ctrl down}c{Ctrl up} ; Default
|
||||
; $!c::Send {Ctrl down}c{Ctrl up} ; CB/IBM
|
||||
$^.::Send {Ctrl down}c{Ctrl up}
|
||||
|
||||
; Windows Terminal
|
||||
; Ctrl+Shift+C should do nothing
|
||||
|
@@ -3,11 +3,18 @@
|
||||
# set about:config?filter=ui.key.menuAccessKeyFocuses
|
||||
# to false for wordwise to work in Firefox
|
||||
|
||||
function pause(){
|
||||
read -s -n 1 -p "Press any key to continue . . ."
|
||||
echo ""
|
||||
}
|
||||
|
||||
typeset -l distro
|
||||
distro=$(awk -F= '$1=="NAME" { gsub("[\",!,_, ]","",$2);print $2 ;}' /etc/os-release)
|
||||
typeset -l dename
|
||||
dename=$(./linux/system-config/dename.sh | cut -d " " -f1)
|
||||
|
||||
sysv=$(pidof systemd >/dev/null 2>&1 && echo "1" || echo "0")
|
||||
|
||||
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."
|
||||
@@ -38,7 +45,11 @@ function uninstall {
|
||||
mv ~/.config/kglobalshortcutsrc ~/.config/kglobalshortcutsrc.kinto
|
||||
elif [ "$dename" == "xfce" ];then
|
||||
echo "Resetting DE hotkeys..."
|
||||
cp /etc/xdg/xfce4/xfconf/xfce-perchannel-xml/xfce4-keyboard-shortcuts.xml ~/.config/xfce4/xfconf/xfce-perchannel-xml/xfce4-keyboard-shortcuts.xml
|
||||
if test -f "/etc/mx-version";then
|
||||
cp /etc/skel/.config/xfce4/xfconf/xfce-perchannel-xml/xfce4-keyboard-shortcuts.xml ~/.config/xfce4/xfconf/xfce-perchannel-xml/xfce4-keyboard-shortcuts.xml
|
||||
else
|
||||
cp /etc/xdg/xfce4/xfconf/xfce-perchannel-xml/xfce4-keyboard-shortcuts.xml ~/.config/xfce4/xfconf/xfce-perchannel-xml/xfce4-keyboard-shortcuts.xml
|
||||
fi
|
||||
fi
|
||||
elif [ "$yn" == "r" ]; then
|
||||
echo "Restore original user shortcuts"
|
||||
@@ -77,6 +88,12 @@ function uninstall {
|
||||
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'
|
||||
# Repetitive - xfce restore factory or backup does this
|
||||
# Also needs to check if whiskermenu is even being used
|
||||
# elif [[ $dename == "xfce" ]]; then
|
||||
# echo -e "\nWill still be restoring the overlay key"
|
||||
# echo -e "xfconf-query --channel xfce4-keyboard-shortcuts --property \"/commands/custom/Super_L\" --create --type string --set \"xfce4-popup-whiskermenu\""
|
||||
# xfconf-query --channel xfce4-keyboard-shortcuts --property "/commands/custom/Super_L" --create --type string --set "xfce4-popup-whiskermenu"
|
||||
fi
|
||||
}
|
||||
|
||||
@@ -189,6 +206,7 @@ if [[ $1 == "5" || $1 == "uninstall" || $1 == "Uninstall" ]]; then
|
||||
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/init.d/kinto >/dev/null 2>&1
|
||||
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
|
||||
@@ -207,9 +225,29 @@ 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 kinto-gui.py >/dev/null 2>&1
|
||||
sudo pkill -f kintotray.py >/dev/null 2>&1
|
||||
ps aux | awk '/[s]h -c while/ {print $2}' | xargs -r -n1 sudo kill
|
||||
sudo pkill -f "is-active xkeysnail" >/dev/null 2>&1
|
||||
|
||||
pip3 install pillow
|
||||
if [ "$distro" == "manjarolinux" ]; then
|
||||
while true; do
|
||||
read -rep $'\nHave you run \"sudo pacman -Syu\" before running Kinto setup? (y/n): ' updated
|
||||
case $updated in
|
||||
[Yy]* ) mjupdated='yes'; break;;
|
||||
[Nn]* ) mjupdated='no'; break;;
|
||||
* ) echo -e "\nPlease answer [y]es or [n]o.";;
|
||||
esac
|
||||
done
|
||||
if [[ "$mjupdated" == "no" ]]; then
|
||||
echo
|
||||
echo "================================================================================"
|
||||
echo "========== Please run a full system update before installing Kinto. =========="
|
||||
echo "================================================================================"
|
||||
echo
|
||||
exit 0
|
||||
fi
|
||||
fi
|
||||
|
||||
# Add additional shortcuts if needed, does not modify existing ones
|
||||
|
||||
@@ -219,6 +257,34 @@ if [[ $dename == 'gnome' || $dename == 'budgie' ]];then
|
||||
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
|
||||
elif [[ $dename == 'xfce' ]];then
|
||||
launcher=$(cat ~/.config/xfce4/xfconf/xfce-perchannel-xml/xfce4-keyboard-shortcuts.xml | grep 'name="Super_L"' | sed 's:.*="::')
|
||||
# echo "${#launcher}"
|
||||
if [[ "${#launcher}" -eq 0 ]]; then
|
||||
xfconf-query --channel xfce4-keyboard-shortcuts --property "/commands/custom/Super_L" --create --type string --set "xfce4-popup-whiskermenu"
|
||||
echo "Resetting Super_L, please wait..."
|
||||
sleep 6
|
||||
launcher=$(cat ~/.config/xfce4/xfconf/xfce-perchannel-xml/xfce4-keyboard-shortcuts.xml | grep 'name="Super_L"' | sed 's:.*="::')
|
||||
if [[ "${#launcher}" -gt 0 ]]; then
|
||||
echo "Success."
|
||||
else
|
||||
echo "Failed. Skipping setup of Cmd-Space."
|
||||
fi
|
||||
fi
|
||||
if [[ "${#launcher}" -gt 0 ]]; then
|
||||
nlauncher=${launcher::-3}
|
||||
# Replace Alt-F1 help file w/ whisker menu alternative hotkey
|
||||
xfconf-query --channel xfce4-keyboard-shortcuts --property "/commands/custom/<Alt>F1" --reset
|
||||
# Clear Alt-F3 App Finder for sublime text global replace
|
||||
xfconf-query --channel xfce4-keyboard-shortcuts --property "/commands/custom/<Alt>F3" --reset
|
||||
xfconf-query --channel xfce4-keyboard-shortcuts --property "/commands/custom/<Alt>F1" --create --type string --set "$nlauncher" && echo "$nlauncher has been set to Alt-F1 for Cmd-Space to work."
|
||||
# Unset Super_L to avoid issues during setup, will re-apply at the end
|
||||
xfconf-query --channel xfce4-keyboard-shortcuts --property "/commands/custom/Super_L" --reset
|
||||
# xfconf-query --channel xfce4-keyboard-shortcuts --property "/commands/custom/<Super>grave" --create --type string --set "switch_window_key"
|
||||
|
||||
fi
|
||||
# Unset Super-Tab, breaks Ctrl-Tab. switch_window_key
|
||||
sed -i '/.*name=\"<Super>Tab.*$/d' ~/.config/xfce4/xfconf/xfce-perchannel-xml/xfce4-keyboard-shortcuts.xml
|
||||
fi
|
||||
|
||||
# if ls /etc/apt/sources.list.d/system76* 1> /dev/null 2>&1; then
|
||||
@@ -326,17 +392,21 @@ expsh=" "
|
||||
# echo "Will need to install inotify-tools to restart key remapper live for config file changes..."
|
||||
# sudo ./linux/system-config/unipkg.sh inotify-tools
|
||||
# fi
|
||||
if ! [ -x "$(command -v git)" ]; then
|
||||
echo "Will need to install git..."
|
||||
sudo ./linux/system-config/unipkg.sh git
|
||||
fi
|
||||
if ! [ -x "$(command -v pip3)" ]; then
|
||||
echo "Will need to install python3-pip..."
|
||||
sudo ./linux/system-config/unipkg.sh python3-pip
|
||||
fi
|
||||
if ! [ -x "$(command -v python3-config)" ]; then
|
||||
if [ "$distro" == "ubuntu" ] || [ "$distro" == "debian" ] || [ "$distro" == 'linuxmint' ]; then
|
||||
if [ "$distro" == "ubuntu" ] || [ "${distro::6}" == "debian" ] || [ "$distro" == 'linuxmint' ]; then
|
||||
pydev="python3-dev"
|
||||
elif [ "$distro" == "fedora" ]; then
|
||||
pydev="python3-devel"
|
||||
fi
|
||||
if [ "$distro" == "gnome" ] || [ "$distro" == "fedora" ] || [ "$distro" == "debian" ] || [ "$distro" == 'linuxmint' ]; then
|
||||
if [ "$distro" == "gnome" ] || [ "$distro" == "fedora" ] || [ "${distro::6}" == "debian" ] || [ "$distro" == 'linuxmint' ]; then
|
||||
echo "Will need to install $pydev..."
|
||||
sudo ./linux/system-config/unipkg.sh "$pydev"
|
||||
fi
|
||||
@@ -349,10 +419,14 @@ if ! [ -x "$(command -v xhost)" ] || ! [ -x "$(command -v gcc)" ]; then
|
||||
sudo ./linux/system-config/unipkg.sh "xorg-xhost gcc"
|
||||
fi
|
||||
fi
|
||||
if [ "$distro" == 'linuxmint' ]; then
|
||||
if [ "$distro" == 'linuxmint' ] ; then
|
||||
pip3 install setuptools
|
||||
elif [ "${distro::6}" == "debian" ]; then
|
||||
sudo pip3 install setuptools wheel
|
||||
fi
|
||||
|
||||
pip3 install pillow
|
||||
|
||||
# echo "Transferring files..."
|
||||
mkdir -p ~/.config/kinto
|
||||
|
||||
@@ -363,7 +437,11 @@ mkdir -p ~/.config/kinto
|
||||
|
||||
# KDE startup - xhost fix
|
||||
mkdir -p ~/.config/autostart
|
||||
yes | cp -rf ./linux/xkeysnail.desktop ~/.config/kinto/xkeysnail.desktop
|
||||
if [ ! "$sysv" -eq 0 ];then
|
||||
yes | cp -rf ./linux/xkeysnail.desktop ~/.config/kinto/xkeysnail.desktop
|
||||
else
|
||||
yes | cp -rf ./linux/xkeysnail_sysv.desktop ~/.config/kinto/xkeysnail.desktop
|
||||
fi
|
||||
|
||||
# yes | cp -rf ./linux/xkeystart.sh ~/.config/kinto/xkeystart.sh
|
||||
|
||||
@@ -377,9 +455,17 @@ yes | cp -rf ./linux/xkeysnail.desktop ~/.config/kinto/xkeysnail.desktop
|
||||
# logoff fix - not solid for every os. Prevents missed 1 character input on login
|
||||
# yes | sudo cp -rf linux/gnome_logoff.sh ~/.config/kinto/logoff.sh
|
||||
|
||||
echo "$(git describe --tag --abbrev=0 | head -n 1)" "build" "$(git rev-parse --short HEAD)" > ~/.config/kinto/version
|
||||
if [ -d "./.git" ]
|
||||
then
|
||||
echo "$(git describe --tag --abbrev=0 | head -n 1)" "build" "$(git rev-parse --short HEAD)" > ~/.config/kinto/version
|
||||
elif [ -f "./dl_version" ]; then
|
||||
cp ./dl_version ~/.config/kinto/version
|
||||
else
|
||||
# Not a typo - v is built in
|
||||
echo "ersion Unknown" > ~/.config/kinto/version
|
||||
fi
|
||||
|
||||
yes | cp -rf ./linux/kinto.py ./linux/kinto.py.new
|
||||
yes | cp -rf ./linux/limitedadmins ./linux/limitedadmins.new
|
||||
yes | cp -rf ./linux/gui/ ~/.config/kinto/
|
||||
yes | cp -nrf ./linux/initkb ~/.config/kinto/initkb
|
||||
yes | cp -rf ./linux/killdups.sh ~/.config/kinto/killdups.sh
|
||||
@@ -392,29 +478,36 @@ yes | cp -rf ./linux/trayapps/appindicator/icons/kinto-invert-16.svg ~/.config/k
|
||||
yes | cp -rf ./linux/trayapps/appindicator/icons/kinto-solid-16.svg ~/.config/kinto/kinto-solid.svg
|
||||
yes | cp -rf ./linux/trayapps/appindicator/icons/kinto.svg ~/.config/kinto/kinto.svg
|
||||
# yes | cp -rf ./linux/system-config/caret_status_xkey.sh ~/.config/kinto/caret_status_xkey.sh
|
||||
yes | cp -rf ./linux/xkeysnail.service ./linux/xkeysnail.service.new
|
||||
# yes | cp -rf ./linux/xkeysnail.timer ~/.config/systemd/user/xkeysnail.timer
|
||||
sed -i "s#{experimental-caret}#$exp#g" ./linux/xkeysnail.service.new
|
||||
if [ "$expsh" != " " ];then
|
||||
sed -i "s#{kill-caret}#/usr/bin/pkill -f $expsh#g" ./linux/xkeysnail.service.new
|
||||
|
||||
yes | cp -rf ./linux/limitedadmins ./linux/limitedadmins.new
|
||||
sed -i "s/{username}/`whoami`/g" ./linux/limitedadmins.new
|
||||
sed -i "s#{systemctl}#`\\which systemctl`#g" ./linux/limitedadmins.new
|
||||
sed -i "s#{pkill}#`\\which pkill`#g" ./linux/limitedadmins.new
|
||||
if [ ! "$sysv" -eq 0 ];then
|
||||
echo "Using systemd..."
|
||||
yes | cp -rf ./linux/xkeysnail.service ./linux/xkeysnail.service.new
|
||||
# yes | cp -rf ./linux/xkeysnail.timer ~/.config/systemd/user/xkeysnail.timer
|
||||
sed -i "s#{experimental-caret}#$exp#g" ./linux/xkeysnail.service.new
|
||||
if [ "$expsh" != " " ];then
|
||||
sed -i "s#{kill-caret}#/usr/bin/pkill -f $expsh#g" ./linux/xkeysnail.service.new
|
||||
else
|
||||
sed -i "s#{kill-caret}#$expsh#g" ./linux/xkeysnail.service.new
|
||||
fi
|
||||
sed -i "s/{username}/`whoami`/g" ./linux/xkeysnail.service.new
|
||||
sed -i "s#{homedir}#`echo "$HOME"`#g" ./linux/xkeysnail.service.new
|
||||
sed -i "s#{xhost}#`\\which xhost`#g" ./linux/xkeysnail.service.new
|
||||
sed -i "s/{displayid}/`echo "$DISPLAY"`/g" ./linux/xkeysnail.service.new
|
||||
else
|
||||
sed -i "s#{kill-caret}#$expsh#g" ./linux/xkeysnail.service.new
|
||||
echo "Using sysvinit..."
|
||||
fi
|
||||
sed -i "s/{username}/`whoami`/g" ./linux/xkeysnail.service.new
|
||||
sed -i "s#{homedir}#`echo "$HOME"`#g" ./linux/xkeysnail.service.new
|
||||
sed -i "s#{homedir}#`echo "$HOME"`#g" ~/.config/kinto/kintotray.desktop
|
||||
sed -i "s#{homedir}#`echo "$HOME"`#g" ~/.config/kinto/gui/kinto-gui.py
|
||||
sed -i "s#{homedir}#`echo "$HOME"`#g" ./linux/gui/kinto.desktop.new
|
||||
sudo mv ./linux/gui/kinto.desktop.new /usr/share/applications/kinto.desktop
|
||||
sed -i "s#{xhost}#`\\which xhost`#g" ./linux/xkeysnail.service.new
|
||||
sed -i "s/{username}/`whoami`/g" ./linux/limitedadmins.new
|
||||
sed -i "s#{systemctl}#`\\which systemctl`#g" ./linux/limitedadmins.new
|
||||
sed -i "s#{pkill}#`\\which pkill`#g" ./linux/limitedadmins.new
|
||||
sed -i "s#{systemctl}#`\\which systemctl`#g" ~/.config/kinto/xkeysnail.desktop
|
||||
sed -i "s#{xhost}#`\\which xhost`#g" ~/.config/kinto/xkeysnail.desktop
|
||||
sed -i "s#{homedir}#`echo "$HOME"`#g" ~/.config/kinto/xkeysnail.desktop
|
||||
# sed -i "s#{homedir}#`echo "$HOME"`#g" ~/.config/kinto/prexk.sh
|
||||
sed -i "s/{displayid}/`echo "$DISPLAY"`/g" ./linux/xkeysnail.service.new
|
||||
# sed -i "s/{displayid}/`echo "$DISPLAY"`/g" ~/.config/kinto/prexk.sh
|
||||
|
||||
if [[ $dename == "budgie" ]]; then
|
||||
@@ -459,9 +552,16 @@ if [[ $dename == "xfce" ]] && ls /etc/apt/sources.list.d/enso* 1> /dev/null 2>&1
|
||||
fi
|
||||
|
||||
if ! [[ $1 == "5" || $1 == "uninstall" || $1 == "Uninstall" ]]; then
|
||||
|
||||
mv ./linux/kinto.py.new ~/.config/kinto/kinto.py
|
||||
# if [ "$distro" == "fedora" ];then
|
||||
sudo rm /etc/systemd/system/xkeysnail.service >/dev/null 2>&1
|
||||
if [ ! "$sysv" -eq 0 ];then
|
||||
# echo "Using systemd..."
|
||||
sudo rm /etc/systemd/system/xkeysnail.service >/dev/null 2>&1
|
||||
else
|
||||
# echo "Using sysvinit..."
|
||||
echo ""
|
||||
fi
|
||||
if [ -d /usr/lib/systemd/system ];then
|
||||
xkeypath="/usr/lib/systemd/system/"
|
||||
elif [ -d /lib/systemd/system ];then
|
||||
@@ -470,8 +570,7 @@ if ! [[ $1 == "5" || $1 == "uninstall" || $1 == "Uninstall" ]]; then
|
||||
xhost +SI:localuser:root
|
||||
git clone --depth 10 https://github.com/rbreaves/xkeysnail.git
|
||||
cd xkeysnail
|
||||
git pull --depth 10
|
||||
git checkout 51c369084e0045a8410d227bab52411bf84fb65b
|
||||
git checkout kinto
|
||||
giturl=$(git ls-remote --get-url)
|
||||
if [ "$giturl" != "https://github.com/rbreaves/xkeysnail.git" ];then
|
||||
echo -e "\nreplacing xkeysnail with fork...\n"
|
||||
@@ -479,7 +578,7 @@ if ! [[ $1 == "5" || $1 == "uninstall" || $1 == "Uninstall" ]]; then
|
||||
rm -rf ./xkeysnail
|
||||
git clone --depth 10 https://github.com/rbreaves/xkeysnail.git
|
||||
cd xkeysnail
|
||||
git checkout 51c369084e0045a8410d227bab52411bf84fb65b
|
||||
git checkout kinto
|
||||
fi
|
||||
sudo pip3 install --upgrade .
|
||||
cd ..
|
||||
@@ -490,19 +589,29 @@ if ! [[ $1 == "5" || $1 == "uninstall" || $1 == "Uninstall" ]]; then
|
||||
echo -e "Run 'sudo pip3 install --upgrade .' to debug issue"
|
||||
exit 0
|
||||
fi
|
||||
sed -i "s#{xkeysnail}#`which xkeysnail`#g" ./linux/xkeysnail.service.new
|
||||
sed -i "s#{xkeysnail}#`which xkeysnail`#g" ./linux/limitedadmins.new
|
||||
sudo mv ./linux/xkeysnail.service.new "$xkeypath"xkeysnail.service && echo "Service file added to "$xkeypath"xkeysnail.service"
|
||||
sudo chown root:root ./linux/limitedadmins.new
|
||||
# Add a check here for xkeysnail path resolving
|
||||
sudo mv ./linux/limitedadmins.new /etc/sudoers.d/limitedadmins
|
||||
sudo chown -R root:root "$xkeypath"xkeysnail.service && echo "Ownership set for root..." || echo "Failed to set ownership..."
|
||||
sudo chmod 644 "$xkeypath"xkeysnail.service && echo "Permissions set to 644..." || echo "Failed to set permissions..."
|
||||
sudo ln -s "$xkeypath"xkeysnail.service /etc/systemd/system/xkeysnail.service && echo "Created soft symlink..." || echo "Failed to create soft symlink..."
|
||||
sudo ln -s "$xkeypath"xkeysnail.service /etc/systemd/system/graphical.target.wants/xkeysnail.service && echo "Created soft symlink for graphical target..." || echo "Failed to create soft symlink for graphical target..."
|
||||
sudo systemctl daemon-reload
|
||||
sudo systemctl disable xkeysnail
|
||||
sudo systemctl stop xkeysnail
|
||||
if [ ! "$sysv" -eq 0 ];then
|
||||
# echo "Using systemd..."
|
||||
sed -i "s#{xkeysnail}#`which xkeysnail`#g" ./linux/xkeysnail.service.new
|
||||
sudo mv ./linux/xkeysnail.service.new "$xkeypath"xkeysnail.service && echo "Service file added to "$xkeypath"xkeysnail.service"
|
||||
|
||||
sudo chown -R root:root "$xkeypath"xkeysnail.service && echo "Ownership set for root..." || echo "Failed to set ownership..."
|
||||
sudo chmod 644 "$xkeypath"xkeysnail.service && echo "Permissions set to 644..." || echo "Failed to set permissions..."
|
||||
sudo ln -s "$xkeypath"xkeysnail.service /etc/systemd/system/xkeysnail.service && echo "Created soft symlink..." || echo "Failed to create soft symlink..."
|
||||
sudo ln -s "$xkeypath"xkeysnail.service /etc/systemd/system/graphical.target.wants/xkeysnail.service && echo "Created soft symlink for graphical target..." || echo "Failed to create soft symlink for graphical target..."
|
||||
sudo systemctl daemon-reload
|
||||
sudo systemctl disable xkeysnail
|
||||
sudo systemctl stop xkeysnail
|
||||
else
|
||||
# echo "Using sysvinit..."
|
||||
echo ""
|
||||
sudo cp ./linux/kinto-service.sh /etc/init.d/kinto
|
||||
sudo -E /etc/init.d/kinto stop
|
||||
mv /tmp/kinto.log /tmp/kinto.log.bak
|
||||
fi
|
||||
# sudo systemctl --state=not-found --all | grep xkeysnail
|
||||
# if [ "$distro" == "fedora" ];then
|
||||
# systemctl enable xkeysnail.service
|
||||
@@ -510,7 +619,8 @@ if ! [[ $1 == "5" || $1 == "uninstall" || $1 == "Uninstall" ]]; then
|
||||
# sudo systemctl enable xkeysnail.service
|
||||
# fi
|
||||
# sudo systemctl restart xkeysnail
|
||||
sudo pkill -f kintotray >/dev/null 2>&1
|
||||
sudo pkill -f kintotray &
|
||||
# >/dev/null 2>&1
|
||||
if [[ $dename == "gnome" || $dename == "kde" ]];then
|
||||
sed -i "s/systray = true/systray = false/g" ~/.config/kinto/initkb
|
||||
fi
|
||||
@@ -542,6 +652,24 @@ if ! [[ $1 == "5" || $1 == "uninstall" || $1 == "Uninstall" ]]; then
|
||||
echo -e "~/.config/kinto/gui/kinto-gui.py\n"
|
||||
echo -e "You can then either \e]8;;https://google.com\a\e[1m\e[36mG\033[0;91mo\033[0;93mo\e[1m\e[36mg\e[1m\e[32ml\033[0;91me\e[0m\e]8;;\a what dependencies you may be missing\nor \e]8;;https://github.com/rbreaves/kinto/issues/new\?assignees=rbreaves&labels=bug&template=bug_report.md&title=\aopen an issue ticket.\e]8;;\a\n"
|
||||
|
||||
# echo -e "\033[0;91mAfter the installer completes press Any key to re-apply your overlay (Super key) menu launcher.\e[0m\n"
|
||||
|
||||
# if [[ $dename == 'gnome' || $dename == 'budgie' ]];then
|
||||
# echo "GNOME: gsettings set org.gnome.mutter overlay-key 'super'"
|
||||
# elif [[ $dename == 'xfce' ]];then
|
||||
# echo "XFCE: xfconf-query --channel xfce4-keyboard-shortcuts --property \"/commands/custom/Super_L\" --create --type string --set \"$nlauncher\""
|
||||
# fi
|
||||
|
||||
# read -n 1 -s -r -p ""
|
||||
|
||||
# if [[ $dename == 'gnome' || $dename == 'budgie' ]];then
|
||||
# gsettings set org.gnome.mutter overlay-key 'super'
|
||||
# elif [[ $dename == 'xfce' ]];then
|
||||
# echo -e "\nSetting xfce4 launcher $nlauncher back to Super_L."
|
||||
# xfconf-query --channel xfce4-keyboard-shortcuts --property "/commands/custom/Super_L" --create --type string --set "$nlauncher" && echo "Success."
|
||||
# fi
|
||||
|
||||
|
||||
if [ "$distro" == "manjarolinux" ]; then
|
||||
echo "If you are using Manjaro and see an error about 'GLIBC_2.xx not found' appears then please update your system."
|
||||
echo "sudo pacman -Syu"
|
||||
|
Reference in New Issue
Block a user