mirror of
https://github.com/rbreaves/kinto.git
synced 2025-08-15 07:09:14 +02:00
Compare commits
68 Commits
1.2-8
...
xkb-xkeysn
Author | SHA1 | Date | |
---|---|---|---|
![]() |
a5a1d156e0 | ||
![]() |
dcbf1e8382 | ||
![]() |
9a52bd864a | ||
![]() |
9b87fda382 | ||
![]() |
e54dba20a1 | ||
![]() |
56cae8a009 | ||
![]() |
e7dd3684c2 | ||
![]() |
982cdcb92a | ||
![]() |
829289ba78 | ||
![]() |
b8793cff49 | ||
![]() |
8b522461a5 | ||
![]() |
04bc3f60e4 | ||
![]() |
8ffd3159c8 | ||
![]() |
b19b0bea4b | ||
![]() |
07bee26ddb | ||
![]() |
6dc97a5628 | ||
![]() |
59e47dbbd6 | ||
![]() |
e6d0512ff4 | ||
![]() |
6587a149ce | ||
![]() |
f80a1d616d | ||
![]() |
c391b6abf8 | ||
![]() |
f6d57eae4c | ||
![]() |
06531dd6cc | ||
![]() |
4c2a4993ef | ||
![]() |
572739360e | ||
![]() |
d87802918d | ||
![]() |
e5b2ef8155 | ||
![]() |
7149b4ab24 | ||
![]() |
db61f2d937 | ||
![]() |
19aefd68e0 | ||
![]() |
9fb72c95b1 | ||
![]() |
ec8b0fdc22 | ||
![]() |
1e98cfc29d | ||
![]() |
e92bc37308 | ||
![]() |
14021fbf67 | ||
![]() |
1562096889 | ||
![]() |
c84d13118a | ||
![]() |
bec547bbda | ||
![]() |
724006ef3a | ||
![]() |
ef60bf8a59 | ||
![]() |
44080c25da | ||
![]() |
6fa6d05123 | ||
![]() |
1d1971f7cc | ||
![]() |
eb113125b5 | ||
![]() |
c298bd2b5a | ||
![]() |
e1f1907e46 | ||
![]() |
5d1b1d6598 | ||
![]() |
7375dd78bf | ||
![]() |
e4540afcb5 | ||
![]() |
2490417b85 | ||
![]() |
9a3521d05c | ||
![]() |
32fba15d75 | ||
![]() |
23e2f7018b | ||
![]() |
eeb5cc9ecb | ||
![]() |
4a65034713 | ||
![]() |
3418e6bf3f | ||
![]() |
dbd614783f | ||
![]() |
cf15be6414 | ||
![]() |
87dae12d9b | ||
![]() |
3b5c35f806 | ||
![]() |
cf72e880d5 | ||
![]() |
0bcdb8c9b2 | ||
![]() |
e71fa554d3 | ||
![]() |
2ff2b4c082 | ||
![]() |
2b83e34c3f | ||
![]() |
9af4d29bbf | ||
![]() |
5e28015a31 | ||
![]() |
3a59edb51e |
47
README.md
47
README.md
@@ -13,6 +13,10 @@ v1.2 Release - Kinto now includes a system tray and simple wizard to setup the i
|
|||||||
|
|
||||||
Kinto is powered by [xkeysnail](https://github.com/mooz/xkeysnail) for Linux & by [Autohotkey](https://github.com/Lexikos/AutoHotkey_L) for Windows 10.
|
Kinto is powered by [xkeysnail](https://github.com/mooz/xkeysnail) for Linux & by [Autohotkey](https://github.com/Lexikos/AutoHotkey_L) for Windows 10.
|
||||||
|
|
||||||
|
Note: If you plan to remote into Linux via VNC, xRDP, Synergy or other remote desktop solutions then remove the current release & try an earlier [v1.0.7-3](https://github.com/rbreaves/kinto/releases/tag/1.0.7-3) release. It uses xkb so it'll work with virtual xinput devices. Some v1.1-x releases may offer both, but all v1.2.x releases ended support for xkb. I do plan to bring offical support back for virtual input devices.
|
||||||
|
|
||||||
|
Additionally VMware, Virtualbox, KVM and other virtualization technologies work best with the current release - so *this note only applies to remote desktop into Linux* - not virtualization.
|
||||||
|
|
||||||
### [Table of Contents ](#Table-of-Contents)
|
### [Table of Contents ](#Table-of-Contents)
|
||||||
|
|
||||||
## Donations
|
## Donations
|
||||||
@@ -36,12 +40,12 @@ Video Tutorial: [Install Kinto.sh for Linux in less than a minute](https://www.y
|
|||||||
|
|
||||||
Paste the following into your Terminal
|
Paste the following into your Terminal
|
||||||
```
|
```
|
||||||
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/rbreaves/kinto/HEAD/install/linux.sh)"
|
/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
|
Uninstall
|
||||||
```
|
```
|
||||||
/bin/bash <( curl https://raw.githubusercontent.com/rbreaves/kinto/HEAD/install/linux.sh ) -r
|
/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
|
### Old Install Method
|
||||||
@@ -76,7 +80,7 @@ Try toggling numlock on & off (clear key on official mac keyboards). If it still
|
|||||||
If you want a global menu app similar to what mac users have then I strongly recommend Ubuntu Budgie as it has the Vala Appmenu built in and ready for activation. Short of that Vala-AppMenu can be installed in various distros, mileage will vary. If you try to activate it in the latest 20.xx releases with XFCE then you may need to run the following commands.
|
If you want a global menu app similar to what mac users have then I strongly recommend Ubuntu Budgie as it has the Vala Appmenu built in and ready for activation. Short of that Vala-AppMenu can be installed in various distros, mileage will vary. If you try to activate it in the latest 20.xx releases with XFCE then you may need to run the following commands.
|
||||||
|
|
||||||
```
|
```
|
||||||
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"
|
xfconf-query -c xsettings -p /Gtk/Modules -n -t string -s "appmenu-gtk-module"
|
||||||
```
|
```
|
||||||
|
|
||||||
@@ -140,6 +144,7 @@ RDP fully works as long as the entire keyboard input is being captured. RDP had
|
|||||||
|
|
||||||
|Program|Src/Remote Client ⇒|Dst/Remote Server|Works? |Notes|
|
|Program|Src/Remote Client ⇒|Dst/Remote Server|Works? |Notes|
|
||||||
|---|---|---|---|---|
|
|---|---|---|---|---|
|
||||||
|
|Official MS RDP (mstsc.exe)| ❖Windows ⇒| 🐧Linux | ✅ Yes| Note: [v1.0.7-3 Only](https://github.com/rbreaves/kinto/releases/tag/1.0.7-3). Should work for xRDP/VNC and other remote server protocols. |
|
||||||
|Official MS RDP (mstsc.exe)| ❖Windows ⇒| ❖Windows | ✅ Yes| |
|
|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|
|
|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"|
|
|Remmina| 🐧Linux*/ChromeOS 87+⇒| ❖Windows | ✅ Yes|*Use hover menu to enable "Grab all keyboard events"|
|
||||||
@@ -252,7 +257,7 @@ Additionally, if you are using a cross-platform app and if it happens to have a
|
|||||||
## What does Kinto require?
|
## What does Kinto require?
|
||||||
|
|
||||||
- Python
|
- Python
|
||||||
- systemd
|
- systemd or sysvinit
|
||||||
- x11
|
- x11
|
||||||
- xkeysnail
|
- xkeysnail
|
||||||
|
|
||||||
@@ -310,10 +315,16 @@ In the above example I am also showing that you can define a single shortcut to
|
|||||||
|
|
||||||
You can also make changes to the file in your /tmp/kinto/xkeysnail/kinto.py location and see them take affect in real time, but for your changes to be permanent you will need to make your changes in the ~/.config/kinto/kinto.py location & restart the xkeysnail service.
|
You can also make changes to the file in your /tmp/kinto/xkeysnail/kinto.py location and see them take affect in real time, but for your changes to be permanent you will need to make your changes in the ~/.config/kinto/kinto.py location & restart the xkeysnail service.
|
||||||
|
|
||||||
|
systemd
|
||||||
```
|
```
|
||||||
sudo systemctl restart xkeysnail
|
sudo systemctl restart xkeysnail
|
||||||
```
|
```
|
||||||
|
|
||||||
|
sysvinit
|
||||||
|
```
|
||||||
|
sudo -E /etc/init.d/kinto restart
|
||||||
|
```
|
||||||
|
|
||||||
More information can be seen on the readme page of [xkeysnail](https://github.com/mooz/xkeysnail).
|
More information can be seen on the readme page of [xkeysnail](https://github.com/mooz/xkeysnail).
|
||||||
|
|
||||||
## Windows (Autohotkey)
|
## Windows (Autohotkey)
|
||||||
@@ -375,25 +386,53 @@ git pull origin master
|
|||||||
This info is now superceded by the fact that linux has a full fledge GUI and system tray app that is very easy to use, but I will keep the command line options for those that want to know what they are.
|
This info is now superceded by the fact that linux has a full fledge GUI and system tray app that is very easy to use, but I will keep the command line options for those that want to know what they are.
|
||||||
|
|
||||||
Status
|
Status
|
||||||
|
|
||||||
|
systemd
|
||||||
```
|
```
|
||||||
sudo systemctl status xkeysnail
|
sudo systemctl status xkeysnail
|
||||||
```
|
```
|
||||||
|
|
||||||
|
sysvinit
|
||||||
|
```
|
||||||
|
tail -f /tmp/kinto.log
|
||||||
|
```
|
||||||
|
|
||||||
Stop (your keymap will return to normal)
|
Stop (your keymap will return to normal)
|
||||||
|
|
||||||
|
systemd
|
||||||
```
|
```
|
||||||
sudo systemctl stop xkeysnail
|
sudo systemctl stop xkeysnail
|
||||||
```
|
```
|
||||||
|
|
||||||
|
sysvinit
|
||||||
|
```
|
||||||
|
sudo -E /etc/init.d/kinto stop
|
||||||
|
```
|
||||||
|
|
||||||
Start
|
Start
|
||||||
|
|
||||||
|
systemd
|
||||||
```
|
```
|
||||||
sudo systemctl start xkeysnail
|
sudo systemctl start xkeysnail
|
||||||
```
|
```
|
||||||
|
|
||||||
|
sysvinit
|
||||||
|
```
|
||||||
|
sudo -E /etc/init.d/kinto start
|
||||||
|
```
|
||||||
|
|
||||||
Restart
|
Restart
|
||||||
|
|
||||||
|
systemd
|
||||||
```
|
```
|
||||||
sudo systemctl restart xkeysnail
|
sudo systemctl restart xkeysnail
|
||||||
```
|
```
|
||||||
|
|
||||||
|
sysvinit
|
||||||
|
```
|
||||||
|
sudo -E /etc/init.d/kinto restart
|
||||||
|
```
|
||||||
|
|
||||||
## Troubleshooting
|
## Troubleshooting
|
||||||
|
|
||||||
### Installed successfully, but modifier keys are not properly remapped?
|
### Installed successfully, but modifier keys are not properly remapped?
|
||||||
|
@@ -2,11 +2,11 @@
|
|||||||
|
|
||||||
# /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/rbreaves/kinto/master/install/linux.sh)"
|
# /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/rbreaves/kinto/master/install/linux.sh)"
|
||||||
|
|
||||||
curl https://github.com/rbreaves/kinto/archive/refs/heads/master.zip -J -L -o ~/Downloads/kinto.zip
|
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/
|
unzip ~/Downloads/kinto.zip -d ~/Downloads/
|
||||||
cd ~/Downloads/kinto-master/
|
cd ~/Downloads/kinto-master/
|
||||||
|
|
||||||
kintorelease=`curl -s https://api.github.com/repos/rbreaves/kinto/releases/latest | awk -F'tag_name": ' '{if ($2) print $2}' | tr -d \",`
|
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`
|
kintohash=`unzip -z ~/Downloads/kinto.zip | tail -n1`
|
||||||
kintoshort=${kintohash::7}
|
kintoshort=${kintohash::7}
|
||||||
|
|
||||||
|
@@ -1,6 +1,8 @@
|
|||||||
#!/usr/bin/env python3
|
#!/usr/bin/env python3
|
||||||
|
|
||||||
import gi,os,time,fcntl,argparse,re
|
import gi,os,time,fcntl,argparse,re
|
||||||
|
import warnings
|
||||||
|
warnings.filterwarnings("ignore")
|
||||||
gi.require_version('Gtk', '3.0')
|
gi.require_version('Gtk', '3.0')
|
||||||
gi.require_version('Vte', '2.91')
|
gi.require_version('Vte', '2.91')
|
||||||
from gi.repository import Gtk,Gdk,GdkPixbuf
|
from gi.repository import Gtk,Gdk,GdkPixbuf
|
||||||
@@ -48,12 +50,20 @@ class MyWindow(Gtk.Window):
|
|||||||
page = 1
|
page = 1
|
||||||
|
|
||||||
label = Gtk.Label()
|
label = Gtk.Label()
|
||||||
label.set_alignment(1, 0)
|
label.set_halign(Gtk.Align.END)
|
||||||
ostype = os.environ.get('XDG_CURRENT_DESKTOP')
|
ostype = os.environ.get('XDG_CURRENT_DESKTOP')
|
||||||
global openWin
|
global openWin
|
||||||
openWin = False
|
openWin = False
|
||||||
|
|
||||||
global child_pid
|
global child_pid
|
||||||
|
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)
|
kinto_status = Popen("while :; do clear; systemctl is-active xkeysnail; sleep 2; done", stdout=PIPE, shell=True)
|
||||||
child_pid = kinto_status.pid
|
child_pid = kinto_status.pid
|
||||||
|
|
||||||
@@ -114,7 +124,13 @@ class MyWindow(Gtk.Window):
|
|||||||
None,
|
None,
|
||||||
)
|
)
|
||||||
if self.args.debug:
|
if self.args.debug:
|
||||||
|
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'
|
self.command = 'sudo systemctl stop xkeysnail && sudo pkill -f bin/xkeysnail && sudo xkeysnail ~/.config/kinto/kinto.py\n'
|
||||||
|
else:
|
||||||
|
if sysv:
|
||||||
|
self.command = "tail -f /tmp/kinto.log\n"
|
||||||
else:
|
else:
|
||||||
self.command = "journalctl -f --unit=xkeysnail.service -b\n"
|
self.command = "journalctl -f --unit=xkeysnail.service -b\n"
|
||||||
|
|
||||||
@@ -181,19 +197,19 @@ class MyWindow(Gtk.Window):
|
|||||||
menubar.append(menuitem_edit)
|
menubar.append(menuitem_edit)
|
||||||
submenu_edit = Gtk.Menu()
|
submenu_edit = Gtk.Menu()
|
||||||
menuitem_edit.set_submenu(submenu_edit)
|
menuitem_edit.set_submenu(submenu_edit)
|
||||||
edititem_tweaks = Gtk.MenuItem("Tweaks")
|
edititem_tweaks = Gtk.MenuItem(label="Tweaks")
|
||||||
edititem_tweaks.connect('activate',self.setTweaks)
|
edititem_tweaks.connect('activate',self.setTweaks)
|
||||||
submenu_edit.append(edititem_tweaks)
|
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)
|
edititem_config.connect('activate',self.setConfig)
|
||||||
submenu_edit.append(edititem_config)
|
submenu_edit.append(edititem_config)
|
||||||
edititem_service = Gtk.MenuItem("Kinto Service")
|
edititem_service = Gtk.MenuItem(label="Kinto Service")
|
||||||
edititem_service.connect('activate',self.setService)
|
edititem_service.connect('activate',self.setService)
|
||||||
submenu_edit.append(edititem_service)
|
submenu_edit.append(edititem_service)
|
||||||
edititem_shortcuts = Gtk.MenuItem("System Shortcuts")
|
edititem_shortcuts = Gtk.MenuItem(label="System Shortcuts")
|
||||||
edititem_shortcuts.connect('activate',self.setSysKB)
|
edititem_shortcuts.connect('activate',self.setSysKB)
|
||||||
submenu_edit.append(edititem_shortcuts)
|
submenu_edit.append(edititem_shortcuts)
|
||||||
edititem_language = Gtk.MenuItem("Change Language")
|
edititem_language = Gtk.MenuItem(label="Change Language")
|
||||||
edititem_language.connect('activate',self.setRegion)
|
edititem_language.connect('activate',self.setRegion)
|
||||||
submenu_edit.append(edititem_language)
|
submenu_edit.append(edititem_language)
|
||||||
|
|
||||||
@@ -207,11 +223,11 @@ class MyWindow(Gtk.Window):
|
|||||||
helpitem_debug = Gtk.MenuItem(label="Debug")
|
helpitem_debug = Gtk.MenuItem(label="Debug")
|
||||||
helpitem_debug.connect('activate',self.runDebug)
|
helpitem_debug.connect('activate',self.runDebug)
|
||||||
submenu_help.append(helpitem_debug)
|
submenu_help.append(helpitem_debug)
|
||||||
helpitem_support = Gtk.MenuItem("Support")
|
helpitem_support = Gtk.MenuItem(label="Support")
|
||||||
helpitem_support.connect('activate',self.openSupport)
|
helpitem_support.connect('activate',self.openSupport)
|
||||||
submenu_help.append(helpitem_support)
|
submenu_help.append(helpitem_support)
|
||||||
menuitem_help.set_submenu(submenu_help)
|
menuitem_help.set_submenu(submenu_help)
|
||||||
helpitem_about = Gtk.MenuItem("About")
|
helpitem_about = Gtk.MenuItem(label="About")
|
||||||
helpitem_about.connect('activate',self.runAbout)
|
helpitem_about.connect('activate',self.runAbout)
|
||||||
submenu_help.append(helpitem_about)
|
submenu_help.append(helpitem_about)
|
||||||
|
|
||||||
@@ -344,7 +360,6 @@ class MyWindow(Gtk.Window):
|
|||||||
|
|
||||||
restartsvc = True
|
restartsvc = True
|
||||||
|
|
||||||
|
|
||||||
def initSetup(self):
|
def initSetup(self):
|
||||||
global win,openWin,restartsvc
|
global win,openWin,restartsvc
|
||||||
|
|
||||||
@@ -420,21 +435,20 @@ class MyWindow(Gtk.Window):
|
|||||||
pixbuf = GdkPixbuf.Pixbuf.new_from_file(os.environ['HOME']+'/.config/kinto/gui/tuxcry4.png')
|
pixbuf = GdkPixbuf.Pixbuf.new_from_file(os.environ['HOME']+'/.config/kinto/gui/tuxcry4.png')
|
||||||
pixbuf = pixbuf.scale_simple(600, 360, GdkPixbuf.InterpType.BILINEAR)
|
pixbuf = pixbuf.scale_simple(600, 360, GdkPixbuf.InterpType.BILINEAR)
|
||||||
self.bgsuccess4 = self.bgsuccess4.new_from_pixbuf(pixbuf)
|
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 = GdkPixbuf.Pixbuf.new_from_file(os.environ['HOME']+'/.config/kinto/gui/tuxuninstall.png')
|
||||||
pixbuf = pixbuf.scale_simple(600, 360, GdkPixbuf.InterpType.BILINEAR)
|
pixbuf = pixbuf.scale_simple(600, 360, GdkPixbuf.InterpType.BILINEAR)
|
||||||
self.bguninstall = self.bguninstall.new_from_pixbuf(pixbuf)
|
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 = GdkPixbuf.Pixbuf.new_from_file(os.environ['HOME']+'/.config/kinto/gui/tuxbg.png')
|
||||||
pixbuf = pixbuf.scale_simple(600, 360, GdkPixbuf.InterpType.BILINEAR)
|
pixbuf = pixbuf.scale_simple(600, 360, GdkPixbuf.InterpType.BILINEAR)
|
||||||
self.background = self.background.new_from_pixbuf(pixbuf)
|
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 = self.bgcaps.new_from_pixbuf(pixbuf2)
|
||||||
self.bgcaps.set_alignment(0, 1)
|
|
||||||
self.bgspace = self.bgspace.new_from_pixbuf(pixbuf3)
|
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(self.background)
|
||||||
self.overlay.add_overlay(self.container)
|
self.overlay.add_overlay(self.container)
|
||||||
self.setupwin.add(self.container)
|
self.setupwin.add(self.container)
|
||||||
@@ -456,7 +470,7 @@ class MyWindow(Gtk.Window):
|
|||||||
def image2pixbuf(self,im):
|
def image2pixbuf(self,im):
|
||||||
data = im.tobytes()
|
data = im.tobytes()
|
||||||
w, h = im.size
|
w, h = im.size
|
||||||
print(im.size)
|
# print(im.size)
|
||||||
data = GLib.Bytes.new(data)
|
data = GLib.Bytes.new(data)
|
||||||
pix = GdkPixbuf.Pixbuf.new_from_bytes(data, GdkPixbuf.Colorspace.RGB,True, 8, w, h, w * 4)
|
pix = GdkPixbuf.Pixbuf.new_from_bytes(data, GdkPixbuf.Colorspace.RGB,True, 8, w, h, w * 4)
|
||||||
return pix
|
return pix
|
||||||
@@ -517,6 +531,9 @@ class MyWindow(Gtk.Window):
|
|||||||
return
|
return
|
||||||
|
|
||||||
def runDebug(self,button):
|
def runDebug(self,button):
|
||||||
|
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'
|
command = 'send \003 sudo systemctl stop xkeysnail && sudo pkill -f bin/xkeysnail && sudo xkeysnail ~/.config/kinto/kinto.py\n'
|
||||||
self.InputToTerm(command)
|
self.InputToTerm(command)
|
||||||
|
|
||||||
@@ -610,7 +627,10 @@ class MyWindow(Gtk.Window):
|
|||||||
self.queryConfig(killspawn)
|
self.queryConfig(killspawn)
|
||||||
time.sleep(1)
|
time.sleep(1)
|
||||||
global child_pid
|
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("export TERM=xterm-color;while :; do clear; pgrep 'xkeysnail'; sleep 2; done", stdout=PIPE, shell=True)
|
||||||
|
else:
|
||||||
|
self.kinto_status = Popen("export TERM=xterm-color;while :; do clear; systemctl is-active xkeysnail; sleep 2; done", stdout=PIPE, shell=True)
|
||||||
child_pid = self.kinto_status.pid
|
child_pid = self.kinto_status.pid
|
||||||
self.menuitem_systray.disconnect(self.menuitem_systray.signal_id)
|
self.menuitem_systray.disconnect(self.menuitem_systray.signal_id)
|
||||||
self.menuitem_systray.set_active(False)
|
self.menuitem_systray.set_active(False)
|
||||||
@@ -618,6 +638,7 @@ class MyWindow(Gtk.Window):
|
|||||||
return
|
return
|
||||||
|
|
||||||
def setKB(self,button,kbtype):
|
def setKB(self,button,kbtype):
|
||||||
|
global sysv
|
||||||
try:
|
try:
|
||||||
if kbtype == "win":
|
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'
|
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'
|
||||||
@@ -654,6 +675,9 @@ class MyWindow(Gtk.Window):
|
|||||||
elif kbtype == "ibm":
|
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'
|
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'
|
||||||
|
|
||||||
|
if sysv:
|
||||||
|
restart = ['sudo', '-E','/etc/init.d/kinto','restart']
|
||||||
|
else:
|
||||||
restart = ['sudo', 'systemctl','restart','xkeysnail']
|
restart = ['sudo', 'systemctl','restart','xkeysnail']
|
||||||
cmds = ['perl','-pi','-e',setkb,self.kconfig]
|
cmds = ['perl','-pi','-e',setkb,self.kconfig]
|
||||||
|
|
||||||
@@ -746,10 +770,13 @@ class MyWindow(Gtk.Window):
|
|||||||
}
|
}
|
||||||
|
|
||||||
def on_delete_event(event, self, widget):
|
def on_delete_event(event, self, widget):
|
||||||
global restartsvc, openWin
|
global restartsvc, openWin, sysv
|
||||||
|
|
||||||
if restartsvc == True:
|
if restartsvc == True:
|
||||||
try:
|
try:
|
||||||
|
if sysv:
|
||||||
|
restartcmd = ['sudo', '-E','/etc/init.d/kinto','restart']
|
||||||
|
else:
|
||||||
restartcmd = ['sudo', 'systemctl','restart','xkeysnail']
|
restartcmd = ['sudo', 'systemctl','restart','xkeysnail']
|
||||||
Popen(restartcmd)
|
Popen(restartcmd)
|
||||||
restartsvc = False
|
restartsvc = False
|
||||||
@@ -870,7 +897,11 @@ class MyWindow(Gtk.Window):
|
|||||||
return
|
return
|
||||||
|
|
||||||
def runRestart(self,button):
|
def runRestart(self,button):
|
||||||
|
global sysv
|
||||||
try:
|
try:
|
||||||
|
if sysv:
|
||||||
|
stop = Popen(['sudo', '-E','/etc/init.d/kinto','stop'])
|
||||||
|
else:
|
||||||
stop = Popen(['sudo', 'systemctl','stop','xkeysnail'])
|
stop = Popen(['sudo', 'systemctl','stop','xkeysnail'])
|
||||||
stop.wait()
|
stop.wait()
|
||||||
time.sleep(1)
|
time.sleep(1)
|
||||||
@@ -880,6 +911,10 @@ class MyWindow(Gtk.Window):
|
|||||||
if res.returncode == 0:
|
if res.returncode == 0:
|
||||||
pkillxkey = Popen(['sudo', 'pkill','-f','bin/xkeysnail'])
|
pkillxkey = Popen(['sudo', 'pkill','-f','bin/xkeysnail'])
|
||||||
pkillxkey.wait()
|
pkillxkey.wait()
|
||||||
|
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'])
|
Popen(['sudo','systemctl','start','xkeysnail'])
|
||||||
self.command = "send \003 journalctl -f --unit=xkeysnail.service -b\n"
|
self.command = "send \003 journalctl -f --unit=xkeysnail.service -b\n"
|
||||||
self.InputToTerm(self.command)
|
self.InputToTerm(self.command)
|
||||||
@@ -887,7 +922,11 @@ class MyWindow(Gtk.Window):
|
|||||||
Popen(['notify-send','Kinto: Errror restarting Kinto!'])
|
Popen(['notify-send','Kinto: Errror restarting Kinto!'])
|
||||||
|
|
||||||
def runStop(self,button):
|
def runStop(self,button):
|
||||||
|
global sysv
|
||||||
try:
|
try:
|
||||||
|
if sysv:
|
||||||
|
stop = Popen(['sudo', '-E','/etc/init.d/kinto','stop'])
|
||||||
|
else:
|
||||||
stop = Popen(['sudo', 'systemctl','stop','xkeysnail'])
|
stop = Popen(['sudo', 'systemctl','stop','xkeysnail'])
|
||||||
stop.wait()
|
stop.wait()
|
||||||
time.sleep(1)
|
time.sleep(1)
|
||||||
@@ -1077,7 +1116,7 @@ class MyWindow(Gtk.Window):
|
|||||||
except:
|
except:
|
||||||
pass
|
pass
|
||||||
|
|
||||||
print(Vte.get_minor_version())
|
# print(Vte.get_minor_version())
|
||||||
|
|
||||||
# def on_menu_auto(self, widget):
|
# def on_menu_auto(self, widget):
|
||||||
# print("add file open dialog")
|
# print("add file open dialog")
|
||||||
@@ -1106,34 +1145,36 @@ class UninstallPage(Gtk.Box):
|
|||||||
|
|
||||||
label_start = Gtk.Label()
|
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_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)
|
label_start.set_line_wrap(True)
|
||||||
vbox.add(label_start)
|
vbox.add(label_start)
|
||||||
scroller.add(vbox)
|
scroller.add(vbox)
|
||||||
|
|
||||||
hbox = Gtk.HBox()
|
hbox = Gtk.HBox()
|
||||||
previous = Gtk.Button("Uninstall")
|
previous = Gtk.Button(label="Uninstall")
|
||||||
previous.connect("clicked", self.goback)
|
previous.connect("clicked", self.goback)
|
||||||
previous.set_margin_right(206)
|
previous.set_margin_end(206)
|
||||||
hbox.add(previous)
|
hbox.add(previous)
|
||||||
|
|
||||||
onward = Gtk.Button("Continue")
|
onward = Gtk.Button(label="Continue")
|
||||||
onward.connect("clicked", self.forward)
|
onward.connect("clicked", self.forward)
|
||||||
hbox.add(onward)
|
hbox.add(onward)
|
||||||
|
|
||||||
hbox.set_hexpand(False)
|
hbox.set_hexpand(False)
|
||||||
hbox.set_vexpand(False)
|
hbox.set_vexpand(False)
|
||||||
hbox.set_margin_bottom(6)
|
hbox.set_margin_bottom(6)
|
||||||
hbox.set_margin_right(25)
|
hbox.set_margin_end(25)
|
||||||
|
|
||||||
scroller.set_hexpand(True)
|
scroller.set_hexpand(True)
|
||||||
scroller.set_vexpand(True)
|
scroller.set_vexpand(True)
|
||||||
vbox_container.add(scroller)
|
vbox_container.add(scroller)
|
||||||
vbox_container.set_margin_top(55)
|
vbox_container.set_margin_top(55)
|
||||||
vbox_container.set_margin_right(25)
|
vbox_container.set_margin_end(25)
|
||||||
self.grid.set_margin_left(157)
|
self.grid.set_margin_start(157)
|
||||||
vbox_container.set_margin_bottom(18)
|
vbox_container.set_margin_bottom(18)
|
||||||
vbox.set_margin_right(10)
|
vbox.set_margin_end(10)
|
||||||
vbox.set_margin_bottom(18)
|
vbox.set_margin_bottom(18)
|
||||||
self.grid.add(vbox_container)
|
self.grid.add(vbox_container)
|
||||||
self.grid.attach_next_to(hbox, vbox_container, Gtk.PositionType.BOTTOM, 2, 1)
|
self.grid.attach_next_to(hbox, vbox_container, Gtk.PositionType.BOTTOM, 2, 1)
|
||||||
@@ -1165,18 +1206,19 @@ class FirstPage(Gtk.Box):
|
|||||||
|
|
||||||
label_start = Gtk.Label()
|
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_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)
|
label_start.set_line_wrap(True)
|
||||||
vbox.add(label_start)
|
vbox.add(label_start)
|
||||||
scroller.add(vbox)
|
scroller.add(vbox)
|
||||||
|
|
||||||
hbox = Gtk.HBox()
|
hbox = Gtk.HBox()
|
||||||
previous = Gtk.Button("")
|
previous = Gtk.Button(label="")
|
||||||
for child in previous.get_children():
|
for child in previous.get_children():
|
||||||
child.set_label("<b>Decline</b>")
|
child.set_label("<b>Decline</b>")
|
||||||
child.set_use_markup(True)
|
child.set_use_markup(True)
|
||||||
previous.connect("clicked", self.goback)
|
previous.connect("clicked", self.goback)
|
||||||
previous.set_margin_right(245)
|
previous.set_margin_end(245)
|
||||||
hbox.add(previous)
|
hbox.add(previous)
|
||||||
|
|
||||||
self.__parent_window.first_onward.set_label("")
|
self.__parent_window.first_onward.set_label("")
|
||||||
@@ -1190,16 +1232,16 @@ class FirstPage(Gtk.Box):
|
|||||||
hbox.set_hexpand(False)
|
hbox.set_hexpand(False)
|
||||||
hbox.set_vexpand(False)
|
hbox.set_vexpand(False)
|
||||||
hbox.set_margin_bottom(6)
|
hbox.set_margin_bottom(6)
|
||||||
hbox.set_margin_right(25)
|
hbox.set_margin_end(25)
|
||||||
|
|
||||||
scroller.set_hexpand(True)
|
scroller.set_hexpand(True)
|
||||||
scroller.set_vexpand(True)
|
scroller.set_vexpand(True)
|
||||||
vbox_container.add(scroller)
|
vbox_container.add(scroller)
|
||||||
vbox_container.set_margin_top(55)
|
vbox_container.set_margin_top(55)
|
||||||
vbox_container.set_margin_right(28)
|
vbox_container.set_margin_end(28)
|
||||||
self.grid.set_margin_left(157)
|
self.grid.set_margin_start(157)
|
||||||
vbox_container.set_margin_bottom(18)
|
vbox_container.set_margin_bottom(18)
|
||||||
vbox.set_margin_right(10)
|
vbox.set_margin_end(10)
|
||||||
vbox.set_margin_bottom(18)
|
vbox.set_margin_bottom(18)
|
||||||
self.grid.add(vbox_container)
|
self.grid.add(vbox_container)
|
||||||
self.grid.attach_next_to(hbox, vbox_container, Gtk.PositionType.BOTTOM, 2, 1)
|
self.grid.attach_next_to(hbox, vbox_container, Gtk.PositionType.BOTTOM, 2, 1)
|
||||||
@@ -1238,37 +1280,38 @@ class SecondPage(Gtk.Box):
|
|||||||
label_start = Gtk.Label()
|
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_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)
|
label_start.set_line_wrap(True)
|
||||||
vbox.add(label_start)
|
vbox.add(label_start)
|
||||||
scroller.add(vbox)
|
scroller.add(vbox)
|
||||||
|
|
||||||
hbox = Gtk.HBox()
|
hbox = Gtk.HBox()
|
||||||
previous = Gtk.Button("")
|
previous = Gtk.Button(label="")
|
||||||
for child in previous.get_children():
|
for child in previous.get_children():
|
||||||
child.set_label("<b>Go Back</b>")
|
child.set_label("<b>Go Back</b>")
|
||||||
child.set_use_markup(True)
|
child.set_use_markup(True)
|
||||||
previous.connect("clicked", self.goback)
|
previous.connect("clicked", self.goback)
|
||||||
previous.set_margin_right(315)
|
previous.set_margin_end(315)
|
||||||
hbox.add(previous)
|
hbox.add(previous)
|
||||||
|
|
||||||
# onward = Gtk.Button("Continue")
|
# onward = Gtk.Button(label="Continue")
|
||||||
# onward.connect("clicked", self.forward)
|
# onward.connect("clicked", self.forward)
|
||||||
# hbox.add(onward)
|
# hbox.add(onward)
|
||||||
|
|
||||||
hbox.set_hexpand(False)
|
hbox.set_hexpand(False)
|
||||||
hbox.set_vexpand(False)
|
hbox.set_vexpand(False)
|
||||||
hbox.set_margin_bottom(6)
|
hbox.set_margin_bottom(6)
|
||||||
hbox.set_margin_right(25)
|
hbox.set_margin_end(25)
|
||||||
|
|
||||||
scroller.set_hexpand(True)
|
scroller.set_hexpand(True)
|
||||||
scroller.set_vexpand(True)
|
scroller.set_vexpand(True)
|
||||||
vbox_container.add(scroller)
|
vbox_container.add(scroller)
|
||||||
vbox_container.set_margin_top(55)
|
vbox_container.set_margin_top(55)
|
||||||
vbox_container.set_margin_right(25)
|
vbox_container.set_margin_end(25)
|
||||||
self.grid.set_margin_left(157)
|
self.grid.set_margin_start(157)
|
||||||
vbox_container.set_margin_bottom(18)
|
vbox_container.set_margin_bottom(18)
|
||||||
vbox.set_margin_right(10)
|
vbox.set_margin_end(10)
|
||||||
vbox.set_margin_bottom(18)
|
vbox.set_margin_bottom(18)
|
||||||
self.grid.add(vbox_container)
|
self.grid.add(vbox_container)
|
||||||
self.grid.attach_next_to(hbox, vbox_container, Gtk.PositionType.BOTTOM, 2, 1)
|
self.grid.attach_next_to(hbox, vbox_container, Gtk.PositionType.BOTTOM, 2, 1)
|
||||||
@@ -1322,37 +1365,38 @@ class CapsPage(Gtk.Box):
|
|||||||
|
|
||||||
label_start = Gtk.Label()
|
label_start = Gtk.Label()
|
||||||
label_start.set_markup('<b>Identifying your Keyboard...</b>\n\nPress the <b>capslock</b> key twice.')
|
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)
|
label_start.set_line_wrap(True)
|
||||||
vbox.add(label_start)
|
vbox.add(label_start)
|
||||||
scroller.add(vbox)
|
scroller.add(vbox)
|
||||||
|
|
||||||
hbox = Gtk.HBox()
|
hbox = Gtk.HBox()
|
||||||
previous = Gtk.Button("")
|
previous = Gtk.Button(label="")
|
||||||
for child in previous.get_children():
|
for child in previous.get_children():
|
||||||
child.set_label("<b>Go Back</b>")
|
child.set_label("<b>Go Back</b>")
|
||||||
child.set_use_markup(True)
|
child.set_use_markup(True)
|
||||||
previous.connect("clicked", self.goback)
|
previous.connect("clicked", self.goback)
|
||||||
previous.set_margin_right(315)
|
previous.set_margin_end(315)
|
||||||
hbox.add(previous)
|
hbox.add(previous)
|
||||||
|
|
||||||
# onward = Gtk.Button("Continue")
|
# onward = Gtk.Button(label="Continue")
|
||||||
# onward.connect("clicked", self.forward)
|
# onward.connect("clicked", self.forward)
|
||||||
# hbox.add(onward)
|
# hbox.add(onward)
|
||||||
|
|
||||||
hbox.set_hexpand(False)
|
hbox.set_hexpand(False)
|
||||||
hbox.set_vexpand(False)
|
hbox.set_vexpand(False)
|
||||||
hbox.set_margin_bottom(6)
|
hbox.set_margin_bottom(6)
|
||||||
hbox.set_margin_right(25)
|
hbox.set_margin_end(25)
|
||||||
|
|
||||||
scroller.set_hexpand(True)
|
scroller.set_hexpand(True)
|
||||||
scroller.set_vexpand(True)
|
scroller.set_vexpand(True)
|
||||||
vbox_container.add(scroller)
|
vbox_container.add(scroller)
|
||||||
vbox_container.set_margin_top(55)
|
vbox_container.set_margin_top(55)
|
||||||
vbox_container.set_margin_right(25)
|
vbox_container.set_margin_end(25)
|
||||||
self.grid.set_margin_left(157)
|
self.grid.set_margin_start(157)
|
||||||
vbox_container.set_margin_bottom(18)
|
vbox_container.set_margin_bottom(18)
|
||||||
vbox.set_margin_right(10)
|
vbox.set_margin_end(10)
|
||||||
vbox.set_margin_bottom(18)
|
vbox.set_margin_bottom(18)
|
||||||
self.grid.add(vbox_container)
|
self.grid.add(vbox_container)
|
||||||
self.grid.attach_next_to(hbox, vbox_container, Gtk.PositionType.BOTTOM, 2, 1)
|
self.grid.attach_next_to(hbox, vbox_container, Gtk.PositionType.BOTTOM, 2, 1)
|
||||||
@@ -1389,9 +1433,9 @@ class SuccessPage(Gtk.Box):
|
|||||||
self.grid = Gtk.Grid()
|
self.grid = Gtk.Grid()
|
||||||
|
|
||||||
hbox = Gtk.HBox()
|
hbox = Gtk.HBox()
|
||||||
previous = Gtk.Button(" ")
|
previous = Gtk.Button(label=" ")
|
||||||
previous.props.relief = Gtk.ReliefStyle.NONE
|
previous.props.relief = Gtk.ReliefStyle.NONE
|
||||||
previous.set_margin_right(245)
|
previous.set_margin_end(245)
|
||||||
hbox.add(previous)
|
hbox.add(previous)
|
||||||
|
|
||||||
self.__parent_window.last_onward.set_label("")
|
self.__parent_window.last_onward.set_label("")
|
||||||
@@ -1404,7 +1448,7 @@ class SuccessPage(Gtk.Box):
|
|||||||
hbox.set_hexpand(False)
|
hbox.set_hexpand(False)
|
||||||
hbox.set_vexpand(False)
|
hbox.set_vexpand(False)
|
||||||
hbox.set_margin_bottom(6)
|
hbox.set_margin_bottom(6)
|
||||||
hbox.set_margin_right(25)
|
hbox.set_margin_end(25)
|
||||||
|
|
||||||
scroller = Gtk.ScrolledWindow()
|
scroller = Gtk.ScrolledWindow()
|
||||||
scroller.set_policy(Gtk.PolicyType.NEVER, Gtk.PolicyType.NEVER)
|
scroller.set_policy(Gtk.PolicyType.NEVER, Gtk.PolicyType.NEVER)
|
||||||
@@ -1413,11 +1457,11 @@ class SuccessPage(Gtk.Box):
|
|||||||
vbox = Gtk.VBox()
|
vbox = Gtk.VBox()
|
||||||
vbox_container = Gtk.VBox()
|
vbox_container = Gtk.VBox()
|
||||||
vbox_container.set_margin_top(55)
|
vbox_container.set_margin_top(55)
|
||||||
vbox_container.set_margin_right(28)
|
vbox_container.set_margin_end(28)
|
||||||
vbox_container.add(scroller)
|
vbox_container.add(scroller)
|
||||||
self.grid.set_margin_left(157)
|
self.grid.set_margin_start(157)
|
||||||
vbox_container.set_margin_bottom(18)
|
vbox_container.set_margin_bottom(18)
|
||||||
vbox.set_margin_right(10)
|
vbox.set_margin_end(10)
|
||||||
vbox.set_margin_bottom(18)
|
vbox.set_margin_bottom(18)
|
||||||
self.grid.add(vbox_container)
|
self.grid.add(vbox_container)
|
||||||
self.grid.attach_next_to(hbox, vbox_container, Gtk.PositionType.BOTTOM, 2, 1)
|
self.grid.attach_next_to(hbox, vbox_container, Gtk.PositionType.BOTTOM, 2, 1)
|
||||||
|
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
|
@@ -21,24 +21,34 @@ terminals = [
|
|||||||
"lxterminal",
|
"lxterminal",
|
||||||
"mate-terminal",
|
"mate-terminal",
|
||||||
"qterminal",
|
"qterminal",
|
||||||
|
"st",
|
||||||
"sakura",
|
"sakura",
|
||||||
|
"station",
|
||||||
"terminator",
|
"terminator",
|
||||||
|
"termite",
|
||||||
"tilda",
|
"tilda",
|
||||||
"tilix",
|
"tilix",
|
||||||
|
"urxvt",
|
||||||
"xfce4-terminal",
|
"xfce4-terminal",
|
||||||
"xterm",
|
"xterm",
|
||||||
]
|
]
|
||||||
terminals = [term.casefold() for term in terminals]
|
terminals = [term.casefold() for term in terminals]
|
||||||
termStr = "|".join(str(x) for x in terminals)
|
termStr = "|".join(str('^'+x+'$') for x in terminals)
|
||||||
|
|
||||||
mscodes = ["code","vscodium"]
|
mscodes = ["code","vscodium"]
|
||||||
codeStr = "|".join(str(x) for x in mscodes)
|
codeStr = "|".join(str('^'+x+'$') for x in mscodes)
|
||||||
|
|
||||||
# Add remote desktop clients & VM software here
|
# Add remote desktop clients & VM software here
|
||||||
# Ideally we'd only exclude the client window,
|
# Ideally we'd only exclude the client window,
|
||||||
# but that may not be easily done.
|
# but that may not be easily done.
|
||||||
remotes = [
|
remotes = [
|
||||||
|
"Gnome-boxes",
|
||||||
"org.remmina.Remmina",
|
"org.remmina.Remmina",
|
||||||
|
"remmina",
|
||||||
|
"qemu-system-.*",
|
||||||
|
"Virt-manager",
|
||||||
|
"VirtualBox",
|
||||||
|
"VirtualBox Machine",
|
||||||
"xfreerdp",
|
"xfreerdp",
|
||||||
]
|
]
|
||||||
remotes = [client.casefold() for client in remotes]
|
remotes = [client.casefold() for client in remotes]
|
||||||
@@ -59,7 +69,7 @@ browsers = [
|
|||||||
"microsoft-edge-dev",
|
"microsoft-edge-dev",
|
||||||
]
|
]
|
||||||
browsers = [browser.casefold() for browser in browsers]
|
browsers = [browser.casefold() for browser in browsers]
|
||||||
browserStr = "|".join(str(x) for x in browsers)
|
browserStr = "|".join(str('^'+x+'$') for x in browsers)
|
||||||
|
|
||||||
chromes = [
|
chromes = [
|
||||||
"Chromium",
|
"Chromium",
|
||||||
@@ -69,11 +79,11 @@ chromes = [
|
|||||||
"microsoft-edge-dev",
|
"microsoft-edge-dev",
|
||||||
]
|
]
|
||||||
chromes = [chrome.casefold() for chrome in chromes]
|
chromes = [chrome.casefold() for chrome in chromes]
|
||||||
chromeStr = "|".join(str(x) for x in chromes)
|
chromeStr = "|".join(str('^'+x+'$') for x in chromes)
|
||||||
|
|
||||||
# edges = ["microsoft-edge-dev","microsoft-edge"]
|
# edges = ["microsoft-edge-dev","microsoft-edge"]
|
||||||
# edges = [edge.casefold() for edge in edges]
|
# edges = [edge.casefold() for edge in edges]
|
||||||
# edgeStr = "|".join(str(x) for x in edges)
|
# edgeStr = "|".join(str('^'+x+'$') for x in edges)
|
||||||
|
|
||||||
define_multipurpose_modmap(
|
define_multipurpose_modmap(
|
||||||
# {Key.ENTER: [Key.ENTER, Key.RIGHT_CTRL] # Enter2Cmd
|
# {Key.ENTER: [Key.ENTER, Key.RIGHT_CTRL] # Enter2Cmd
|
||||||
@@ -264,20 +274,21 @@ define_keymap(re.compile("caja", re.IGNORECASE),{
|
|||||||
# (overrides some bindings from general file manager code block below)
|
# (overrides some bindings from general file manager code block below)
|
||||||
define_keymap(re.compile("dde-file-manager", re.IGNORECASE),{
|
define_keymap(re.compile("dde-file-manager", re.IGNORECASE),{
|
||||||
K("RC-i"): K("RC-i"), # File properties dialog (Get Info)
|
K("RC-i"): K("RC-i"), # File properties dialog (Get Info)
|
||||||
K("RC-comma"): K("RC-comma"), # Open preferences dialog (doesn't work, no shortcut available?)
|
K("RC-comma"): None, # Disable preferences shortcut (no shortcut available)
|
||||||
K("RC-Up"): K("RC-Up"), # Go Up dir
|
K("RC-Up"): K("RC-Up"), # Go Up dir
|
||||||
},"Overrides for DDE File Manager - Finder")
|
},"Overrides for DDE File Manager - Finder")
|
||||||
|
|
||||||
# Keybindings overrides for Dolphin
|
# Keybindings overrides for Dolphin
|
||||||
# (overrides some bindings from general file manager code block below)
|
# (overrides some bindings from general file manager code block below)
|
||||||
define_keymap(re.compile("dolphin", re.IGNORECASE),{
|
define_keymap(re.compile("dolphin", re.IGNORECASE),{
|
||||||
K("RC-Super-o"): K("RC-Shift-o"), # Open in new window (or new tab, user's choice)
|
##########################################################################################
|
||||||
# "Open in new window" requires manually setting custom shortcut of Ctrl+Shift+o
|
### "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.
|
### 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
|
### "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.
|
### 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-Shift-N"): K("F10"), # Create new folder
|
||||||
K("RC-comma"): K("RC-Shift-comma"), # Open preferences dialog
|
K("RC-comma"): K("RC-Shift-comma"), # Open preferences dialog
|
||||||
},"Overrides for Dolphin - Finder")
|
},"Overrides for Dolphin - Finder")
|
||||||
@@ -286,7 +297,7 @@ define_keymap(re.compile("dolphin", re.IGNORECASE),{
|
|||||||
# (overrides some bindings from general file manager code block below)
|
# (overrides some bindings from general file manager code block below)
|
||||||
define_keymap(re.compile("io.elementary.files", re.IGNORECASE),{
|
define_keymap(re.compile("io.elementary.files", re.IGNORECASE),{
|
||||||
# K("RC-Super-o"): K("Shift-Enter"), # Open folder in new tab
|
# K("RC-Super-o"): K("Shift-Enter"), # Open folder in new tab
|
||||||
K("RC-Comma"): None, # Disable preferences shortcut since none availabe
|
K("RC-Comma"): None, # Disable preferences shortcut since none available
|
||||||
},"Overrides for Pantheon - Finder")
|
},"Overrides for Pantheon - Finder")
|
||||||
|
|
||||||
# Keybindings overrides for Nautilus
|
# Keybindings overrides for Nautilus
|
||||||
@@ -297,9 +308,9 @@ define_keymap(re.compile("org.gnome.nautilus|nautilus", re.IGNORECASE),{
|
|||||||
K("RC-comma"): K("RC-comma"), # Overrides "Open preferences dialog" shortcut below
|
K("RC-comma"): K("RC-comma"), # Overrides "Open preferences dialog" shortcut below
|
||||||
},"Overrides for Nautilus - Finder")
|
},"Overrides for Nautilus - Finder")
|
||||||
|
|
||||||
# Keybindings overrides for PCManFM
|
# Keybindings overrides for PCManFM and PCManFM-Qt
|
||||||
# (overrides some bindings from general file manager code block below)
|
# (overrides some bindings from general file manager code block below)
|
||||||
define_keymap(re.compile("pcmanfm", re.IGNORECASE),{
|
define_keymap(re.compile("pcmanfm|pcmanfm-qt", re.IGNORECASE),{
|
||||||
K("RC-Backspace"): [K("Delete"),K("Enter")], # Move to Trash (delete, bypass dialog)
|
K("RC-Backspace"): [K("Delete"),K("Enter")], # Move to Trash (delete, bypass dialog)
|
||||||
},"Overrides for PCManFM - Finder")
|
},"Overrides for PCManFM - Finder")
|
||||||
|
|
||||||
@@ -334,7 +345,7 @@ filemanagers = [
|
|||||||
"thunar",
|
"thunar",
|
||||||
]
|
]
|
||||||
filemanagers = [filemanager.casefold() for filemanager in filemanagers]
|
filemanagers = [filemanager.casefold() for filemanager in filemanagers]
|
||||||
filemanagerStr = "|".join(str(x) for x in filemanagers)
|
filemanagerStr = "|".join(str('^'+x+'$') for x in filemanagers)
|
||||||
|
|
||||||
# Currently supported Linux file managers (file browsers):
|
# Currently supported Linux file managers (file browsers):
|
||||||
#
|
#
|
||||||
@@ -431,11 +442,13 @@ define_keymap(lambda wm_class: wm_class.casefold() not in remotes,{
|
|||||||
# K("Super-Left"):K("C-M-Left"), # 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-Q"): K("M-F4"), # Default SL - not-popos
|
||||||
K("RC-H"):K("Super-h"), # Default SL - Minimize app (gnome/budgie/popos/fedora)
|
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("M-Tab"): pass_through_key, # Default - Cmd Tab - App Switching Default
|
||||||
K("RC-Tab"): K("M-Tab"), # Default not-xfce4 - 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 not-xfce4 - 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-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-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-Right"):K("Super-Page_Up"), # SL - Change workspace (ubuntu/fedora)
|
||||||
# K("Super-Left"):K("Super-Page_Down"), # SL - Change workspace (ubuntu/fedora)
|
# K("Super-Left"):K("Super-Page_Down"), # SL - Change workspace (ubuntu/fedora)
|
||||||
# K("Super-Right"):K("Super-C-Up"), # SL - Change workspace (popos)
|
# K("Super-Right"):K("Super-C-Up"), # SL - Change workspace (popos)
|
||||||
@@ -451,10 +464,6 @@ define_keymap(lambda wm_class: wm_class.casefold() not in remotes,{
|
|||||||
# Basic App hotkey functions
|
# Basic App hotkey functions
|
||||||
# K("RC-H"):K("M-F9"), # SL - Minimize app xfce4
|
# K("RC-H"):K("M-F9"), # SL - Minimize app xfce4
|
||||||
# K("RC-LC-f"):K("Super-PAGE_DOWN"), # SL - Minimize app manjaro
|
# 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
|
# In-App Tab switching
|
||||||
# K("M-Tab"): K("C-Tab"), # Chromebook/IBM - 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-Shift-Tab"): K("C-Shift-Tab"), # Chromebook/IBM - In-App Tab switching
|
||||||
@@ -650,6 +659,9 @@ define_keymap(re.compile("Io.elementary.terminal|kitty", re.IGNORECASE),{
|
|||||||
}, "Elementary Terminal tab switching")
|
}, "Elementary Terminal tab switching")
|
||||||
|
|
||||||
define_keymap(re.compile(termStr, re.IGNORECASE),{
|
define_keymap(re.compile(termStr, re.IGNORECASE),{
|
||||||
|
K("LC-RC-f"): K("M-F10"), # Toggle window maximized state
|
||||||
|
# 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-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-Left"), # Default SL - Change workspace (budgie)
|
||||||
# K("LC-Left"):K("C-M-End"), # SL - Change workspace xfce4
|
# K("LC-Left"):K("C-M-End"), # SL - Change workspace xfce4
|
||||||
@@ -664,15 +676,11 @@ define_keymap(re.compile(termStr, re.IGNORECASE),{
|
|||||||
K("LC-Tab") : K("LC-PAGE_DOWN"),
|
K("LC-Tab") : K("LC-PAGE_DOWN"),
|
||||||
K("LC-Shift-Tab") : K("LC-PAGE_UP"),
|
K("LC-Shift-Tab") : K("LC-PAGE_UP"),
|
||||||
K("LC-Grave") : K("LC-PAGE_UP"),
|
K("LC-Grave") : K("LC-PAGE_UP"),
|
||||||
# K("M-Tab"): pass_through_key, # Default not-xfce4 - Cmd Tab - App Switching Default
|
# K("M-Tab"): pass_through_key, # Default - Cmd Tab - App Switching Default
|
||||||
# K("RC-Tab"): K("M-Tab"), # Default not-xfce4 - 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 not-xfce4 - Cmd Tab - App Switching Default
|
# K("RC-Shift-Tab"): K("M-Shift-Tab"), # Default - Cmd Tab - App Switching Default
|
||||||
# Cmd Tab - App Switching Default
|
|
||||||
# K("RC-Tab"): K("RC-backslash"), # xfce4
|
|
||||||
# K("RC-Shift-Tab"): K("RC-Shift-backslash"), # xfce4
|
|
||||||
# K("RC-Grave"): K("RC-Shift-backslash"), # xfce4
|
|
||||||
# Converts Cmd to use Ctrl-Shift
|
# Converts Cmd to use Ctrl-Shift
|
||||||
K("RC-MINUS"): K("C-Shift-MINUS"),
|
K("RC-MINUS"): K("C-MINUS"),
|
||||||
K("RC-EQUAL"): K("C-Shift-EQUAL"),
|
K("RC-EQUAL"): K("C-Shift-EQUAL"),
|
||||||
K("RC-BACKSPACE"): K("C-Shift-BACKSPACE"),
|
K("RC-BACKSPACE"): K("C-Shift-BACKSPACE"),
|
||||||
K("RC-W"): K("C-Shift-W"),
|
K("RC-W"): K("C-Shift-W"),
|
||||||
@@ -698,7 +706,6 @@ define_keymap(re.compile(termStr, re.IGNORECASE),{
|
|||||||
K("RC-SEMICOLON"): K("C-Shift-SEMICOLON"),
|
K("RC-SEMICOLON"): K("C-Shift-SEMICOLON"),
|
||||||
K("RC-APOSTROPHE"): K("C-Shift-APOSTROPHE"),
|
K("RC-APOSTROPHE"): K("C-Shift-APOSTROPHE"),
|
||||||
K("RC-GRAVE"): K("C-Shift-GRAVE"),
|
K("RC-GRAVE"): K("C-Shift-GRAVE"),
|
||||||
K("RC-BACKSLASH"): K("C-Shift-BACKSLASH"),
|
|
||||||
K("RC-Z"): K("C-Shift-Z"),
|
K("RC-Z"): K("C-Shift-Z"),
|
||||||
K("RC-X"): K("C-Shift-X"),
|
K("RC-X"): K("C-Shift-X"),
|
||||||
K("RC-C"): K("C-Shift-C"),
|
K("RC-C"): K("C-Shift-C"),
|
||||||
|
@@ -1,4 +1,7 @@
|
|||||||
# /etc/sudoers.d/limitedadmins
|
# /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} restart xkeysnail
|
||||||
%{username} ALL=NOPASSWD: {systemctl} start xkeysnail
|
%{username} ALL=NOPASSWD: {systemctl} start xkeysnail
|
||||||
%{username} ALL=NOPASSWD: {systemctl} stop xkeysnail
|
%{username} ALL=NOPASSWD: {systemctl} stop xkeysnail
|
||||||
@@ -6,5 +9,6 @@
|
|||||||
%{username} ALL=(root) NOPASSWD: /usr/local/bin/logoff.sh
|
%{username} ALL=(root) NOPASSWD: /usr/local/bin/logoff.sh
|
||||||
%{username} ALL=NOPASSWD: {pkill} -f logoff
|
%{username} ALL=NOPASSWD: {pkill} -f logoff
|
||||||
%{username} ALL=NOPASSWD: {pkill} -f bin/xkeysnail
|
%{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
|
%{username} ALL=NOPASSWD: {systemctl} is-active --quiet xkeysnail
|
||||||
|
%{username} ALL=NOPASSWD: /usr/lib/systemd/system/xkeysnail.service
|
||||||
|
@@ -29,7 +29,15 @@ APPINDICATOR_ID = 'Kinto'
|
|||||||
class Indicator():
|
class Indicator():
|
||||||
|
|
||||||
global child_pid
|
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("export TERM=xterm-color;while :; do clear; pgrep 'xkeysnail' && echo 'active'; sleep 2; done", stdout=PIPE, shell=True)
|
||||||
|
else:
|
||||||
|
kinto_status = Popen("export TERM=xterm-color;while :; do clear; systemctl is-active xkeysnail; sleep 2; done", stdout=PIPE, shell=True)
|
||||||
child_pid = kinto_status.pid
|
child_pid = kinto_status.pid
|
||||||
|
|
||||||
homedir = os.path.expanduser("~")
|
homedir = os.path.expanduser("~")
|
||||||
@@ -42,43 +50,51 @@ class Indicator():
|
|||||||
autostart_bool = False
|
autostart_bool = False
|
||||||
menu = Gtk.Menu()
|
menu = Gtk.Menu()
|
||||||
menukb = Gtk.Menu()
|
menukb = Gtk.Menu()
|
||||||
checkbox_autostart = Gtk.CheckMenuItem('Autostart')
|
checkbox_autostart = Gtk.CheckMenuItem(label='Autostart')
|
||||||
restart = Gtk.MenuItem('Restart')
|
restart = Gtk.MenuItem(label='Restart')
|
||||||
stop = Gtk.MenuItem('Stop')
|
stop = Gtk.MenuItem(label='Stop')
|
||||||
keyboards = Gtk.MenuItem('Keyboard Types')
|
keyboards = Gtk.MenuItem(label='Keyboard Types')
|
||||||
keyboards.set_submenu(menukb)
|
keyboards.set_submenu(menukb)
|
||||||
winkb = Gtk.RadioMenuItem(label='Windows')
|
winkb = Gtk.RadioMenuItem(label='Windows')
|
||||||
mackb = Gtk.RadioMenuItem(label='Apple',group=winkb)
|
mackb = Gtk.RadioMenuItem(label='Apple',group=winkb)
|
||||||
chromekb = Gtk.RadioMenuItem(label='Chromebook',group=winkb)
|
chromekb = Gtk.RadioMenuItem(label='Chromebook',group=winkb)
|
||||||
ibmkb = Gtk.RadioMenuItem(label='IBM (No Super/Win key)',group=winkb)
|
ibmkb = Gtk.RadioMenuItem(label='IBM (No Super/Win key)',group=winkb)
|
||||||
winmackb = Gtk.RadioMenuItem(label='Windows & Apple*',group=winkb)
|
winmackb = Gtk.RadioMenuItem(label='Windows & Apple*',group=winkb)
|
||||||
edit = Gtk.MenuItem('Customize')
|
edit = Gtk.MenuItem(label='Customize')
|
||||||
edit_submenu = Gtk.Menu()
|
edit_submenu = Gtk.Menu()
|
||||||
edit.set_submenu(edit_submenu)
|
edit.set_submenu(edit_submenu)
|
||||||
tweaks = Gtk.MenuItem('Tweaks')
|
tweaks = Gtk.MenuItem(label='Tweaks')
|
||||||
rightmod = Gtk.CheckButton('AltGr on Right Cmd')
|
rightmod = Gtk.CheckButton(label='AltGr on Right Cmd')
|
||||||
vsc2st3 = Gtk.CheckButton('ST3 hotkeys for VS Code')
|
vsc2st3 = Gtk.CheckButton(label='ST3 hotkeys for VS Code')
|
||||||
caps2esc = Gtk.CheckButton('Capslock is Escape when tapped, Cmd when held')
|
caps2esc = Gtk.CheckButton(label='Capslock is Escape when tapped, Cmd when held')
|
||||||
caps2cmd = Gtk.CheckButton('Capslock is Cmd')
|
caps2cmd = Gtk.CheckButton(label='Capslock is Cmd')
|
||||||
button_config = Gtk.MenuItem('Kinto Config (shortcuts)')
|
button_config = Gtk.MenuItem(label='Kinto Config (shortcuts)')
|
||||||
service = Gtk.MenuItem('Kinto Service')
|
service = Gtk.MenuItem(label='Kinto Service')
|
||||||
# Keyboard type set below
|
# Keyboard type set below
|
||||||
button_syskb = Gtk.MenuItem('System Shortcuts')
|
button_syskb = Gtk.MenuItem(label='System Shortcuts')
|
||||||
button_region = Gtk.MenuItem('Change Language')
|
button_region = Gtk.MenuItem(label='Change Language')
|
||||||
systray = Gtk.CheckMenuItem('Tray Enabled')
|
systray = Gtk.CheckMenuItem(label='Tray Enabled')
|
||||||
helpm = Gtk.MenuItem('Help')
|
helpm = Gtk.MenuItem(label='Help')
|
||||||
help_submenu = Gtk.Menu()
|
help_submenu = Gtk.Menu()
|
||||||
helpm.set_submenu(help_submenu)
|
helpm.set_submenu(help_submenu)
|
||||||
debug = Gtk.MenuItem('Debug')
|
debug = Gtk.MenuItem(label='Debug')
|
||||||
opengui = Gtk.MenuItem('Open Kinto')
|
opengui = Gtk.MenuItem(label='Open Kinto')
|
||||||
support = Gtk.MenuItem("Support")
|
support = Gtk.MenuItem(label='Support')
|
||||||
about = Gtk.MenuItem('About')
|
about = Gtk.MenuItem(label='About')
|
||||||
global restartsvc
|
global restartsvc
|
||||||
restartsvc = False
|
restartsvc = False
|
||||||
unixts = int(time.time())
|
unixts = int(time.time())
|
||||||
last_status = ""
|
last_status = ''
|
||||||
|
|
||||||
def __init__(self):
|
def __init__(self):
|
||||||
|
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 = 1
|
||||||
|
if sysv:
|
||||||
|
res = Popen(['pgrep','xkeysnail'])
|
||||||
|
else:
|
||||||
res = Popen(['sudo', 'systemctl','is-active','--quiet','xkeysnail'])
|
res = Popen(['sudo', 'systemctl','is-active','--quiet','xkeysnail'])
|
||||||
res.wait()
|
res.wait()
|
||||||
|
|
||||||
@@ -183,7 +199,7 @@ class Indicator():
|
|||||||
# self.button_region.connect('activate',self.setRegion)
|
# self.button_region.connect('activate',self.setRegion)
|
||||||
# self.menu.append(self.button_region)
|
# self.menu.append(self.button_region)
|
||||||
|
|
||||||
item_quit = Gtk.MenuItem('Close')
|
item_quit = Gtk.MenuItem(label='Close')
|
||||||
item_quit.connect('activate', quit)
|
item_quit.connect('activate', quit)
|
||||||
self.menu.append(item_quit)
|
self.menu.append(item_quit)
|
||||||
self.menu.show_all()
|
self.menu.show_all()
|
||||||
@@ -401,10 +417,10 @@ class Indicator():
|
|||||||
self.lbl = Gtk.Label()
|
self.lbl = Gtk.Label()
|
||||||
global restartsvc
|
global restartsvc
|
||||||
restartsvc = False
|
restartsvc = False
|
||||||
self.rightmod = Gtk.CheckButton('AltGr on Right Cmd')
|
self.rightmod = Gtk.CheckButton(label='AltGr on Right Cmd')
|
||||||
self.vsc2st3 = Gtk.CheckButton('ST3 hotkeys for VS Code')
|
self.vsc2st3 = Gtk.CheckButton(label='ST3 hotkeys for VS Code')
|
||||||
self.caps2esc = Gtk.CheckButton('Capslock is Escape when tapped, Cmd when held')
|
self.caps2esc = Gtk.CheckButton(label='Capslock is Escape when tapped, Cmd when held')
|
||||||
self.caps2cmd = Gtk.CheckButton('Capslock is Cmd')
|
self.caps2cmd = Gtk.CheckButton(label='Capslock is Cmd')
|
||||||
|
|
||||||
if rightmod_result == 0:
|
if rightmod_result == 0:
|
||||||
self.rightmod.set_active(True)
|
self.rightmod.set_active(True)
|
||||||
@@ -446,6 +462,9 @@ class Indicator():
|
|||||||
global restartsvc
|
global restartsvc
|
||||||
if restartsvc == True:
|
if restartsvc == True:
|
||||||
try:
|
try:
|
||||||
|
if sysv:
|
||||||
|
restartcmd = ['sudo', '-E','/etc/init.d/kinto','restart']
|
||||||
|
else:
|
||||||
restartcmd = ['sudo', 'systemctl','restart','xkeysnail']
|
restartcmd = ['sudo', 'systemctl','restart','xkeysnail']
|
||||||
Popen(restartcmd)
|
Popen(restartcmd)
|
||||||
restartsvc = False
|
restartsvc = False
|
||||||
@@ -555,7 +574,11 @@ class Indicator():
|
|||||||
return
|
return
|
||||||
|
|
||||||
def runRestart(self,button):
|
def runRestart(self,button):
|
||||||
|
global sysv
|
||||||
try:
|
try:
|
||||||
|
if sysv:
|
||||||
|
stop = Popen(['sudo', '-E','/etc/init.d/kinto','stop'])
|
||||||
|
else:
|
||||||
stop = Popen(['sudo', 'systemctl','stop','xkeysnail'])
|
stop = Popen(['sudo', 'systemctl','stop','xkeysnail'])
|
||||||
stop.wait()
|
stop.wait()
|
||||||
time.sleep(1)
|
time.sleep(1)
|
||||||
@@ -567,12 +590,19 @@ class Indicator():
|
|||||||
pkillxkey = Popen(['sudo', 'pkill','-f','bin/xkeysnail'])
|
pkillxkey = Popen(['sudo', 'pkill','-f','bin/xkeysnail'])
|
||||||
pkillxkey.wait()
|
pkillxkey.wait()
|
||||||
|
|
||||||
|
if sysv:
|
||||||
|
Popen(['sudo', '-E','/etc/init.d/kinto','start'])
|
||||||
|
else:
|
||||||
Popen(['sudo', 'systemctl','start','xkeysnail'])
|
Popen(['sudo', 'systemctl','start','xkeysnail'])
|
||||||
except:
|
except:
|
||||||
Popen(['notify-send','Kinto: Error restarting Kinto!'])
|
Popen(['notify-send','Kinto: Error restarting Kinto!'])
|
||||||
|
|
||||||
def runStop(self,button):
|
def runStop(self,button):
|
||||||
|
global sysv
|
||||||
try:
|
try:
|
||||||
|
if sysv:
|
||||||
|
stop = Popen(['sudo', '-E','/etc/init.d/kinto','stop'])
|
||||||
|
else:
|
||||||
stop = Popen(['sudo', 'systemctl','stop','xkeysnail'])
|
stop = Popen(['sudo', 'systemctl','stop','xkeysnail'])
|
||||||
stop.wait()
|
stop.wait()
|
||||||
time.sleep(1)
|
time.sleep(1)
|
||||||
@@ -689,6 +719,9 @@ class Indicator():
|
|||||||
cmdsTerm = Popen(cmds)
|
cmdsTerm = Popen(cmds)
|
||||||
cmdsTerm.wait()
|
cmdsTerm.wait()
|
||||||
|
|
||||||
|
if sysv:
|
||||||
|
restart = ['sudo', '-E','/etc/init.d/kinto','restart']
|
||||||
|
else:
|
||||||
restart = ['sudo', 'systemctl','restart','xkeysnail']
|
restart = ['sudo', 'systemctl','restart','xkeysnail']
|
||||||
Popen(restart)
|
Popen(restart)
|
||||||
|
|
||||||
|
5
linux/xkb/.xkb/symbols/chromebook
Normal file
5
linux/xkb/.xkb/symbols/chromebook
Normal file
@@ -0,0 +1,5 @@
|
|||||||
|
partial modifier_keys
|
||||||
|
xkb_symbols "swap_lalt_lctrl" {
|
||||||
|
replace key <LALT> { [ Control_L, Control_L ] };
|
||||||
|
replace key <LCTL> { [ Alt_L, Meta_L ] };
|
||||||
|
};
|
781
linux/xkb/.xkb/symbols/mac_gui
Normal file
781
linux/xkb/.xkb/symbols/mac_gui
Normal file
@@ -0,0 +1,781 @@
|
|||||||
|
// Template
|
||||||
|
//
|
||||||
|
// ONE_LEVEL_CTRL
|
||||||
|
// Base
|
||||||
|
// Shift
|
||||||
|
// Alt
|
||||||
|
// Shift Alt
|
||||||
|
// Control
|
||||||
|
// Shift Control
|
||||||
|
// Super
|
||||||
|
// Shift Super
|
||||||
|
// Control Alt
|
||||||
|
// Super Control
|
||||||
|
// Super Alt
|
||||||
|
// Super Control Alt
|
||||||
|
//
|
||||||
|
// replace key <KEY> {
|
||||||
|
// type[Group1]= "ONE_LEVEL_CTRL",
|
||||||
|
// symbols[Group1]= [
|
||||||
|
// Base,
|
||||||
|
// Alt,
|
||||||
|
// Shift Alt,
|
||||||
|
// Control,
|
||||||
|
// Shift Control,
|
||||||
|
// Super,
|
||||||
|
// Shift Super,
|
||||||
|
// Control Alt,
|
||||||
|
// Super Control",
|
||||||
|
// Super Alt,
|
||||||
|
// Super Control Alt
|
||||||
|
// ],
|
||||||
|
// actions[Group1]= [
|
||||||
|
// NoAction(),
|
||||||
|
// RedirectKey(key=<KEY>,modifiers=NewMod,clearmods=Mod1),
|
||||||
|
// RedirectKey(key=<KEY>,modifiers=NewMod,clearmods=Mod1+Shift),
|
||||||
|
// RedirectKey(key=<KEY>,modifiers=NewMod,clearmods=Control),
|
||||||
|
// RedirectKey(key=<KEY>,modifiers=NewMod,clearmods=Control+Shift),
|
||||||
|
// RedirectKey(key=<KEY>,modifiers=NewMod,clearmods=Super),
|
||||||
|
// RedirectKey(key=<KEY>,modifiers=NewMod,clearmods=Super+Shift),
|
||||||
|
// RedirectKey(key=<KEY>,modifiers=NewMod,clearmods=Control+Alt),
|
||||||
|
// RedirectKey(key=<KEY>,modifiers=NewMod,clearmods=Super+Control),
|
||||||
|
// RedirectKey(key=<KEY>,modifiers=NewMod,clearmods=Super+Mod1),
|
||||||
|
// RedirectKey(key=<KEY>,modifiers=NewMod,clearmods=Control+Mod1)
|
||||||
|
// ]
|
||||||
|
// };
|
||||||
|
hidden partial modifier_keys
|
||||||
|
xkb_symbols "swapescape" {
|
||||||
|
key <CAPS> { [ Escape ] };
|
||||||
|
key <ESC> { [ Caps_Lock ] };
|
||||||
|
};
|
||||||
|
hidden partial modifier_keys
|
||||||
|
xkb_symbols "caps_escape" {
|
||||||
|
key <CAPS> { [ Escape ] };
|
||||||
|
};
|
||||||
|
hidden partial modifier_keys
|
||||||
|
xkb_symbols "caps_shiftlock" {
|
||||||
|
replace key <CAPS> { [ Shift_Lock ] };
|
||||||
|
modifier_map Shift { Shift_Lock };
|
||||||
|
};
|
||||||
|
hidden partial modifier_keys
|
||||||
|
xkb_symbols "caps_none" {
|
||||||
|
key <CAPS> { [ VoidSymbol ] };
|
||||||
|
};
|
||||||
|
default partial xkb_symbols "mac_levelssym" {
|
||||||
|
// // Minimize window Cmd + H = Alt + F9
|
||||||
|
// // 2 caveats
|
||||||
|
// // 1 Cmd + H may not pass through on VMs
|
||||||
|
// // 2 may cause conflicts with apps
|
||||||
|
// replace key <AC06> {
|
||||||
|
// type[Group1]= "ONE_LEVEL_CTRL",
|
||||||
|
// symbols[Group1]= [
|
||||||
|
// h,
|
||||||
|
// H,
|
||||||
|
// h,
|
||||||
|
// H,
|
||||||
|
// h
|
||||||
|
// ],
|
||||||
|
// actions[Group1]= [
|
||||||
|
// NoAction(),
|
||||||
|
// NoAction(),
|
||||||
|
// NoAction(),
|
||||||
|
// NoAction(),
|
||||||
|
// RedirectKey(key=<AC06>,modifiers=Super,clearmods=Control)
|
||||||
|
// ]
|
||||||
|
// };
|
||||||
|
// Maximize Window Ctrl + Cmd + F = Alt+F10
|
||||||
|
// Also maps Option + Cmd + F to Control+H for Replace - Sublime
|
||||||
|
// AD03=e,E
|
||||||
|
// AC01=a,A
|
||||||
|
// Ctrl + A - Beginning of Line
|
||||||
|
replace key <AC01> {
|
||||||
|
type[Group1]= "ONE_LEVEL_SUPER",
|
||||||
|
symbols[Group1]= [
|
||||||
|
// Base
|
||||||
|
a,
|
||||||
|
// Shift
|
||||||
|
A,
|
||||||
|
// Super
|
||||||
|
NoSymbol,
|
||||||
|
// Shift Super
|
||||||
|
NoSymbol
|
||||||
|
],
|
||||||
|
actions[Group1]= [
|
||||||
|
NoAction(),
|
||||||
|
NoAction(),
|
||||||
|
RedirectKey(key=<HOME>,clearmods=Super),
|
||||||
|
RedirectKey(key=<HOME>,clearmods=Super)
|
||||||
|
]
|
||||||
|
};
|
||||||
|
// Ctrl + E - End of Line
|
||||||
|
replace key <AD03> {
|
||||||
|
type[Group1]= "ONE_LEVEL_SUPER",
|
||||||
|
symbols[Group1]= [
|
||||||
|
// Base
|
||||||
|
e,
|
||||||
|
// Shift
|
||||||
|
E,
|
||||||
|
// Super
|
||||||
|
NoSymbol,
|
||||||
|
// Shift Super
|
||||||
|
NoSymbol
|
||||||
|
],
|
||||||
|
actions[Group1]= [
|
||||||
|
NoAction(),
|
||||||
|
NoAction(),
|
||||||
|
RedirectKey(key=<END>,clearmods=Super),
|
||||||
|
RedirectKey(key=<END>,clearmods=Super)
|
||||||
|
]
|
||||||
|
};
|
||||||
|
replace key <AC04> {
|
||||||
|
type[Group1]= "ONE_LEVEL_CTRL",
|
||||||
|
symbols[Group1]= [
|
||||||
|
// Base
|
||||||
|
f,
|
||||||
|
// Shift
|
||||||
|
F,
|
||||||
|
// Alt
|
||||||
|
f,
|
||||||
|
// Shift Alt
|
||||||
|
F,
|
||||||
|
// Control
|
||||||
|
f,
|
||||||
|
// Shift Control
|
||||||
|
F,
|
||||||
|
// Super
|
||||||
|
f,
|
||||||
|
// Shift Super
|
||||||
|
F,
|
||||||
|
// Control Alt
|
||||||
|
h
|
||||||
|
// Super Control
|
||||||
|
// ,F10 // Default maximize
|
||||||
|
// // Nothing // KDE maximize
|
||||||
|
// Super Alt
|
||||||
|
// Super Control Alt
|
||||||
|
],
|
||||||
|
actions[Group1]= [
|
||||||
|
// Base
|
||||||
|
NoAction(),
|
||||||
|
// Shift
|
||||||
|
NoAction(),
|
||||||
|
// Alt
|
||||||
|
NoAction(),
|
||||||
|
// Shift Alt
|
||||||
|
NoAction(),
|
||||||
|
// Control
|
||||||
|
NoAction(),
|
||||||
|
// Shift Control
|
||||||
|
NoAction(),
|
||||||
|
// Super
|
||||||
|
NoAction(),
|
||||||
|
// Shift Super
|
||||||
|
NoAction(),
|
||||||
|
// Control Alt
|
||||||
|
RedirectKey(key=<AC06>,clearmods=Mod1)
|
||||||
|
// Super Control - Fullscreen
|
||||||
|
// ,RedirectKey(key=<FK10>,modifiers=Mod1,clearmods=Super+Control) // Default maximize
|
||||||
|
// // Nothing // KDE maximize
|
||||||
|
// Super Alt
|
||||||
|
// Super Control Alt
|
||||||
|
]
|
||||||
|
};
|
||||||
|
// Close App Cmd + Q = Alt + F4
|
||||||
|
replace key <AD01> {
|
||||||
|
type[Group1]= "ONE_LEVEL_CTRL",
|
||||||
|
symbols[Group1]= [
|
||||||
|
// Base
|
||||||
|
q,
|
||||||
|
// Shift
|
||||||
|
Q,
|
||||||
|
// Alt
|
||||||
|
q,
|
||||||
|
// Shift Alt
|
||||||
|
Q,
|
||||||
|
// Control
|
||||||
|
F4
|
||||||
|
],
|
||||||
|
actions[Group1]= [
|
||||||
|
// Base
|
||||||
|
NoAction(),
|
||||||
|
// Shift
|
||||||
|
NoAction(),
|
||||||
|
// Alt
|
||||||
|
NoAction(),
|
||||||
|
// Shift Alt
|
||||||
|
NoAction(),
|
||||||
|
// Control
|
||||||
|
RedirectKey(key=<FK04>,modifiers=Mod1,clearmods=Control)
|
||||||
|
]
|
||||||
|
};
|
||||||
|
// Show Desktop Cmd + F3 = Super + D
|
||||||
|
replace key <FK03> {
|
||||||
|
type[Group1]= "ONE_LEVEL_CTRL",
|
||||||
|
symbols[Group1]= [
|
||||||
|
// Base
|
||||||
|
F3,
|
||||||
|
// Shift
|
||||||
|
F3,
|
||||||
|
// Alt
|
||||||
|
F3,
|
||||||
|
// Shift Alt
|
||||||
|
F3,
|
||||||
|
// Control
|
||||||
|
d
|
||||||
|
],
|
||||||
|
actions[Group1]= [
|
||||||
|
NoAction(),
|
||||||
|
NoAction(),
|
||||||
|
NoAction(),
|
||||||
|
NoAction(),
|
||||||
|
RedirectKey(key=<AC03>,modifiers=Super,clearmods=Control)
|
||||||
|
]
|
||||||
|
};
|
||||||
|
// Fix the G key for Sublime Text
|
||||||
|
replace key <AC05> {
|
||||||
|
type[Group1]= "ONE_LEVEL_CTRL",
|
||||||
|
symbols[Group1]= [
|
||||||
|
// Base
|
||||||
|
g,
|
||||||
|
// Shift
|
||||||
|
G,
|
||||||
|
// Alt
|
||||||
|
g,
|
||||||
|
// Shift Alt
|
||||||
|
G,
|
||||||
|
// Control
|
||||||
|
g,
|
||||||
|
// Shift Control
|
||||||
|
G,
|
||||||
|
// Super
|
||||||
|
NoSymbol,
|
||||||
|
// Shift Super
|
||||||
|
NoSymbol,
|
||||||
|
// Control Alt
|
||||||
|
g,
|
||||||
|
// Super Control
|
||||||
|
g,
|
||||||
|
// Super Alt
|
||||||
|
g,
|
||||||
|
// Super Control Alt
|
||||||
|
g
|
||||||
|
],
|
||||||
|
actions[Group1]= [
|
||||||
|
NoAction(),
|
||||||
|
NoAction(),
|
||||||
|
// Pass G Normally
|
||||||
|
RedirectKey(key=<AC05>),
|
||||||
|
RedirectKey(key=<AC05>),
|
||||||
|
// Find Next
|
||||||
|
RedirectKey(key=<FK03>,clearmods=Control),
|
||||||
|
// Find Previous
|
||||||
|
RedirectKey(key=<FK03>,clearmods=Control),
|
||||||
|
// Sublime Goto Line
|
||||||
|
RedirectKey(key=<AC05>,modifiers=Control,clearmods=Super),
|
||||||
|
NoAction(),
|
||||||
|
// Sublime Quick Find
|
||||||
|
RedirectKey(key=<FK03>,clearmods=Mod1),
|
||||||
|
// Sublime Select All Matches
|
||||||
|
RedirectKey(key=<FK03>,modifiers=Mod1,clearmods=Super+Control),
|
||||||
|
NoAction(),
|
||||||
|
NoAction()
|
||||||
|
]
|
||||||
|
};
|
||||||
|
// LEFT to Begin Line or Beginning of word
|
||||||
|
replace key <LEFT> {
|
||||||
|
type[Group1]= "ONE_LEVEL_CTRL",
|
||||||
|
symbols[Group1]= [
|
||||||
|
// Base
|
||||||
|
Left,
|
||||||
|
// Shift
|
||||||
|
Left,
|
||||||
|
// Alt
|
||||||
|
Left,
|
||||||
|
// Shift Alt
|
||||||
|
Left,
|
||||||
|
// Control
|
||||||
|
NoSymbol,
|
||||||
|
// Shift Control
|
||||||
|
NoSymbol,
|
||||||
|
// Super
|
||||||
|
Left
|
||||||
|
],
|
||||||
|
actions[Group1]= [
|
||||||
|
// Base
|
||||||
|
NoAction(),
|
||||||
|
// Shift
|
||||||
|
NoAction(),
|
||||||
|
// Alt - Wordwise
|
||||||
|
RedirectKey(key=<LEFT>,mods=Control,clearmods=Mod1),
|
||||||
|
// Shift Alt
|
||||||
|
RedirectKey(key=<LEFT>,mods=Control,clearmods=Mod1),
|
||||||
|
// Control
|
||||||
|
RedirectKey(key=<HOME>,clearmods=Control),
|
||||||
|
// Shift Control
|
||||||
|
RedirectKey(key=<HOME>,clearmods=Control),
|
||||||
|
// Super - Change workspace
|
||||||
|
NoAction()
|
||||||
|
]
|
||||||
|
};
|
||||||
|
|
||||||
|
// Right to End of Line or end of word
|
||||||
|
replace key <RGHT> {
|
||||||
|
type[Group1]= "ONE_LEVEL_CTRL",
|
||||||
|
symbols[Group1]= [
|
||||||
|
// Base
|
||||||
|
Right,
|
||||||
|
// Shift
|
||||||
|
Right,
|
||||||
|
// Alt
|
||||||
|
Right,
|
||||||
|
// Shift Alt
|
||||||
|
Right,
|
||||||
|
// Control
|
||||||
|
NoSymbol,
|
||||||
|
// Shift Control
|
||||||
|
NoSymbol,
|
||||||
|
// Super
|
||||||
|
Right
|
||||||
|
],
|
||||||
|
actions[Group1]= [
|
||||||
|
// Base
|
||||||
|
NoAction(),
|
||||||
|
// Shift
|
||||||
|
NoAction(),
|
||||||
|
// Alt - Wordwise
|
||||||
|
RedirectKey(key=<RGHT>,mods=Control,clearmods=Mod1),
|
||||||
|
// Shift Alt
|
||||||
|
RedirectKey(key=<RGHT>,mods=Control,clearmods=Mod1),
|
||||||
|
// Control
|
||||||
|
RedirectKey(key=<END>,clearmods=Control),
|
||||||
|
// Shift Control
|
||||||
|
RedirectKey(key=<END>,clearmods=Control),
|
||||||
|
// Super - Change workspace
|
||||||
|
NoAction()
|
||||||
|
]
|
||||||
|
};
|
||||||
|
|
||||||
|
//Up to Mac Home
|
||||||
|
replace key <UP> {
|
||||||
|
type[Group1]= "ONE_LEVEL_CTRL",
|
||||||
|
symbols[Group1]= [
|
||||||
|
// Base
|
||||||
|
Up,
|
||||||
|
// Shift
|
||||||
|
Up,
|
||||||
|
// Alt
|
||||||
|
Up,
|
||||||
|
// Shift Alt
|
||||||
|
Up,
|
||||||
|
// Control
|
||||||
|
NoSymbol,
|
||||||
|
// Shift Control
|
||||||
|
NoSymbol,
|
||||||
|
// Super
|
||||||
|
Up,
|
||||||
|
// Shift Super
|
||||||
|
Up
|
||||||
|
],
|
||||||
|
actions[Group1]= [
|
||||||
|
// Base
|
||||||
|
NoAction(),
|
||||||
|
// Shift
|
||||||
|
NoAction(),
|
||||||
|
// Alt - Wordwise
|
||||||
|
RedirectKey(key=<UP>,clearmods=Mod1),
|
||||||
|
// Shift Alt
|
||||||
|
// RedirectKey(key=<UP>), // Chromebook multicursor
|
||||||
|
RedirectKey(key=<UP>,clearmods=Mod1), // Default multicursor
|
||||||
|
// Control
|
||||||
|
RedirectKey(key=<HOME>),
|
||||||
|
// Shift Control
|
||||||
|
RedirectKey(key=<HOME>),
|
||||||
|
// Super - Wordwise - Sublime?
|
||||||
|
RedirectKey(key=<PGUP>,clearmods=Super),
|
||||||
|
// Shift Super
|
||||||
|
RedirectKey(key=<UP>,modifiers=Mod1,clearmods=Super)
|
||||||
|
]
|
||||||
|
};
|
||||||
|
|
||||||
|
// Down to Mac End
|
||||||
|
replace key <DOWN> {
|
||||||
|
type[Group1]= "ONE_LEVEL_CTRL",
|
||||||
|
symbols[Group1]= [
|
||||||
|
// Base
|
||||||
|
Down,
|
||||||
|
// Shift
|
||||||
|
Down,
|
||||||
|
// Alt
|
||||||
|
Down,
|
||||||
|
// Shift Alt
|
||||||
|
Down,
|
||||||
|
// Control
|
||||||
|
NoSymbol,
|
||||||
|
// Shift Control
|
||||||
|
NoSymbol,
|
||||||
|
// Super
|
||||||
|
Down,
|
||||||
|
// Shift Super
|
||||||
|
Down
|
||||||
|
],
|
||||||
|
actions[Group1]= [
|
||||||
|
// Base
|
||||||
|
NoAction(),
|
||||||
|
// Shift
|
||||||
|
NoAction(),
|
||||||
|
// Alt - Wordwise
|
||||||
|
RedirectKey(key=<DOWN>,clearmods=Mod1),
|
||||||
|
// Shift Alt
|
||||||
|
RedirectKey(key=<DOWN>,clearmods=Mod1),
|
||||||
|
// Control
|
||||||
|
RedirectKey(key=<END>),
|
||||||
|
// Shift Control
|
||||||
|
RedirectKey(key=<END>),
|
||||||
|
// Super - Wordwise - Sublime?
|
||||||
|
RedirectKey(key=<PGDN>,clearmods=Super),
|
||||||
|
// Shift Super
|
||||||
|
RedirectKey(key=<DOWN>,modifiers=Mod1,clearmods=Super)
|
||||||
|
]
|
||||||
|
};
|
||||||
|
// Alt BKSP to DELETE
|
||||||
|
replace key <BKSP> {
|
||||||
|
type[Group1]= "ONE_LEVEL_CTRL",
|
||||||
|
symbols[Group1]= [
|
||||||
|
BackSpace,
|
||||||
|
BackSpace,
|
||||||
|
BackSpace
|
||||||
|
],
|
||||||
|
actions[Group1]= [
|
||||||
|
NoAction(),
|
||||||
|
NoAction(),
|
||||||
|
RedirectKey(key=<DELE>,clearmods=Mod1)
|
||||||
|
]
|
||||||
|
};
|
||||||
|
// // Full Print Screen
|
||||||
|
// // GalliumOS
|
||||||
|
// replace key <AE03> {
|
||||||
|
// type[Group1]= "ONE_LEVEL_CTRL",
|
||||||
|
// symbols[Group1]= [ 3, 3, 3, F5 ],
|
||||||
|
// actions[Group1]= [ NoAction(), NoAction(), NoAction(), RedirectKey(key=<FK05>,clearmods=Shift) ]
|
||||||
|
// };
|
||||||
|
// // Region Print Screen
|
||||||
|
// // GalliumOS
|
||||||
|
// replace key <AE04> {
|
||||||
|
// type[Group1]= "ONE_LEVEL_CTRL",
|
||||||
|
// symbols[Group1]= [ 4, 4, 4, F5 ],
|
||||||
|
// actions[Group1]= [ NoAction(), NoAction(), NoAction(), RedirectKey(key=<FK05>) ]
|
||||||
|
// };
|
||||||
|
// // Full Print Screen
|
||||||
|
// // Standard Ubuntu
|
||||||
|
// replace key <AE03> {
|
||||||
|
// type[Group1]= "ONE_LEVEL_CTRL",
|
||||||
|
// symbols[Group1]= [ 3, 3, 3, F5 ],
|
||||||
|
// actions[Group1]= [ NoAction(), NoAction(), RedirectKey(key=<PRSC>,clearmods=Shift+Control) ]
|
||||||
|
// };
|
||||||
|
// // Region Print Screen
|
||||||
|
// // Standard Ubuntu
|
||||||
|
// replace key <AE04> {
|
||||||
|
// type[Group1]= "ONE_LEVEL_CTRL",
|
||||||
|
// symbols[Group1]= [ 4, 4, 4, F5 ],
|
||||||
|
// actions[Group1]= [ NoAction(), NoAction(), RedirectKey(key=<PRSC>,clearmods=Control) ]
|
||||||
|
// };
|
||||||
|
};
|
||||||
|
partial xkb_symbols "mac_appcycle_chromebook" {
|
||||||
|
// Cycle App and In App Tab Switching
|
||||||
|
replace key <TAB> {
|
||||||
|
type[Group1]= "ONE_LEVEL_CTRL",
|
||||||
|
symbols[Group1]= [
|
||||||
|
Tab,
|
||||||
|
Tab,
|
||||||
|
Tab,
|
||||||
|
Tab,
|
||||||
|
backslash,
|
||||||
|
backslash,
|
||||||
|
NoSymbol,
|
||||||
|
NoSymbol
|
||||||
|
],
|
||||||
|
actions[Group1]= [
|
||||||
|
NoAction(),
|
||||||
|
NoAction(),
|
||||||
|
// Alt
|
||||||
|
Redirect(key=<TAB>,mods=Control,clearmods=Mod1),
|
||||||
|
// Alt + Shift
|
||||||
|
Redirect(key=<TAB>,mods=Control,clearmods=Mod1),
|
||||||
|
// Control
|
||||||
|
Redirect(key=<BKSL>),
|
||||||
|
// Control+Shift
|
||||||
|
Redirect(key=<BKSL>),
|
||||||
|
// Super
|
||||||
|
NoAction(),
|
||||||
|
// Super + Shift
|
||||||
|
NoAction()
|
||||||
|
]
|
||||||
|
};
|
||||||
|
};
|
||||||
|
partial xkb_symbols "mac_appcycle" {
|
||||||
|
// Cycle App and In App Tab Switching
|
||||||
|
key <FK13> { [ F13 ] };
|
||||||
|
key <FK14> { [ F14 ] };
|
||||||
|
replace key <TAB> {
|
||||||
|
type[Group1]= "ONE_LEVEL_CMD",
|
||||||
|
symbols[Group1]= [
|
||||||
|
Tab,
|
||||||
|
Tab,
|
||||||
|
F14,
|
||||||
|
F13,
|
||||||
|
NoSymbol,
|
||||||
|
NoSymbol
|
||||||
|
],
|
||||||
|
actions[Group1]= [
|
||||||
|
// Base
|
||||||
|
NoAction(),
|
||||||
|
// Shift
|
||||||
|
NoAction(),
|
||||||
|
// Control + Shift
|
||||||
|
Redirect(key=<FK14>),
|
||||||
|
// Control
|
||||||
|
Redirect(key=<FK13>),
|
||||||
|
// Super
|
||||||
|
Redirect(key=<TAB>,mods=Control,clearmods=Mod4+Super),
|
||||||
|
// Super + Shift
|
||||||
|
Redirect(key=<TAB>,mods=Control,clearmods=Mod4+Super)
|
||||||
|
]
|
||||||
|
};
|
||||||
|
};
|
||||||
|
partial xkb_symbols "mac_browsers_chromebook" {
|
||||||
|
// Cycle App and In App Tab Switching
|
||||||
|
replace key <TAB> {
|
||||||
|
type[Group1]= "ONE_LEVEL_CTRL",
|
||||||
|
symbols[Group1]= [
|
||||||
|
Tab,
|
||||||
|
Tab,
|
||||||
|
NoSymbol,
|
||||||
|
NoSymbol,
|
||||||
|
backslash,
|
||||||
|
backslash,
|
||||||
|
NoSymbol,
|
||||||
|
NoSymbol
|
||||||
|
],
|
||||||
|
actions[Group1]= [
|
||||||
|
NoAction(),
|
||||||
|
NoAction(),
|
||||||
|
// Alt
|
||||||
|
Redirect(key=<PGDN>,mods=Control,clearmods=Mod1),
|
||||||
|
// Alt + Shift
|
||||||
|
Redirect(key=<PGUP>,mods=Control,clearmods=Mod1+Shift),
|
||||||
|
// Control
|
||||||
|
Redirect(key=<BKSL>),
|
||||||
|
// Control+Shift
|
||||||
|
Redirect(key=<BKSL>),
|
||||||
|
// Super
|
||||||
|
NoAction(),
|
||||||
|
// Super + Shift
|
||||||
|
NoAction()
|
||||||
|
]
|
||||||
|
};
|
||||||
|
//Up to Mac Home
|
||||||
|
replace key <UP> {
|
||||||
|
type[Group1]= "ONE_LEVEL_CTRL",
|
||||||
|
symbols[Group1]= [
|
||||||
|
Up,
|
||||||
|
Up,
|
||||||
|
Up,
|
||||||
|
Up,
|
||||||
|
NoSymbol,
|
||||||
|
NoSymbol,
|
||||||
|
Up
|
||||||
|
],
|
||||||
|
actions[Group1]= [
|
||||||
|
NoAction(),
|
||||||
|
NoAction(),
|
||||||
|
// Wordwise
|
||||||
|
RedirectKey(key=<UP>,clearmods=Mod1),
|
||||||
|
RedirectKey(key=<UP>,clearmods=Mod1),
|
||||||
|
RedirectKey(key=<HOME>),
|
||||||
|
RedirectKey(key=<HOME>),
|
||||||
|
// Wordwise - Sublime?
|
||||||
|
RedirectKey(key=<PGUP>,clearmods=Super),
|
||||||
|
RedirectKey(key=<UP>,modifiers=Mod1,clearmods=Super)
|
||||||
|
]
|
||||||
|
};
|
||||||
|
// Down to Mac End
|
||||||
|
replace key <DOWN> {
|
||||||
|
type[Group1]= "ONE_LEVEL_CTRL",
|
||||||
|
symbols[Group1]= [
|
||||||
|
Down,
|
||||||
|
Down,
|
||||||
|
Down,
|
||||||
|
Down,
|
||||||
|
NoSymbol,
|
||||||
|
NoSymbol,
|
||||||
|
Down
|
||||||
|
],
|
||||||
|
actions[Group1]= [
|
||||||
|
NoAction(),
|
||||||
|
NoAction(),
|
||||||
|
// Wordwise
|
||||||
|
RedirectKey(key=<DOWN>,clearmods=Mod1),
|
||||||
|
RedirectKey(key=<DOWN>,clearmods=Mod1),
|
||||||
|
RedirectKey(key=<END>),
|
||||||
|
RedirectKey(key=<END>),
|
||||||
|
// Wordwise - Sublime?
|
||||||
|
RedirectKey(key=<PGDN>,clearmods=Super),
|
||||||
|
RedirectKey(key=<DOWN>,modifiers=Mod1,clearmods=Super)
|
||||||
|
]
|
||||||
|
};
|
||||||
|
// Alt BKSP to DELETE
|
||||||
|
replace key <BKSP> {
|
||||||
|
type[Group1]= "ONE_LEVEL_CTRL",
|
||||||
|
symbols[Group1]= [
|
||||||
|
BackSpace,
|
||||||
|
BackSpace,
|
||||||
|
BackSpace
|
||||||
|
],
|
||||||
|
actions[Group1]= [
|
||||||
|
NoAction(),
|
||||||
|
NoAction(),
|
||||||
|
RedirectKey(key=<DELE>,clearmods=Mod1)
|
||||||
|
]
|
||||||
|
};
|
||||||
|
};
|
||||||
|
partial xkb_symbols "mac_browsers" {
|
||||||
|
// Cycle App and In App Tab Switching
|
||||||
|
key <FK13> { [ F13 ] };
|
||||||
|
key <FK14> { [ F14 ] };
|
||||||
|
replace key <TAB> {
|
||||||
|
type[Group1]= "ONE_LEVEL_CMD",
|
||||||
|
symbols[Group1]= [
|
||||||
|
Tab,
|
||||||
|
Tab,
|
||||||
|
F14,
|
||||||
|
F13,
|
||||||
|
NoSymbol,
|
||||||
|
NoSymbol
|
||||||
|
],
|
||||||
|
actions[Group1]= [
|
||||||
|
NoAction(),
|
||||||
|
NoAction(),
|
||||||
|
Redirect(key=<FK14>),
|
||||||
|
Redirect(key=<FK13>),
|
||||||
|
Redirect(key=<PGDN>,mods=Control,clearmods=Mod4+Super),
|
||||||
|
Redirect(key=<PGUP>,mods=Control,clearmods=Mod4+Super+Shift)
|
||||||
|
]
|
||||||
|
};
|
||||||
|
//Up to Mac Home
|
||||||
|
replace key <UP> {
|
||||||
|
type[Group1]= "ONE_LEVEL_CTRL",
|
||||||
|
symbols[Group1]= [
|
||||||
|
Up,
|
||||||
|
Up,
|
||||||
|
Up,
|
||||||
|
Up,
|
||||||
|
NoSymbol,
|
||||||
|
NoSymbol,
|
||||||
|
Up
|
||||||
|
],
|
||||||
|
actions[Group1]= [
|
||||||
|
NoAction(),
|
||||||
|
NoAction(),
|
||||||
|
// Wordwise
|
||||||
|
RedirectKey(key=<UP>,clearmods=Mod1),
|
||||||
|
RedirectKey(key=<UP>,clearmods=Mod1),
|
||||||
|
RedirectKey(key=<HOME>),
|
||||||
|
RedirectKey(key=<HOME>),
|
||||||
|
// Wordwise - Sublime?
|
||||||
|
RedirectKey(key=<PGUP>,clearmods=Super),
|
||||||
|
RedirectKey(key=<UP>,modifiers=Mod1,clearmods=Super)
|
||||||
|
]
|
||||||
|
};
|
||||||
|
// Down to Mac End
|
||||||
|
replace key <DOWN> {
|
||||||
|
type[Group1]= "ONE_LEVEL_CTRL",
|
||||||
|
symbols[Group1]= [
|
||||||
|
Down,
|
||||||
|
Down,
|
||||||
|
Down,
|
||||||
|
Down,
|
||||||
|
NoSymbol,
|
||||||
|
NoSymbol,
|
||||||
|
Down
|
||||||
|
],
|
||||||
|
actions[Group1]= [
|
||||||
|
NoAction(),
|
||||||
|
NoAction(),
|
||||||
|
// Wordwise
|
||||||
|
RedirectKey(key=<DOWN>,clearmods=Mod1),
|
||||||
|
RedirectKey(key=<DOWN>,clearmods=Mod1),
|
||||||
|
RedirectKey(key=<END>),
|
||||||
|
RedirectKey(key=<END>),
|
||||||
|
// Wordwise - Sublime?
|
||||||
|
RedirectKey(key=<PGDN>,clearmods=Super),
|
||||||
|
RedirectKey(key=<DOWN>,modifiers=Mod1,clearmods=Super)
|
||||||
|
]
|
||||||
|
};
|
||||||
|
// Alt BKSP to DELETE
|
||||||
|
replace key <BKSP> {
|
||||||
|
type[Group1]= "ONE_LEVEL_CTRL",
|
||||||
|
symbols[Group1]= [
|
||||||
|
BackSpace,
|
||||||
|
BackSpace,
|
||||||
|
BackSpace
|
||||||
|
],
|
||||||
|
actions[Group1]= [
|
||||||
|
NoAction(),
|
||||||
|
NoAction(),
|
||||||
|
RedirectKey(key=<DELE>,clearmods=Mod1)
|
||||||
|
]
|
||||||
|
};
|
||||||
|
};
|
||||||
|
partial xkb_symbols "mac_chrome" {
|
||||||
|
// Back Button
|
||||||
|
replace key <LEFT> {
|
||||||
|
type[Group1]= "ONE_LEVEL_CTRL",
|
||||||
|
symbols[Group1]= [
|
||||||
|
Left,
|
||||||
|
Left,
|
||||||
|
NoSymbol,
|
||||||
|
NoSymbol,
|
||||||
|
Left
|
||||||
|
],
|
||||||
|
actions[Group1]= [
|
||||||
|
// Base
|
||||||
|
NoAction(),
|
||||||
|
// Shift
|
||||||
|
NoAction(),
|
||||||
|
// Alt
|
||||||
|
RedirectKey(key=<FK18>),
|
||||||
|
// Alt
|
||||||
|
RedirectKey(key=<FK18>),
|
||||||
|
// Control
|
||||||
|
RedirectKey(key=<LEFT>,modifiers=Mod1,clearmods=Control)
|
||||||
|
]
|
||||||
|
};
|
||||||
|
// Forwards Button
|
||||||
|
replace key <RGHT> {
|
||||||
|
type[Group1]= "ONE_LEVEL_CTRL",
|
||||||
|
symbols[Group1]= [
|
||||||
|
// Base
|
||||||
|
Right,
|
||||||
|
// Shift
|
||||||
|
Right,
|
||||||
|
// Alt
|
||||||
|
NoSymbol,
|
||||||
|
// Shift Alt
|
||||||
|
NoSymbol,
|
||||||
|
// Control
|
||||||
|
Right
|
||||||
|
],
|
||||||
|
actions[Group1]= [
|
||||||
|
// Base
|
||||||
|
NoAction(),
|
||||||
|
// Shift
|
||||||
|
NoAction(),
|
||||||
|
// Alt
|
||||||
|
RedirectKey(key=<FK18>),
|
||||||
|
// Shift Alt
|
||||||
|
RedirectKey(key=<FK18>),
|
||||||
|
// Control
|
||||||
|
RedirectKey(key=<RGHT>,modifiers=Mod1,clearmods=Control)
|
||||||
|
]
|
||||||
|
};
|
||||||
|
};
|
210
linux/xkb/.xkb/symbols/mac_term
Normal file
210
linux/xkb/.xkb/symbols/mac_term
Normal file
@@ -0,0 +1,210 @@
|
|||||||
|
default partial xkb_symbols "mac_apple" {
|
||||||
|
key <LWIN> {
|
||||||
|
repeat= no,
|
||||||
|
type= "ONE_LEVEL",
|
||||||
|
symbols[Group1]= [ Control_L ],
|
||||||
|
actions[group1]=[ SetMods(modifiers=Control+Shift) ]
|
||||||
|
};
|
||||||
|
key <RWIN> {
|
||||||
|
repeat= no,
|
||||||
|
type= "ONE_LEVEL",
|
||||||
|
symbols[Group1]= [ Control_R ],
|
||||||
|
actions[group1]=[ SetMods(modifiers=Control+Shift) ]
|
||||||
|
};
|
||||||
|
};
|
||||||
|
partial xkb_symbols "mac_win" {
|
||||||
|
key <LALT> {
|
||||||
|
repeat= no,
|
||||||
|
type= "ONE_LEVEL",
|
||||||
|
symbols[Group1]= [ Hyper_L ],
|
||||||
|
actions[group1]=[ SetMods(modifiers=Shift+Control) ]
|
||||||
|
};
|
||||||
|
key <RALT> {
|
||||||
|
repeat= no,
|
||||||
|
type= "ONE_LEVEL",
|
||||||
|
symbols[Group1]= [ Hyper_R ],
|
||||||
|
actions[group1]=[ SetMods(modifiers=Shift+Control) ]
|
||||||
|
};
|
||||||
|
};
|
||||||
|
partial xkb_symbols "mac_global" {
|
||||||
|
// // Minimize Window Cmd + H = Alt+F9
|
||||||
|
// replace key <AC06> {
|
||||||
|
// type[Group1]= "ONE_LEVEL_CTRL",
|
||||||
|
// symbols[Group1]= [
|
||||||
|
// h,
|
||||||
|
// H,
|
||||||
|
// H
|
||||||
|
// ],
|
||||||
|
// actions[Group1]= [
|
||||||
|
// NoAction(),
|
||||||
|
// NoAction(),
|
||||||
|
// RedirectKey(key=<AC06>,modifiers=Super,clearmods=Control+Shift)
|
||||||
|
// ]
|
||||||
|
// };
|
||||||
|
|
||||||
|
//
|
||||||
|
// Some sort of glitch occurs on shifting F while this segment is active
|
||||||
|
// it is like the Control key is being held down when it isn't.
|
||||||
|
//
|
||||||
|
// // Maximize Window Ctrl + Cmd + F = Alt+F10
|
||||||
|
// replace key <AC04> {
|
||||||
|
// type[Group1]= "ONE_LEVEL_CTRL",
|
||||||
|
// symbols[Group1]= [
|
||||||
|
// f,
|
||||||
|
// F,
|
||||||
|
// F
|
||||||
|
// ],
|
||||||
|
// actions[Group1]= [
|
||||||
|
// // Base
|
||||||
|
// NoAction(),
|
||||||
|
// // Shift
|
||||||
|
// NoAction(),
|
||||||
|
// // Ctrl + Shift
|
||||||
|
// RedirectKey(key=<FK10>,modifiers=Mod1,clearmods=Control+Shift)
|
||||||
|
// ]
|
||||||
|
// };
|
||||||
|
|
||||||
|
// Close App Cmd + Q = Alt + F4
|
||||||
|
replace key <AD01> {
|
||||||
|
type[Group1]= "ONE_LEVEL_CTRL",
|
||||||
|
symbols[Group1]= [
|
||||||
|
q,
|
||||||
|
Q,
|
||||||
|
F4
|
||||||
|
],
|
||||||
|
actions[Group1]= [
|
||||||
|
NoAction(),
|
||||||
|
NoAction(),
|
||||||
|
RedirectKey(key=<FK04>,modifiers=Mod1,clearmods=Control+Shift)
|
||||||
|
]
|
||||||
|
};
|
||||||
|
|
||||||
|
// Show Desktop Cmd + F3 = Super + D
|
||||||
|
replace key <FK03> {
|
||||||
|
type[Group1]= "ONE_LEVEL_CTRL",
|
||||||
|
symbols[Group1]= [
|
||||||
|
F3,
|
||||||
|
F3,
|
||||||
|
D
|
||||||
|
],
|
||||||
|
actions[Group1]= [
|
||||||
|
NoAction(),
|
||||||
|
NoAction(),
|
||||||
|
RedirectKey(key=<AC03>,modifiers=Super,clearmods=Control+Shift)
|
||||||
|
]
|
||||||
|
};
|
||||||
|
|
||||||
|
// Cycle App and In App Tab Switching
|
||||||
|
key <FK13> { [ F13 ] };
|
||||||
|
key <FK14> { [ F14 ] };
|
||||||
|
|
||||||
|
replace key <TAB> {
|
||||||
|
type[Group1]= "ONE_LEVEL_CMD",
|
||||||
|
symbols[Group1]= [
|
||||||
|
Tab,
|
||||||
|
Tab,
|
||||||
|
// F13 // Default cmdtab
|
||||||
|
// F13 // KDE cmdtab
|
||||||
|
// Right // Elementary ecmdtab
|
||||||
|
],
|
||||||
|
actions[Group1]= [
|
||||||
|
NoAction(),
|
||||||
|
NoAction(),
|
||||||
|
// Redirect(key=<FK13>) // Default cmdtab
|
||||||
|
// Redirect(key=<FK13>,clearmods=Shift) // KDE cmdtab
|
||||||
|
// Redirect(key=<RGHT>,mods=Control+Shift,clearmods=Mod4+Super) // Elementary cmdtab
|
||||||
|
]
|
||||||
|
};
|
||||||
|
|
||||||
|
// Page Up
|
||||||
|
replace key <UP> {
|
||||||
|
type[Group1]= "ONE_LEVEL_CTRL",
|
||||||
|
symbols[Group1]= [
|
||||||
|
Up,
|
||||||
|
Up,
|
||||||
|
NoSymbol
|
||||||
|
],
|
||||||
|
actions[Group1]= [
|
||||||
|
NoAction(),
|
||||||
|
NoAction(),
|
||||||
|
RedirectKey(key=<PGUP>,clearmods=Shift+Control)
|
||||||
|
]
|
||||||
|
};
|
||||||
|
|
||||||
|
// Page Down
|
||||||
|
replace key <DOWN> {
|
||||||
|
type[Group1]= "ONE_LEVEL_CTRL",
|
||||||
|
symbols[Group1]= [
|
||||||
|
Down,
|
||||||
|
Down,
|
||||||
|
NoSymbol
|
||||||
|
],
|
||||||
|
actions[Group1]= [
|
||||||
|
NoAction(),
|
||||||
|
NoAction(),
|
||||||
|
RedirectKey(key=<PGDN>,clearmods=Shift+Control)
|
||||||
|
]
|
||||||
|
};
|
||||||
|
// HOME
|
||||||
|
replace key <LEFT> {
|
||||||
|
type[Group1]= "ONE_LEVEL_CMD",
|
||||||
|
symbols[Group1]= [
|
||||||
|
Left,
|
||||||
|
Left,
|
||||||
|
NoSymbol,
|
||||||
|
Left
|
||||||
|
],
|
||||||
|
actions[Group1]= [
|
||||||
|
NoAction(),
|
||||||
|
NoAction(),
|
||||||
|
RedirectKey(key=<HOME>,clearmods=Shift+Control),
|
||||||
|
RedirectKey(key=<LEFT>,mods=Super,clearmods=Control)
|
||||||
|
]
|
||||||
|
};
|
||||||
|
// END
|
||||||
|
replace key <RGHT> {
|
||||||
|
type[Group1]= "ONE_LEVEL_CMD",
|
||||||
|
symbols[Group1]= [
|
||||||
|
Right,
|
||||||
|
Right,
|
||||||
|
NoSymbol,
|
||||||
|
Right
|
||||||
|
],
|
||||||
|
actions[Group1]= [
|
||||||
|
NoAction(),
|
||||||
|
NoAction(),
|
||||||
|
RedirectKey(key=<END>,clearmods=Shift+Control),
|
||||||
|
RedirectKey(key=<RGHT>,mods=Super,clearmods=Control)
|
||||||
|
]
|
||||||
|
};
|
||||||
|
// Full Print Screen
|
||||||
|
// Standard Ubuntu
|
||||||
|
replace key <AE03> {
|
||||||
|
type[Group1]= "ONE_LEVEL_CMD",
|
||||||
|
symbols[Group1]= [
|
||||||
|
3,
|
||||||
|
numbersign,
|
||||||
|
NoSymbol
|
||||||
|
],
|
||||||
|
actions[Group1]= [
|
||||||
|
NoAction(),
|
||||||
|
NoAction(),
|
||||||
|
RedirectKey(key=<PRSC>,clearmods=Shift+Control)
|
||||||
|
]
|
||||||
|
};
|
||||||
|
// Region Print Screen
|
||||||
|
// Standard Ubuntu
|
||||||
|
replace key <AE04> {
|
||||||
|
type[Group1]= "ONE_LEVEL_CMD",
|
||||||
|
symbols[Group1]= [
|
||||||
|
4,
|
||||||
|
dollar,
|
||||||
|
NoSymbol
|
||||||
|
],
|
||||||
|
actions[Group1]= [
|
||||||
|
NoAction(),
|
||||||
|
NoAction(),
|
||||||
|
RedirectKey(key=<PRSC>,clearmods=Control)
|
||||||
|
]
|
||||||
|
};
|
||||||
|
};
|
100
linux/xkb/.xkb/symbols/mac_term_chromebook
Normal file
100
linux/xkb/.xkb/symbols/mac_term_chromebook
Normal file
@@ -0,0 +1,100 @@
|
|||||||
|
default partial xkb_symbols "mac_levelssym" {
|
||||||
|
key <LALT> {
|
||||||
|
repeat= no,
|
||||||
|
type= "ONE_LEVEL",
|
||||||
|
symbols[Group1]= [ Hyper_L ],
|
||||||
|
actions[group1]=[ SetMods(modifiers=Shift+Control) ]
|
||||||
|
};
|
||||||
|
key <RALT> {
|
||||||
|
repeat= no,
|
||||||
|
type= "ONE_LEVEL",
|
||||||
|
symbols[Group1]= [ Hyper_R ],
|
||||||
|
actions[group1]=[ SetMods(modifiers=Shift+Control) ]
|
||||||
|
};
|
||||||
|
// Page Up
|
||||||
|
replace key <UP> {
|
||||||
|
type[Group1]= "ONE_LEVEL_CTRL",
|
||||||
|
symbols[Group1]= [
|
||||||
|
Up,
|
||||||
|
Up,
|
||||||
|
NoSymbol
|
||||||
|
],
|
||||||
|
actions[Group1]= [
|
||||||
|
NoAction(),
|
||||||
|
NoAction(),
|
||||||
|
RedirectKey(key=<PGUP>,clearmods=Shift+Control)
|
||||||
|
]
|
||||||
|
};
|
||||||
|
// Page Down
|
||||||
|
replace key <DOWN> {
|
||||||
|
type[Group1]= "ONE_LEVEL_CTRL",
|
||||||
|
symbols[Group1]= [
|
||||||
|
Down,
|
||||||
|
Down,
|
||||||
|
NoSymbol
|
||||||
|
],
|
||||||
|
actions[Group1]= [
|
||||||
|
NoAction(),
|
||||||
|
NoAction(),
|
||||||
|
RedirectKey(key=<PGDN>,clearmods=Shift+Control)
|
||||||
|
]
|
||||||
|
};
|
||||||
|
// HOME
|
||||||
|
replace key <LEFT> {
|
||||||
|
type[Group1]= "ONE_LEVEL_CTRL",
|
||||||
|
symbols[Group1]= [
|
||||||
|
Left,
|
||||||
|
Left,
|
||||||
|
NoSymbol
|
||||||
|
],
|
||||||
|
actions[Group1]= [
|
||||||
|
NoAction(),
|
||||||
|
NoAction(),
|
||||||
|
RedirectKey(key=<HOME>,clearmods=Shift+Control)
|
||||||
|
]
|
||||||
|
};
|
||||||
|
// END
|
||||||
|
replace key <RGHT> {
|
||||||
|
type[Group1]= "ONE_LEVEL_CTRL",
|
||||||
|
symbols[Group1]= [
|
||||||
|
Right,
|
||||||
|
Right,
|
||||||
|
NoSymbol
|
||||||
|
],
|
||||||
|
actions[Group1]= [
|
||||||
|
NoAction(),
|
||||||
|
NoAction(),
|
||||||
|
RedirectKey(key=<END>,clearmods=Shift+Control)
|
||||||
|
]
|
||||||
|
};
|
||||||
|
// Full Print Screen
|
||||||
|
// GalliumOS
|
||||||
|
replace key <AE03> {
|
||||||
|
type[Group1]= "ONE_LEVEL_CTRL",
|
||||||
|
symbols[Group1]= [
|
||||||
|
3,
|
||||||
|
numbersign,
|
||||||
|
F5
|
||||||
|
],
|
||||||
|
actions[Group1]= [
|
||||||
|
NoAction(),
|
||||||
|
NoAction(),
|
||||||
|
RedirectKey(key=<FK05>,clearmods=Shift)
|
||||||
|
]
|
||||||
|
};
|
||||||
|
// Region Print Screen
|
||||||
|
// GalliumOS
|
||||||
|
replace key <AE04> {
|
||||||
|
type[Group1]= "ONE_LEVEL_CTRL",
|
||||||
|
symbols[Group1]= [
|
||||||
|
4,
|
||||||
|
dollar,
|
||||||
|
F5
|
||||||
|
],
|
||||||
|
actions[Group1]= [
|
||||||
|
NoAction(),
|
||||||
|
NoAction(),
|
||||||
|
RedirectKey(key=<FK05>)
|
||||||
|
]
|
||||||
|
};
|
||||||
|
};
|
53
linux/xkb/.xkb/types/mac_gui
Normal file
53
linux/xkb/.xkb/types/mac_gui
Normal file
@@ -0,0 +1,53 @@
|
|||||||
|
default partial xkb_types "addmac_levels" {
|
||||||
|
Virtual_modifiers Super;
|
||||||
|
type "ONE_LEVEL_CTRL" {
|
||||||
|
modifiers = Shift+Mod1+Super+Control;
|
||||||
|
map[Shift] = Level2;
|
||||||
|
map[Mod1] = Level3;
|
||||||
|
map[Shift+Mod1] = Level4;
|
||||||
|
map[Control] = Level5;
|
||||||
|
map[Shift+Control] = Level6;
|
||||||
|
map[Super] = Level7;
|
||||||
|
map[Shift+Super] = Level8;
|
||||||
|
map[Mod1+Control] = 9;
|
||||||
|
map[Super+Control] = 10;
|
||||||
|
map[Super+Mod1] = 11;
|
||||||
|
map[Super+Mod1+Control] = 12;
|
||||||
|
level_name[Level1] = "Base";
|
||||||
|
level_name[Level2] = "Shift";
|
||||||
|
level_name[Level3] = "Alt";
|
||||||
|
level_name[Level4] = "Shift Alt";
|
||||||
|
level_name[Level5] = "Control";
|
||||||
|
level_name[Level6] = "Shift Control";
|
||||||
|
level_name[Level7] = "Super";
|
||||||
|
level_name[Level8] = "Shift Super";
|
||||||
|
level_name[9] = "Control Alt";
|
||||||
|
level_name[10] = "Super Control";
|
||||||
|
level_name[11] = "Super Alt";
|
||||||
|
level_name[12] = "Super Control Alt";
|
||||||
|
};
|
||||||
|
type "ONE_LEVEL_CMD" {
|
||||||
|
modifiers = Shift+Control+Super;
|
||||||
|
map[Shift] = Level2;
|
||||||
|
map[Shift+Control] = Level3;
|
||||||
|
map[Control] = Level4;
|
||||||
|
map[Super] = Level5;
|
||||||
|
map[Shift+Super] = Level6;
|
||||||
|
level_name[Level1] = "Base";
|
||||||
|
level_name[Level2] = "Shift";
|
||||||
|
level_name[Level3] = "Control Shift";
|
||||||
|
level_name[Level4] = "Control";
|
||||||
|
level_name[Level5] = "Super";
|
||||||
|
level_name[Level6] = "Super Shift";
|
||||||
|
};
|
||||||
|
type "ONE_LEVEL_SUPER" {
|
||||||
|
modifiers = Shift+Super;
|
||||||
|
map[Shift] = Level2;
|
||||||
|
map[Super] = Level3;
|
||||||
|
map[Shift+Super] = Level4;
|
||||||
|
level_name[Level1] = "Base";
|
||||||
|
level_name[Level2] = "Shift";
|
||||||
|
level_name[Level3] = "Super";
|
||||||
|
level_name[Level4] = "Super Shift";
|
||||||
|
};
|
||||||
|
};
|
53
linux/xkb/.xkb/types/mac_term
Normal file
53
linux/xkb/.xkb/types/mac_term
Normal file
@@ -0,0 +1,53 @@
|
|||||||
|
default partial xkb_types "addmac_levels" {
|
||||||
|
Virtual_modifiers Super;
|
||||||
|
type "ONE_LEVEL_CTRL" {
|
||||||
|
modifiers = Shift+Mod1+Super+Control;
|
||||||
|
map[Shift] = Level2;
|
||||||
|
map[Shift+Control] = Level3;
|
||||||
|
// map[Mod1] = Level4;
|
||||||
|
map[Shift+Mod1] = Level5;
|
||||||
|
map[Control] = Level6;
|
||||||
|
map[Super] = Level7;
|
||||||
|
map[Shift+Super] = Level8;
|
||||||
|
map[Mod1+Control] = 9;
|
||||||
|
map[Super+Control] = 10;
|
||||||
|
map[Super+Mod1] = 11;
|
||||||
|
map[Super+Mod1+Control] = 12;
|
||||||
|
level_name[Level1] = "Base";
|
||||||
|
level_name[Level2] = "Shift";
|
||||||
|
level_name[Level3] = "Shift Control";
|
||||||
|
// level_name[Level4] = "Alt";
|
||||||
|
level_name[Level5] = "Shift Alt";
|
||||||
|
level_name[Level6] = "Control";
|
||||||
|
level_name[Level7] = "Super";
|
||||||
|
level_name[Level8] = "Shift Super";
|
||||||
|
level_name[9] = "Control Alt";
|
||||||
|
level_name[10] = "Super Control";
|
||||||
|
level_name[11] = "Super Alt";
|
||||||
|
level_name[12] = "Super Control Alt";
|
||||||
|
};
|
||||||
|
type "ONE_LEVEL_CMD" {
|
||||||
|
modifiers = Shift+Control+Super;
|
||||||
|
map[Shift] = Level2;
|
||||||
|
map[Shift+Control] = Level3;
|
||||||
|
map[Control] = Level4;
|
||||||
|
map[Super] = Level5;
|
||||||
|
map[Shift+Super] = Level6;
|
||||||
|
level_name[Level1] = "Base";
|
||||||
|
level_name[Level2] = "Shift";
|
||||||
|
level_name[Level3] = "Control Shift";
|
||||||
|
level_name[Level4] = "Control";
|
||||||
|
level_name[Level5] = "Super";
|
||||||
|
level_name[Level6] = "Super Shift";
|
||||||
|
};
|
||||||
|
type "ONE_LEVEL_SUPER" {
|
||||||
|
modifiers = Shift+Super;
|
||||||
|
map[Shift] = Level2;
|
||||||
|
map[Super] = Level3;
|
||||||
|
map[Shift+Super] = Level4;
|
||||||
|
level_name[Level1] = "Base";
|
||||||
|
level_name[Level2] = "Shift";
|
||||||
|
level_name[Level3] = "Super";
|
||||||
|
level_name[Level4] = "Super Shift";
|
||||||
|
};
|
||||||
|
};
|
7
linux/xkb/config/.chrome-nw
Normal file
7
linux/xkb/config/.chrome-nw
Normal file
@@ -0,0 +1,7 @@
|
|||||||
|
"xdotool key --delay 0 --clearmodifiers Alt+Left"
|
||||||
|
Control + Left + Release
|
||||||
|
#Home + release
|
||||||
|
|
||||||
|
"xdotool key --delay 0 --clearmodifiers Alt+Right"
|
||||||
|
Control + Right + Release
|
||||||
|
#End + release
|
5
linux/xkb/config/.chrome-ww
Normal file
5
linux/xkb/config/.chrome-ww
Normal file
@@ -0,0 +1,5 @@
|
|||||||
|
"xdotool key --delay 0 --clearmodifiers Home"
|
||||||
|
Control + Left + Release
|
||||||
|
|
||||||
|
"xdotool key --delay 0 --clearmodifiers End"
|
||||||
|
Control + Right + Release
|
7
linux/xkb/config/.firefox-nw
Normal file
7
linux/xkb/config/.firefox-nw
Normal file
@@ -0,0 +1,7 @@
|
|||||||
|
#"xte 'keydown Control_L' 'key bracketleft' 'keyup Control_L'"
|
||||||
|
"xdotool key --delay 0 --clearmodifiers Control_L+bracketleft"
|
||||||
|
Home + Release
|
||||||
|
|
||||||
|
#"xte 'keydown Control_R' 'key bracketright' 'keyup Control_R'"
|
||||||
|
"xdotool key --delay 0 --clearmodifiers Control_L+bracketright"
|
||||||
|
End + Release
|
10
linux/xkb/config/caret_status.sh
Executable file
10
linux/xkb/config/caret_status.sh
Executable file
@@ -0,0 +1,10 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
mkdir -p /tmp/kinto
|
||||||
|
|
||||||
|
IBUSADD=$(cat ~/.config/ibus/bus/`ls ~/.config/ibus/bus -1rt | tail -n1` | awk -F'IBUS_ADDRESS=' '{print $2}' | xargs)
|
||||||
|
dbus-monitor --address $IBUSADD "path='/org/freedesktop/IBus/Panel',interface='org.freedesktop.IBus.Panel',member='FocusOut'" 2> /dev/null | grep --line-buffered -o -P '(?<=object path \"/org/freedesktop/IBus/InputContext_).*(?=[\"])' |
|
||||||
|
while read ln
|
||||||
|
do
|
||||||
|
printf '%s\n' "$ln" > /tmp/kinto/caret
|
||||||
|
done
|
10
linux/xkb/config/cleanup.sh
Executable file
10
linux/xkb/config/cleanup.sh
Executable file
@@ -0,0 +1,10 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
setxkbmap -option
|
||||||
|
# force command to run silently and report true
|
||||||
|
killall xbindkeys > /dev/null 2>&1 || :
|
||||||
|
# rm /tmp/kinto/caret
|
||||||
|
|
||||||
|
gsettings set org.gnome.desktop.wm.keybindings switch-applications "['<Alt>Tab']"
|
||||||
|
gsettings set org.gnome.desktop.wm.keybindings switch-applications-backward "['<Shift><Alt>Tab']"
|
||||||
|
pkill -f /.config/kinto/xactive.sh
|
86
linux/xkb/config/defaults.json
Normal file
86
linux/xkb/config/defaults.json
Normal file
@@ -0,0 +1,86 @@
|
|||||||
|
{"defaultapps":[{
|
||||||
|
"name":"term",
|
||||||
|
"appnames":[ "Gnome-terminal","konsole","io.elementary.terminal","xfce4-terminal","terminator","sakura","guake","tilda","xterm","eterm","kitty" ]
|
||||||
|
}],
|
||||||
|
"defaulttypes":["windows","mac","chromebook"],
|
||||||
|
"defaults":[{
|
||||||
|
"id": 1,
|
||||||
|
"name":"Windows",
|
||||||
|
"type":"windows",
|
||||||
|
"active": false,
|
||||||
|
"description":"Standard Windows 104 Keyboards",
|
||||||
|
"gui":"xkbcomp -w0 -I$HOME/.xkb ~/.xkb/keymap/kbd.mac.gui $DISPLAY 2>&1 | grep -v XF86FullScreen",
|
||||||
|
"term":"xkbcomp -w0 -I$HOME/.xkb ~/.xkb/keymap/kbd.mac.term $DISPLAY 2>&1 | grep -v XF86FullScreen",
|
||||||
|
"xkb_symbols_gui":"+altwin(ctrl_alt_win)+mac_gui(mac_levelssym)+mac_gui(mac_appcycle)",
|
||||||
|
"xkb_symbols_term":"+altwin(swap_alt_win)+mac_term(mac_win)+mac_term(mac_global)",
|
||||||
|
"xkb_types_gui":"+mac_gui(addmac_levels)",
|
||||||
|
"xkb_types_term":"+mac_term(addmac_levels)"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": 2,
|
||||||
|
"name":"Mac - hid driver (Recommended - Also supports Windows keyboards)",
|
||||||
|
"type":"mac",
|
||||||
|
"active": false,
|
||||||
|
"description":"Standard Mac Keyboards with Apple driver",
|
||||||
|
"gui":"xkbcomp -w0 -I$HOME/.xkb ~/.xkb/keymap/kbd.mac.gui $DISPLAY 2>&1 | grep -v XF86FullScreen",
|
||||||
|
"term":"xkbcomp -w0 -I$HOME/.xkb ~/.xkb/keymap/kbd.mac.term $DISPLAY 2>&1 | grep -v XF86FullScreen",
|
||||||
|
"xkb_symbols_gui":"+altwin(ctrl_alt_win)+mac_gui(mac_levelssym)+mac_gui(mac_appcycle)",
|
||||||
|
"xkb_symbols_term":"+altwin(swap_alt_win)+mac_term(mac_win)+mac_term(mac_global)",
|
||||||
|
"xkb_types_gui":"+mac_gui(addmac_levels)",
|
||||||
|
"xkb_types_term":"+mac_term(addmac_levels)",
|
||||||
|
"hack": "echo '1' | sudo tee -a /sys/module/hid_apple/parameters/swap_opt_cmd;echo 'options hid_apple swap_opt_cmd=1' | sudo tee -a /etc/modprobe.d/hid_apple.conf;sudo update-initramfs -u -k all"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": 3,
|
||||||
|
"name":"Mac Only (VMs & non-official Apple keyboards)",
|
||||||
|
"type":"mac",
|
||||||
|
"active": true,
|
||||||
|
"description":"Standard Mac Keyboards",
|
||||||
|
"gui":"xkbcomp -w0 -I$HOME/.xkb ~/.xkb/keymap/kbd.mac.gui $DISPLAY 2>&1 | grep -v XF86FullScreen",
|
||||||
|
"term":"xkbcomp -w0 -I$HOME/.xkb ~/.xkb/keymap/kbd.mac.term $DISPLAY 2>&1 | grep -v XF86FullScreen",
|
||||||
|
"xkb_symbols_gui":"+ctrl(swap_lwin_lctl)+ctrl(swap_rwin_rctl)+mac_gui(mac_levelssym)+mac_gui(mac_appcycle)",
|
||||||
|
"xkb_symbols_term":"+altwin(alt_super_win)+mac_term(mac_apple)+mac_term(mac_global)",
|
||||||
|
"xkb_types_gui":"+mac_gui(addmac_levels)",
|
||||||
|
"xkb_types_term":"+mac_term(addmac_levels)"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": 4,
|
||||||
|
"name":"Chromebook (xfce)",
|
||||||
|
"type":"chromebook",
|
||||||
|
"active": false,
|
||||||
|
"description":"Standard Chromebook Keyboards",
|
||||||
|
"gui":"xkbcomp -w0 -I$HOME/.xkb ~/.xkb/keymap/kbd.mac.gui $DISPLAY 2>&1 | grep -v XF86FullScreen",
|
||||||
|
"term":"xkbcomp -w0 -I$HOME/.xkb ~/.xkb/keymap/kbd.mac.term $DISPLAY 2>&1 | grep -v XF86FullScreen",
|
||||||
|
"xkb_symbols_gui":"+chromebook(swap_lalt_lctrl)+mac_gui(mac_levelssym)+mac_gui(mac_appcycle_chromebook)",
|
||||||
|
"xkb_symbols_term":"+altwin(swap_alt_win)+mac_term_chromebook(mac_levelssym)",
|
||||||
|
"xkb_types_gui":"+mac_gui(addmac_levels)",
|
||||||
|
"xkb_types_term":"+mac_term(addmac_levels)"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": 5,
|
||||||
|
"name":"Chromebook (xfce) - Windows",
|
||||||
|
"type":"chromebook",
|
||||||
|
"active": false,
|
||||||
|
"description":"Chromebook with Windows 104 Keyboard",
|
||||||
|
"gui":"xkbcomp -w0 -I$HOME/.xkb ~/.xkb/keymap/kbd.mac.gui $DISPLAY 2>&1 | grep -v XF86FullScreen; setxkbmap -device $usbid -option altwin:ctrl_alt_win",
|
||||||
|
"term":"xkbcomp -w0 -I$HOME/.xkb ~/.xkb/keymap/kbd.mac.term $DISPLAY 2>&1 | grep -v XF86FullScreen",
|
||||||
|
"fallbackgui":"xkbcomp -w0 -I$HOME/.xkb ~/.xkb/keymap/kbd.mac.gui $DISPLAY 2>&1 | grep -v XF86FullScreen",
|
||||||
|
"xkb_symbols_gui":"+chromebook(swap_lalt_lctrl)+mac_gui(mac_levelssym)+mac_gui(mac_appcycle_chromebook)",
|
||||||
|
"xkb_symbols_term":"+altwin(swap_alt_win)+mac_term_chromebook(mac_levelssym)",
|
||||||
|
"xkb_types_gui":"+mac_gui(addmac_levels)",
|
||||||
|
"xkb_types_term":"+mac_term(addmac_levels)"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": 6,
|
||||||
|
"name":"Chromebook (xfce) - Mac",
|
||||||
|
"type":"chromebook",
|
||||||
|
"active": false,
|
||||||
|
"description":"Chromebook with Mac Keyboard",
|
||||||
|
"gui":"setxkbmap -option;setxkbmap -option ctrl:swap_lwin_lctl; xkbcomp -w0 -i $internalid -I$HOME/.xkb ~/.xkb/keymap/kbd.mac.gui $DISPLAY 2>&1 | grep -v XF86FullScreen",
|
||||||
|
"term":"setxkbmap -option;xkbcomp -w0 -I$HOME/.xkb ~/.xkb/keymap/kbd.mac.term $DISPLAY 2>&1 | grep -v XF86FullScreen",
|
||||||
|
"xkb_symbols_gui":"+chromebook(swap_lalt_lctrl)+mac_gui(mac_levelssym)+mac_gui(mac_appcycle_chromebook)",
|
||||||
|
"xkb_symbols_term":"+altwin(swap_alt_win)+mac_term_chromebook(mac_levelssym)",
|
||||||
|
"xkb_types_gui":"+mac_gui(addmac_levels)",
|
||||||
|
"xkb_types_term":"+mac_term(addmac_levels)"
|
||||||
|
}]
|
||||||
|
}
|
167
linux/xkb/config/dename.sh
Executable file
167
linux/xkb/config/dename.sh
Executable file
@@ -0,0 +1,167 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
function detect_gnome()
|
||||||
|
{
|
||||||
|
ps -e | grep -E '^.* gnome-session' > /dev/null
|
||||||
|
if [ $? -ne 0 ];
|
||||||
|
then
|
||||||
|
return 0
|
||||||
|
fi
|
||||||
|
VERSION=`gnome-session --version | awk '{print $2}'`
|
||||||
|
DESKTOP="gnome"
|
||||||
|
return 1
|
||||||
|
}
|
||||||
|
|
||||||
|
function detect_kde4()
|
||||||
|
{
|
||||||
|
ps -e | grep -E '^.* kded4$' > /dev/null
|
||||||
|
if [ $? -ne 0 ];
|
||||||
|
then
|
||||||
|
return 0
|
||||||
|
else
|
||||||
|
VERSION=`kded4 --version | grep -m 1 'KDE' | awk -F ':' '{print $2}' | awk '{print $1}'`
|
||||||
|
DESKTOP="KDE"
|
||||||
|
return 1
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
function detect_kde()
|
||||||
|
{
|
||||||
|
ps -e | grep -E '^.* kded5$' > /dev/null
|
||||||
|
if [ $? -ne 0 ];
|
||||||
|
then
|
||||||
|
return 0
|
||||||
|
else
|
||||||
|
VERSION=`kded5 --version | grep -m 1 'KDE' | awk -F ':' '{print $2}' | awk '{print $1}'`
|
||||||
|
DESKTOP="KDE"
|
||||||
|
return 1
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
function detect_unity()
|
||||||
|
{
|
||||||
|
ps -e | grep -E 'unity-panel' > /dev/null
|
||||||
|
if [ $? -ne 0 ];
|
||||||
|
then
|
||||||
|
return 0
|
||||||
|
fi
|
||||||
|
VERSION=`unity --version | awk '{print $2}'`
|
||||||
|
DESKTOP="unity"
|
||||||
|
return 1
|
||||||
|
}
|
||||||
|
|
||||||
|
function detect_xfce()
|
||||||
|
{
|
||||||
|
ps -e | grep -E '^.* xfce4-session$' > /dev/null
|
||||||
|
if [ $? -ne 0 ];
|
||||||
|
then
|
||||||
|
return 0
|
||||||
|
fi
|
||||||
|
VERSION=`xfce4-session --version | grep xfce4-session | awk '{print $2}'`
|
||||||
|
DESKTOP="xfce"
|
||||||
|
return 1
|
||||||
|
}
|
||||||
|
|
||||||
|
function detect_cinnamon()
|
||||||
|
{
|
||||||
|
ps -e | grep -E '^.* cinnamon$' > /dev/null
|
||||||
|
if [ $? -ne 0 ];
|
||||||
|
then
|
||||||
|
return 0
|
||||||
|
fi
|
||||||
|
VERSION=`cinnamon --version | awk '{print $2}'`
|
||||||
|
DESKTOP="cinnamon"
|
||||||
|
return 1
|
||||||
|
}
|
||||||
|
|
||||||
|
function detect_mate()
|
||||||
|
{
|
||||||
|
ps -e | grep -E '^.* mate-panel$' > /dev/null
|
||||||
|
if [ $? -ne 0 ];
|
||||||
|
then
|
||||||
|
return 0
|
||||||
|
fi
|
||||||
|
VERSION=`mate-about --version | awk '{print $4}'`
|
||||||
|
DESKTOP="mate"
|
||||||
|
return 1
|
||||||
|
}
|
||||||
|
|
||||||
|
function detect_lxde()
|
||||||
|
{
|
||||||
|
ps -e | grep -E '^.* lxsession$' > /dev/null
|
||||||
|
if [ $? -ne 0 ];
|
||||||
|
then
|
||||||
|
return 0
|
||||||
|
fi
|
||||||
|
|
||||||
|
# We can detect LXDE version only thru package manager
|
||||||
|
which apt-cache > /dev/null 2> /dev/null
|
||||||
|
if [ $? -ne 0 ];
|
||||||
|
then
|
||||||
|
which yum > /dev/null 2> /dev/null
|
||||||
|
if [ $? -ne 0 ];
|
||||||
|
then
|
||||||
|
VERSION='unknown'
|
||||||
|
else
|
||||||
|
# For Fedora
|
||||||
|
VERSION=`yum list lxde-common | grep lxde-common | awk '{print $2}' | awk -F '-' '{print $1}'`
|
||||||
|
fi
|
||||||
|
else
|
||||||
|
# For Lubuntu and Knoppix
|
||||||
|
VERSION=`apt-cache show lxde-common /| grep 'Version:' | awk '{print $2}' | awk -F '-' '{print $1}'`
|
||||||
|
fi
|
||||||
|
DESKTOP="lxde"
|
||||||
|
return 1
|
||||||
|
}
|
||||||
|
|
||||||
|
function detect_sugar()
|
||||||
|
{
|
||||||
|
if [ "$DESKTOP_SESSION" == "sugar" ];
|
||||||
|
then
|
||||||
|
VERSION=`python -c "from jarabe import config; print config.version"`
|
||||||
|
DESKTOP="sugar"
|
||||||
|
else
|
||||||
|
return 0
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
DESKTOP="unknown"
|
||||||
|
if detect_unity;
|
||||||
|
then
|
||||||
|
if detect_kde;
|
||||||
|
then
|
||||||
|
if detect_kde4;
|
||||||
|
then
|
||||||
|
if detect_gnome;
|
||||||
|
then
|
||||||
|
if detect_xfce;
|
||||||
|
then
|
||||||
|
if detect_cinnamon;
|
||||||
|
then
|
||||||
|
if detect_mate;
|
||||||
|
then
|
||||||
|
if detect_lxde;
|
||||||
|
then
|
||||||
|
detect_sugar
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
|
|
||||||
|
if [ "$1" == '-v' ];
|
||||||
|
then
|
||||||
|
echo $VERSION
|
||||||
|
else
|
||||||
|
if [ "$1" == '-n' ];
|
||||||
|
then
|
||||||
|
echo $DESKTOP
|
||||||
|
else
|
||||||
|
echo $DESKTOP $VERSION
|
||||||
|
fi
|
||||||
|
fi
|
40
linux/xkb/config/keyswap_toggle.sh
Executable file
40
linux/xkb/config/keyswap_toggle.sh
Executable file
@@ -0,0 +1,40 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
# Manual keyswap
|
||||||
|
systemtype=$1
|
||||||
|
internalid=$2
|
||||||
|
usbid=$3
|
||||||
|
swapbehavior=$4
|
||||||
|
|
||||||
|
swapcmd_term="setxkbmap -option;setxkbmap -option altwin:swap_alt_win"
|
||||||
|
fallbackcmd_gui=""
|
||||||
|
if [[ "$systemtype" == "windows" || "$systemtype" == "mac" ]]; then
|
||||||
|
swapcmd_gui="setxkbmap -option;xkbcomp -w0 -I$HOME/.xkb ~/.xkb/keymap/kbd.mac.gui $DISPLAY"
|
||||||
|
elif [[ "$systemtype" == "mac_only" ]]; then
|
||||||
|
swapcmd_gui="setxkbmap -option;xkbcomp -w0 -I$HOME/.xkb ~/.xkb/keymap/kbd.mac.gui $DISPLAY"
|
||||||
|
# Chromebook keyboard options
|
||||||
|
elif [[ "$swapbehavior" == "both_mac" ]]; then
|
||||||
|
swapcmd_gui="setxkbmap -option;setxkbmap -option ctrl:swap_lwin_lctl; xkbcomp -w0 -i $internalid -I$HOME/.xkb ~/.xkb/keymap/kbd.chromebook.gui $DISPLAY"
|
||||||
|
swapcmd_term="setxkbmap -option;setxkbmap -device $internalid -option 'altwin:swap_alt_win'"
|
||||||
|
elif [[ "$swapbehavior" == "both_win" ]]; then
|
||||||
|
swapcmd_gui="setxkbmap -option;xkbcomp -w0 -I$HOME/.xkb ~/.xkb/keymap/kbd.chromebook.gui $DISPLAY; setxkbmap -device $usbid -option altwin:ctrl_alt_win"
|
||||||
|
fallbackcmd_gui="setxkbmap -option;xkbcomp -w0 -I$HOME/.xkb ~/.xkb/keymap/kbd.chromebook.gui $DISPLAY"
|
||||||
|
elif [[ "$swapbehavior" == "none" ]]; then
|
||||||
|
swapcmd_gui="setxkbmap -option;xkbcomp -w0 -I$HOME/.xkb ~/.xkb/keymap/kbd.chromebook.gui $DISPLAY"
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [[ "$systemtype" == "mac_only" ]]; then
|
||||||
|
check=`setxkbmap -query | grep -c 'alt_super_win'`
|
||||||
|
elif [[ "$swapbehavior" == "both_win" ]]; then
|
||||||
|
check=`setxkbmap -query | grep -q 'ctrl_alt_win'; echo $?`
|
||||||
|
else
|
||||||
|
check=`setxkbmap -query | grep -c 'swap_alt_win'`
|
||||||
|
fi
|
||||||
|
|
||||||
|
echo $check
|
||||||
|
if [ $check -eq 0 ]; then
|
||||||
|
echo "internal gui to term"
|
||||||
|
eval "$swapcmd_term"
|
||||||
|
else
|
||||||
|
echo "internal term to gui"
|
||||||
|
eval "$swapcmd_gui"
|
||||||
|
fi
|
8
linux/xkb/config/kinto.desktop
Normal file
8
linux/xkb/config/kinto.desktop
Normal file
@@ -0,0 +1,8 @@
|
|||||||
|
[Desktop Entry]
|
||||||
|
Name=Kinto
|
||||||
|
GenericName=Kinto
|
||||||
|
Comment=Make Linux Type Like it's a Mac
|
||||||
|
Exec=/bin/bash -c "/bin/sleep 5 && /usr/bin/systemctl --user start keyswap"
|
||||||
|
Terminal=false
|
||||||
|
Type=Application
|
||||||
|
X-GNOME-Autostart-enabled=true
|
76
linux/xkb/config/user_config.json
Normal file
76
linux/xkb/config/user_config.json
Normal file
@@ -0,0 +1,76 @@
|
|||||||
|
{"config":[{
|
||||||
|
"name":"gui",
|
||||||
|
"run":"",
|
||||||
|
"run_onInput":"",
|
||||||
|
"run_offInput": "killall xbindkeys > /dev/null 2>&1",
|
||||||
|
"symbols":"",
|
||||||
|
"types":"",
|
||||||
|
"de":[],
|
||||||
|
"appnames":[ "" ]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name":"term",
|
||||||
|
"run":"",
|
||||||
|
"run_onInput":"",
|
||||||
|
"run_offInput": "killall xbindkeys > /dev/null 2>&1",
|
||||||
|
"symbols":"",
|
||||||
|
"types":"",
|
||||||
|
"de":[],
|
||||||
|
"appnames":[ "alacritty","deepin-terminal","eterm","gnome-terminal","guake","hyper","io.elementary.terminal","kinto-gui.py","kitty","konsole","lxterminal","mate-terminal","qterminal","st","sakura","station","terminator","termite","tilda","tilix","urxvt","xfce4-terminal","xterm" ]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "firefox",
|
||||||
|
"run": "",
|
||||||
|
"run_onInput": "pkill -f ~/.config/kinto/.firefox-nw",
|
||||||
|
"run_offInput": "xbindkeys -f $HOME/.config/kinto/.firefox-nw",
|
||||||
|
"symbols": "",
|
||||||
|
"types": "",
|
||||||
|
"de": [],
|
||||||
|
"appnames": [ "Firefox" ]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "chrome",
|
||||||
|
"run": "",
|
||||||
|
"run_onInput": "xkbcomp -w0 -I$HOME/.xkb ~/.xkb/keymap/kbd.mac.gui $DISPLAY",
|
||||||
|
"run_offInput": "xkbcomp -w0 -I$HOME/.xkb ~/.xkb/keymap/kbd.mac.gui.chrome $DISPLAY",
|
||||||
|
"symbols": "",
|
||||||
|
"types": "",
|
||||||
|
"de": [],
|
||||||
|
"appnames": [ "Chromium","Chromium-browser","Google-chrome","Epiphany" ]
|
||||||
|
}],
|
||||||
|
"init": [],
|
||||||
|
"detypes":["gnome2","gnome3","kde4","kde5","xfce","i3wm"],
|
||||||
|
"de":[{
|
||||||
|
"id": 1,
|
||||||
|
"type": ["gnome3"],
|
||||||
|
"active": false,
|
||||||
|
"intent":"init",
|
||||||
|
"name":"gnome-init",
|
||||||
|
"description":"Gnome - Remove Superkey Overlay keybinding to Activities Overview",
|
||||||
|
"run":"gsettings set org.gnome.mutter overlay-key ''",
|
||||||
|
"run_term":"",
|
||||||
|
"run_gui":""
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": 2,
|
||||||
|
"type": ["gnome3"],
|
||||||
|
"active": false,
|
||||||
|
"intent":"gui_term",
|
||||||
|
"name":"Gnome Activities Overview",
|
||||||
|
"description":"Cmd+Space activates Activities Overview",
|
||||||
|
"run":"",
|
||||||
|
"run_term":"gsettings set org.gnome.desktop.wm.keybindings panel-main-menu \"['<Control><Shift>Space']\"",
|
||||||
|
"run_gui":"gsettings set org.gnome.desktop.wm.keybindings panel-main-menu \"['<Ctrl>Space']\""
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": 3,
|
||||||
|
"type": ["kde5"],
|
||||||
|
"active": false,
|
||||||
|
"intent":"init",
|
||||||
|
"name":"kde-init",
|
||||||
|
"description":"KDE Plasma 5 - Removes Superkey Overlay from the Launcher Menu",
|
||||||
|
"run":"kwriteconfig5 --file ~/.config/kwinrc --group ModifierOnlyShortcuts --key Meta \"\";qdbus org.kde.KWin /KWin reconfigure",
|
||||||
|
"run_term":"",
|
||||||
|
"run_gui":""
|
||||||
|
}]
|
||||||
|
}
|
10
linux/xkb/config/xactive.sh
Executable file
10
linux/xkb/config/xactive.sh
Executable file
@@ -0,0 +1,10 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
if [ $# -eq 0 ]
|
||||||
|
then
|
||||||
|
# No arguments
|
||||||
|
./kintox11
|
||||||
|
else
|
||||||
|
./caret_status.sh &
|
||||||
|
./kintox11
|
||||||
|
fi
|
BIN
linux/xkb/kintox11/binary/kintox11
Executable file
BIN
linux/xkb/kintox11/binary/kintox11
Executable file
Binary file not shown.
5
linux/xkb/kintox11/src/Makefile
Normal file
5
linux/xkb/kintox11/src/Makefile
Normal file
@@ -0,0 +1,5 @@
|
|||||||
|
CFLAGS=-g $(shell pkg-config --cflags json-c xmu)
|
||||||
|
LDFLAGS=-g $(shell pkg-config --libs json-c xmu)
|
||||||
|
|
||||||
|
all:
|
||||||
|
$(CC) kintox11.c $(CFLAGS) $(LDFLAGS) -lm -lpthread -o kintox11
|
694
linux/xkb/kintox11/src/kintox11.c
Normal file
694
linux/xkb/kintox11/src/kintox11.c
Normal file
@@ -0,0 +1,694 @@
|
|||||||
|
// -*- coding:utf-8-unix; mode:c; -*-
|
||||||
|
// Kinto x11 command line
|
||||||
|
/*
|
||||||
|
Reference material
|
||||||
|
get the active window on X window system
|
||||||
|
http://k-ui.jp/blog/2012/05/07/get-active-window-on-x-window-system/
|
||||||
|
*/
|
||||||
|
// To compile without static libraries
|
||||||
|
// gcc kintox11.c -lX11 -lXmu -ljson-c
|
||||||
|
//
|
||||||
|
// To compile with static library json-c
|
||||||
|
// Make sure archive with object files exist ar -t /usr/local/lib/libjson-c.a
|
||||||
|
// gcc -L/usr/local/lib/ kintox11.c -ljson-c -lXmu -lXt -lX11 -O2 -o kintox11
|
||||||
|
//
|
||||||
|
|
||||||
|
#define _GNU_SOURCE 1
|
||||||
|
#include <pthread.h>
|
||||||
|
#include <stdlib.h>
|
||||||
|
#include <stdio.h>
|
||||||
|
#include <stdbool.h>
|
||||||
|
#include <locale.h>
|
||||||
|
#include <string.h>
|
||||||
|
#include <ctype.h>
|
||||||
|
#include <unistd.h>
|
||||||
|
#include <X11/Xlib.h> // `apt-get install libx11-dev`
|
||||||
|
#include <X11/Xmu/WinUtil.h> // `apt-get install libxmu-dev`
|
||||||
|
#include <json-c/json.h> // `apt install libjson-c-dev`
|
||||||
|
#include <sys/select.h>
|
||||||
|
#include <math.h>
|
||||||
|
#include <sys/time.h>
|
||||||
|
#ifdef WIN32
|
||||||
|
#include <windows.h>
|
||||||
|
#elif _POSIX_C_SOURCE >= 199309L
|
||||||
|
#include <time.h> // for nanosleep
|
||||||
|
#else
|
||||||
|
#include <unistd.h> // for usleep
|
||||||
|
#endif
|
||||||
|
|
||||||
|
const char *eventNames[34] = {"None","KeyPress","KeyRelease","ButtonPress","ButtonRelease","MotionNotify","EnterNotify","LeaveNotify","FocusIn","FocusOut","KeymapNotify","Expose","GraphicsExpose","NoExpose","VisibilityNotify","CreateNotify","DestroyNotify","UnmapNotify","MapNotify","MapRequest","ReparentNotify","ConfigureNotify","ConfigureRequest","ResizeRequest","CirculateNotify","CirculateRequest","PropertyNotify","SelectionClear","SelectionRequest","SelectionNotify","ColormapNotify","ClientMessage","MappingNotify"};
|
||||||
|
|
||||||
|
#define NUM_THREADS 2
|
||||||
|
typedef struct threadArgs * ThreadArgs;
|
||||||
|
struct threadArgs{
|
||||||
|
char *run_onInput;
|
||||||
|
char *run_offInput;
|
||||||
|
};
|
||||||
|
|
||||||
|
long long timeInMilliseconds(void) {
|
||||||
|
struct timeval tv;
|
||||||
|
|
||||||
|
gettimeofday(&tv,NULL);
|
||||||
|
return (((long long)tv.tv_sec)*1000)+(tv.tv_usec/1000);
|
||||||
|
}
|
||||||
|
|
||||||
|
bool debug;
|
||||||
|
bool input_check = 0;
|
||||||
|
long long int event_ts;
|
||||||
|
int last_event;
|
||||||
|
|
||||||
|
Display* d;
|
||||||
|
Window w;
|
||||||
|
XEvent e;
|
||||||
|
|
||||||
|
// cross-platform sleep function
|
||||||
|
void sleep_ms(int milliseconds) {
|
||||||
|
#ifdef WIN32
|
||||||
|
Sleep(milliseconds);
|
||||||
|
#elif _POSIX_C_SOURCE >= 199309L
|
||||||
|
struct timespec ts;
|
||||||
|
ts.tv_sec = milliseconds / 1000;
|
||||||
|
ts.tv_nsec = (milliseconds % 1000) * 1000000;
|
||||||
|
nanosleep(&ts, NULL);
|
||||||
|
#else
|
||||||
|
usleep(milliseconds * 1000);
|
||||||
|
#endif
|
||||||
|
}
|
||||||
|
|
||||||
|
char *trimwhitespace(char *str){
|
||||||
|
char *end;
|
||||||
|
// Trim leading space
|
||||||
|
while(isspace((unsigned char)*str)) str++;
|
||||||
|
if(*str == 0) // All spaces?
|
||||||
|
return str;
|
||||||
|
// Trim trailing space
|
||||||
|
end = str + strlen(str) - 1;
|
||||||
|
while(end > str && isspace((unsigned char)*end)) end--;
|
||||||
|
// Write new null terminator character
|
||||||
|
end[1] = '\0';
|
||||||
|
return str;
|
||||||
|
}
|
||||||
|
|
||||||
|
int check_caret(){
|
||||||
|
int caretint;
|
||||||
|
char * fpname;
|
||||||
|
fpname = malloc(sizeof(char)*20);
|
||||||
|
strcpy(fpname,"/tmp/kinto/caret");
|
||||||
|
if( access( fpname, F_OK ) != -1 ) {
|
||||||
|
char *buffer = NULL;
|
||||||
|
size_t size = 0;
|
||||||
|
FILE *fp = fopen(fpname, "r");
|
||||||
|
if (fp == NULL){
|
||||||
|
return (0);
|
||||||
|
}
|
||||||
|
fseek(fp, 0, SEEK_END);
|
||||||
|
size = ftell(fp);
|
||||||
|
rewind(fp);
|
||||||
|
buffer = malloc((size + 1) * sizeof(*buffer));
|
||||||
|
fread(buffer, size, 1, fp);
|
||||||
|
buffer[size] = '\0';
|
||||||
|
trimwhitespace(buffer);
|
||||||
|
caretint = atoi(buffer);
|
||||||
|
fclose(fp);
|
||||||
|
if(caretint == 1){
|
||||||
|
// printf("caret: %s\n", buffer);
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
// printf("found nothing\n");
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
else{
|
||||||
|
// printf("file %s does not exist\n",fpname);
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void *inputToggle(void *argStruct) {
|
||||||
|
ThreadArgs args = argStruct;
|
||||||
|
|
||||||
|
char * onInput;
|
||||||
|
char * offInput;
|
||||||
|
onInput = malloc(sizeof(char)*400);
|
||||||
|
offInput = malloc(sizeof(char)*400);
|
||||||
|
onInput = args->run_onInput;
|
||||||
|
offInput = args->run_offInput;
|
||||||
|
|
||||||
|
Bool ran_onInput = 0;
|
||||||
|
|
||||||
|
while(input_check){
|
||||||
|
if(check_caret() && ran_onInput == 0){
|
||||||
|
if(debug == true){
|
||||||
|
printf("run_onInput: %s\n",onInput);
|
||||||
|
}
|
||||||
|
system(onInput);
|
||||||
|
ran_onInput = 1;
|
||||||
|
}
|
||||||
|
else if(!check_caret() && ran_onInput == 1){
|
||||||
|
if(debug == true){
|
||||||
|
printf("run_offInput: %s\n",offInput);
|
||||||
|
}
|
||||||
|
system(offInput);
|
||||||
|
ran_onInput = 0;
|
||||||
|
}
|
||||||
|
sleep_ms(100);
|
||||||
|
}
|
||||||
|
pthread_exit(NULL);
|
||||||
|
}
|
||||||
|
|
||||||
|
void *nextPlease(void *threadid) {
|
||||||
|
long tid;
|
||||||
|
tid = (long)threadid;
|
||||||
|
|
||||||
|
// printf("Next Please Thread ID, %ld\n", tid);
|
||||||
|
|
||||||
|
// Reference http://www.rahul.net/kenton/xproto/xevents_errors.html
|
||||||
|
// event type 17 - DestroyNotify
|
||||||
|
// event type 18 - UnmapNotify
|
||||||
|
// event type 22 - ConfigureNotify
|
||||||
|
// Dismiss the following events by initiating another XNextEvent
|
||||||
|
XNextEvent(d, &e);
|
||||||
|
while(e.type != ConfigureNotify || (e.type == ConfigureNotify && last_event == ConfigureNotify && timeInMilliseconds()-event_ts < 419)){
|
||||||
|
XNextEvent(d, &e);
|
||||||
|
}
|
||||||
|
// Unset input thread
|
||||||
|
input_check = 0;
|
||||||
|
last_event = e.type;
|
||||||
|
|
||||||
|
if(debug == true){
|
||||||
|
printf(" event: %s %d\n",eventNames[e.type-1],e.type);
|
||||||
|
printf(" duration: %lldms\n",timeInMilliseconds()-event_ts);
|
||||||
|
}
|
||||||
|
event_ts = timeInMilliseconds();
|
||||||
|
|
||||||
|
pthread_exit(NULL);
|
||||||
|
}
|
||||||
|
|
||||||
|
char * append(char * string1, char * string2){
|
||||||
|
char * result = NULL;
|
||||||
|
asprintf(&result, "%s,%s", string1, string2);
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
|
||||||
|
static int wait_fd(int fd, double seconds){
|
||||||
|
struct timeval tv;
|
||||||
|
fd_set in_fds;
|
||||||
|
FD_ZERO(&in_fds);
|
||||||
|
FD_SET(fd, &in_fds);
|
||||||
|
tv.tv_sec = trunc(seconds);
|
||||||
|
tv.tv_usec = (seconds - trunc(seconds))*1000000;
|
||||||
|
return select(fd+1, &in_fds, 0, 0, &tv);
|
||||||
|
}
|
||||||
|
|
||||||
|
Bool xerror = False;
|
||||||
|
|
||||||
|
int in_int(int a[],int size,int item){
|
||||||
|
int i,pos=-1;
|
||||||
|
for(i=0;i< size;i++)
|
||||||
|
{
|
||||||
|
if(a[i]==item)
|
||||||
|
{
|
||||||
|
pos=i;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return pos;
|
||||||
|
}
|
||||||
|
|
||||||
|
int in(const char **arr, int len, char *target) {
|
||||||
|
int i;
|
||||||
|
for(i = 0; i < len; i++) {
|
||||||
|
if(strncmp(arr[i], target, strlen(target)) == 0) {
|
||||||
|
return i;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return -1;
|
||||||
|
}
|
||||||
|
|
||||||
|
int strcicmp(char const *a, char const *b){
|
||||||
|
for (;; a++, b++) {
|
||||||
|
int d = tolower((unsigned char)*a) - tolower((unsigned char)*b);
|
||||||
|
if (d != 0 || !*a)
|
||||||
|
return d;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
Display* open_display(){
|
||||||
|
int i;
|
||||||
|
Display* d = XOpenDisplay(NULL);
|
||||||
|
for (i = 0; i < 60; i++) {
|
||||||
|
if(d == NULL){
|
||||||
|
printf("fail to open X server display...\n");
|
||||||
|
}
|
||||||
|
else{
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
sleep(1);
|
||||||
|
}
|
||||||
|
if(d == NULL){
|
||||||
|
printf("fail to open X server display for 1 minute...\n");
|
||||||
|
printf("Kintox11 is now exiting...\n");
|
||||||
|
exit(1);
|
||||||
|
}
|
||||||
|
return d;
|
||||||
|
}
|
||||||
|
|
||||||
|
int handle_error(Display* display, XErrorEvent* error){
|
||||||
|
printf("X11 error: type=%d, serial=%lu, code=%d\n",
|
||||||
|
error->type, error->serial, (int)error->error_code);
|
||||||
|
xerror = True;
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
Window get_focus_window(Display* d, int etype, char const *eventName, char const *current_app, bool debug){
|
||||||
|
Window w;
|
||||||
|
int revert_to;
|
||||||
|
|
||||||
|
if(debug == true){
|
||||||
|
printf("\n get focus window\n");
|
||||||
|
}
|
||||||
|
|
||||||
|
if(!(etype == DestroyNotify || etype == UnmapNotify)) {
|
||||||
|
XGetInputFocus(d, &w, &revert_to); // see man
|
||||||
|
if(debug == true){
|
||||||
|
printf(" -%s: event: %d, window_id: %ld\n",current_app,etype,w);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if(xerror){
|
||||||
|
printf("*Error getting focused window, e.type: %d, current_app: %s\n",etype,current_app);
|
||||||
|
exit(1);
|
||||||
|
}else if(w == None){
|
||||||
|
printf("*no focus window, e.type: %d, current_app: %s\n",etype,current_app);
|
||||||
|
exit(1);
|
||||||
|
}
|
||||||
|
|
||||||
|
return w;
|
||||||
|
}
|
||||||
|
|
||||||
|
// get the top window.
|
||||||
|
// a top window have the following specifications.
|
||||||
|
// * the start window is contained the descendent windows.
|
||||||
|
// * the parent window is the root window.
|
||||||
|
Window get_top_window(Display* d, Window start, int etype, char const *eventName, char const *current_app, bool debug){
|
||||||
|
Window w = start;
|
||||||
|
Window parent = start;
|
||||||
|
Window root = None;
|
||||||
|
Window *children;
|
||||||
|
unsigned int nchildren;
|
||||||
|
Status s;
|
||||||
|
char * ws;
|
||||||
|
char * wstr;
|
||||||
|
ws = malloc(sizeof(char)*4096);
|
||||||
|
wstr = malloc(sizeof(char)*100);
|
||||||
|
// strcpy(wstr,"test,");
|
||||||
|
|
||||||
|
if(debug == true){
|
||||||
|
printf("\n get top window\n");
|
||||||
|
}
|
||||||
|
// Checking for Destroy and Unmap Notify events here too
|
||||||
|
// Sometimes they still get passed through and if so need
|
||||||
|
// to be ignored or XQueryTree will cause a segmentation fault
|
||||||
|
while (parent != root && parent != 0 && !(etype == DestroyNotify || etype == UnmapNotify)) {
|
||||||
|
w = parent;
|
||||||
|
|
||||||
|
s = XQueryTree(d, w, &root, &parent, &children, &nchildren); // see man
|
||||||
|
|
||||||
|
sprintf(wstr, "%ld", w);
|
||||||
|
if ((ws != NULL) && (ws[0] == '\0')) {
|
||||||
|
strcpy(ws,wstr);
|
||||||
|
}
|
||||||
|
else{
|
||||||
|
ws = append(ws, wstr);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (s)
|
||||||
|
XFree(children);
|
||||||
|
|
||||||
|
if(xerror){
|
||||||
|
printf("*fail to get top window: %ld, e.type: %d, current_app: %s\n",w,etype,current_app);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if(debug == true){
|
||||||
|
printf(" -%s: event: %d, window_id: %s\n",current_app,etype,ws);
|
||||||
|
}
|
||||||
|
|
||||||
|
return w;
|
||||||
|
}
|
||||||
|
|
||||||
|
// search a named window (that has a WM_STATE prop)
|
||||||
|
// on the descendent windows of the argment Window.
|
||||||
|
Window get_named_window(Display* d, Window start, int etype, char const *eventName, char const *current_app, bool debug){
|
||||||
|
Window w;
|
||||||
|
|
||||||
|
if(debug == true){
|
||||||
|
printf("\n get named window\n");
|
||||||
|
}
|
||||||
|
// printf("getting named window ... ");
|
||||||
|
w = XmuClientWindow(d, start); // see man
|
||||||
|
|
||||||
|
if(debug == true){
|
||||||
|
printf(" -%s: event: %d, window_id: %ld\n\n",current_app,etype,w);
|
||||||
|
}
|
||||||
|
// if(w == start)
|
||||||
|
// printf("fail\n");
|
||||||
|
// printf("success (window: %d)\n", (int) w);
|
||||||
|
return w;
|
||||||
|
}
|
||||||
|
|
||||||
|
const char * str_window_class(Display* d, Window w, char *prior_app ){
|
||||||
|
Status s;
|
||||||
|
XClassHint* class;
|
||||||
|
|
||||||
|
class = XAllocClassHint(); // see man
|
||||||
|
if(xerror){
|
||||||
|
// printf("ERROR: XAllocClassHint\n");
|
||||||
|
}
|
||||||
|
|
||||||
|
s = XGetClassHint(d, w, class); // see man
|
||||||
|
if(xerror || s){
|
||||||
|
char * app_class;
|
||||||
|
app_class = malloc(sizeof(char)*100);
|
||||||
|
strcpy(app_class,class->res_class);
|
||||||
|
// printf("\tname: %s\n\tclass: %s\n", class->res_name, class->res_class);
|
||||||
|
return app_class;
|
||||||
|
}else{
|
||||||
|
// char * error_msg;
|
||||||
|
// error_msg = malloc(sizeof(char)*50);
|
||||||
|
// strcpy(error_msg, "ERROR: XGetClassHint");
|
||||||
|
return prior_app;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
int main(int argc, char *argv[]){
|
||||||
|
|
||||||
|
XInitThreads();
|
||||||
|
|
||||||
|
if(argc < 2){
|
||||||
|
debug = false;
|
||||||
|
}
|
||||||
|
if(argc > 1 && (strcmp(argv[1], "-d") == 0 || strcmp(argv[1], "--debug") == 0 )){
|
||||||
|
debug = true;
|
||||||
|
printf("Running in debug mode\n");
|
||||||
|
}
|
||||||
|
|
||||||
|
FILE *fp;
|
||||||
|
char buffer[10240];
|
||||||
|
struct json_object *parsed_json, *config, *config_obj,
|
||||||
|
*config_obj_name, *config_obj_run, *config_obj_run_oninput,
|
||||||
|
*config_obj_run_offinput, *config_obj_de, *config_obj_appnames,
|
||||||
|
*appnames_obj, *init, *de, *de_obj, *de_obj_id, *de_obj_active,
|
||||||
|
*de_obj_run, *de_obj_runterm,*de_obj_rungui;
|
||||||
|
|
||||||
|
int arraylen;
|
||||||
|
int appnames_len, init_len, de_len, config_de_len;
|
||||||
|
int system(const char *command);
|
||||||
|
|
||||||
|
size_t i,n,r;
|
||||||
|
|
||||||
|
printf("Importing user_config.json...\n");
|
||||||
|
fp = fopen("user_config.json","r");
|
||||||
|
fread(buffer, 10240, 1, fp);
|
||||||
|
fclose(fp);
|
||||||
|
|
||||||
|
parsed_json = json_tokener_parse(buffer);
|
||||||
|
|
||||||
|
config = json_object_object_get(parsed_json, "config");
|
||||||
|
init = json_object_object_get(parsed_json, "init");
|
||||||
|
de = json_object_object_get(parsed_json, "de");
|
||||||
|
|
||||||
|
arraylen = json_object_array_length(config);
|
||||||
|
init_len = json_object_array_length(init);
|
||||||
|
de_len = json_object_array_length(de);
|
||||||
|
|
||||||
|
const char *name_array[arraylen];
|
||||||
|
const char *run_array[arraylen];
|
||||||
|
const char *run_oninput_array[arraylen];
|
||||||
|
const char *run_offinput_array[arraylen];
|
||||||
|
int init_array[init_len];
|
||||||
|
|
||||||
|
int de_id_array[de_len];
|
||||||
|
Bool de_active_array[de_len];
|
||||||
|
const char *de_run_array[de_len];
|
||||||
|
const char *de_runterm_array[de_len];
|
||||||
|
const char *de_rungui_array[de_len];
|
||||||
|
|
||||||
|
// Grab all de variable info needed
|
||||||
|
for (i = 0; i < de_len; i++) {
|
||||||
|
de_obj = json_object_array_get_idx(de, i);
|
||||||
|
de_obj_id = json_object_object_get(de_obj, "id");
|
||||||
|
de_id_array[i] = json_object_get_int(de_obj_id);
|
||||||
|
de_obj_active = json_object_object_get(de_obj, "active");
|
||||||
|
de_active_array[i] = json_object_get_int(de_obj_active);
|
||||||
|
de_obj_run = json_object_object_get(de_obj, "run");
|
||||||
|
de_run_array[i] = json_object_get_string(de_obj_run);
|
||||||
|
de_obj_runterm = json_object_object_get(de_obj, "run_term");
|
||||||
|
de_runterm_array[i] = json_object_get_string(de_obj_runterm);
|
||||||
|
de_obj_rungui = json_object_object_get(de_obj, "run_gui");
|
||||||
|
de_rungui_array[i] = json_object_get_string(de_obj_rungui);
|
||||||
|
// printf("de_run_array[%ld]: %s\n",i,de_run_array[i]);
|
||||||
|
}
|
||||||
|
// de ends
|
||||||
|
|
||||||
|
int appnames_max = 0;
|
||||||
|
int config_de_max = 0;
|
||||||
|
|
||||||
|
for (i = 0; i < arraylen; i++) {
|
||||||
|
config_obj = json_object_array_get_idx(config, i);
|
||||||
|
config_obj_appnames = json_object_object_get(config_obj, "appnames");
|
||||||
|
config_obj_de = json_object_object_get(config_obj, "de");
|
||||||
|
|
||||||
|
appnames_len = json_object_array_length(config_obj_appnames);
|
||||||
|
if (appnames_len > appnames_max){
|
||||||
|
appnames_max = appnames_len;
|
||||||
|
}
|
||||||
|
config_de_len = json_object_array_length(config_obj_de);
|
||||||
|
if(config_de_len > config_de_max){
|
||||||
|
config_de_max = config_de_len;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
const char *appnames_array[arraylen][appnames_max];
|
||||||
|
int config_de_array[arraylen][config_de_max];
|
||||||
|
|
||||||
|
for (i = 0; i < arraylen; i++) {
|
||||||
|
config_obj = json_object_array_get_idx(config, i);
|
||||||
|
|
||||||
|
config_obj_name = json_object_object_get(config_obj, "name");
|
||||||
|
config_obj_run = json_object_object_get(config_obj, "run");
|
||||||
|
config_obj_run_oninput = json_object_object_get(config_obj, "run_onInput");
|
||||||
|
config_obj_run_offinput = json_object_object_get(config_obj, "run_offInput");
|
||||||
|
|
||||||
|
name_array[i] = json_object_get_string(config_obj_name);
|
||||||
|
run_array[i] = json_object_get_string(config_obj_run);
|
||||||
|
run_oninput_array[i] = json_object_get_string(config_obj_run_oninput);
|
||||||
|
run_offinput_array[i] = json_object_get_string(config_obj_run_offinput);
|
||||||
|
// printf("%s\n%s\n", json_object_get_string(config_obj_name), json_object_get_string(config_obj_run));
|
||||||
|
|
||||||
|
config_obj_appnames = json_object_object_get(config_obj, "appnames");
|
||||||
|
appnames_len = json_object_array_length(config_obj_appnames);
|
||||||
|
for (n = 0; n < appnames_len; n++) {
|
||||||
|
// printf("name_array[i]: %s\n",name_array[i]);
|
||||||
|
if(!strcicmp(name_array[i], "gui")){
|
||||||
|
appnames_array[i][n] = NULL;
|
||||||
|
// printf("%s i:%ld n:%ld %s\n",name_array[i],i,n,appnames_array[i][n]);
|
||||||
|
}
|
||||||
|
else{
|
||||||
|
appnames_array[i][n] = json_object_get_string(json_object_array_get_idx(config_obj_appnames, n));
|
||||||
|
//printf("%s i:%ld n:%ld %s\n",name_array[i],i,n,appnames_array[i][n]);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if(appnames_max > appnames_len){
|
||||||
|
for (n = appnames_len; n < appnames_max; n++){
|
||||||
|
appnames_array[i][n] = NULL;
|
||||||
|
//printf("%s i:%ld n:%ld %s\n",name_array[i],i,n,appnames_array[i][n]);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
config_obj_de = json_object_object_get(config_obj, "de");
|
||||||
|
config_de_len = json_object_array_length(config_obj_de);
|
||||||
|
for (n = 0; n < config_de_max; n++) {
|
||||||
|
if(n < config_de_len){
|
||||||
|
// printf("de value: %d\n",json_object_get_int(json_object_array_get_idx(config_obj_de, n)));
|
||||||
|
config_de_array[i][n] = json_object_get_int(json_object_array_get_idx(config_obj_de, n));
|
||||||
|
}
|
||||||
|
else{
|
||||||
|
// printf("de -1 value: %d\n",json_object_get_int(json_object_array_get_idx(config_obj_de, n)));
|
||||||
|
config_de_array[i][n] = -1;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
printf("Data from user_config.json imported successfully.\n");
|
||||||
|
|
||||||
|
for (i = 0; i < init_len; i++) {
|
||||||
|
init_array[i] = json_object_get_int(json_object_array_get_idx(init, i));
|
||||||
|
int de_id_idx = in_int(de_id_array, de_len, init_array[i]);
|
||||||
|
printf("Running init command: %s\n",de_run_array[de_id_idx]);
|
||||||
|
system(de_run_array[de_id_idx]);
|
||||||
|
}
|
||||||
|
|
||||||
|
char *name;
|
||||||
|
|
||||||
|
// for XmbTextPropertyToTextList
|
||||||
|
setlocale(LC_ALL, ""); // see man locale
|
||||||
|
|
||||||
|
d = open_display();
|
||||||
|
XSelectInput(d, DefaultRootWindow(d), SubstructureNotifyMask);
|
||||||
|
XSetErrorHandler(handle_error);
|
||||||
|
|
||||||
|
char * run_normal;
|
||||||
|
char * run_onInput;
|
||||||
|
char * run_offInput;
|
||||||
|
char * prior_app;
|
||||||
|
char * current_app;
|
||||||
|
char * prior_category;
|
||||||
|
char * current_category;
|
||||||
|
run_onInput = malloc(sizeof(char)*400);
|
||||||
|
run_offInput = malloc(sizeof(char)*400);
|
||||||
|
run_normal = malloc(sizeof(char)*400);
|
||||||
|
prior_app = malloc(sizeof(char)*100);
|
||||||
|
current_app = malloc(sizeof(char)*100);
|
||||||
|
prior_category = malloc(sizeof(char)*100);
|
||||||
|
current_category = malloc(sizeof(char)*100);
|
||||||
|
strcpy(prior_app,"none");
|
||||||
|
strcpy(prior_category,"none");
|
||||||
|
|
||||||
|
int remap_bool = 2;
|
||||||
|
|
||||||
|
printf("Starting keyswap...\n");
|
||||||
|
|
||||||
|
// get active window
|
||||||
|
w = get_focus_window(d, 0, eventNames[0], current_app, debug);
|
||||||
|
w = get_top_window(d, w, 0, eventNames[0], current_app, debug);
|
||||||
|
w = get_named_window(d, w, 0, eventNames[0], current_app, debug);
|
||||||
|
|
||||||
|
// XFetchName(d, w, &name);
|
||||||
|
// printf("window:%#x name:%s\n", w, name);
|
||||||
|
printf("First window name: %s \n\n",str_window_class(d, w,prior_app));
|
||||||
|
|
||||||
|
int breakouter;
|
||||||
|
last_event=0;
|
||||||
|
event_ts = timeInMilliseconds();
|
||||||
|
|
||||||
|
for (;;)
|
||||||
|
{
|
||||||
|
strcpy(current_app,str_window_class(d, w,prior_app));
|
||||||
|
int category_idx;
|
||||||
|
// printf("current: %s\n",current_app);
|
||||||
|
breakouter = 0;
|
||||||
|
|
||||||
|
// Cycle through category name array
|
||||||
|
// printf("%d\n",arraylen);
|
||||||
|
for(i = 0; i < arraylen; ++i){
|
||||||
|
// Cycle through the maximum App name array in each category
|
||||||
|
for(n = 0; n < appnames_max; ++n){
|
||||||
|
if (appnames_array[i][n] != NULL){
|
||||||
|
// printf("%s\n",appnames_array[i][n]);
|
||||||
|
if(strcicmp(appnames_array[i][n], current_app) == 0){
|
||||||
|
strcpy(current_category,name_array[i]);
|
||||||
|
category_idx = i;
|
||||||
|
// printf("Match found: %s: %s\n",current_category,current_app);
|
||||||
|
breakouter = 1;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else if(i == arraylen-1 && breakouter==0){
|
||||||
|
// printf("No match found, default to gui");
|
||||||
|
strcpy(current_category,"gui");
|
||||||
|
category_idx = in(name_array, arraylen, current_category);
|
||||||
|
// printf("Match found: %s: %s\n",current_category,current_app);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
else if(appnames_array[i][n] == NULL){
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
if(breakouter==1){
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if(strcicmp(prior_category, current_category) != 0){
|
||||||
|
// printf("prior: %s, current: %s\n",prior_category,current_category);
|
||||||
|
// printf("%d,%d,%d,%d\n",strcicmp(prior_category, "gui"),strcicmp(current_category, "firefox"),strcicmp(current_category, "gui"),strcicmp(prior_category, "firefox"));
|
||||||
|
// printf("%d,%d\n",(strcicmp(prior_category, "gui") != 0 && strcicmp(prior_category, "firefox") != 0),(strcicmp(current_category, "gui") != 0 && strcicmp(current_category, "firefox") != 0));
|
||||||
|
printf("%s: %s\n",current_category,current_app);
|
||||||
|
// Make sure we're not switching between 2 GUI keymaps
|
||||||
|
// Firefox & Standard GUI apps
|
||||||
|
// strcicmp returns 0 for matches, <>0 for non-match
|
||||||
|
if((strcicmp(prior_category, "gui") != 0 && strcicmp(prior_category, "firefox") != 0) || (strcicmp(current_category, "gui") != 0 && strcicmp(current_category, "firefox") != 0)){
|
||||||
|
if(debug == true){
|
||||||
|
printf("run: %s\n",run_array[category_idx]);
|
||||||
|
}
|
||||||
|
system(run_array[category_idx]);
|
||||||
|
}
|
||||||
|
strcpy(run_normal,run_array[category_idx]);
|
||||||
|
strcpy(run_onInput,run_oninput_array[category_idx]);
|
||||||
|
strcpy(run_offInput,run_offinput_array[category_idx]);
|
||||||
|
system(run_offInput);
|
||||||
|
for(r = 0; r < config_de_max; r++){
|
||||||
|
if(config_de_array[category_idx][r] != -1){
|
||||||
|
int de_id_idx = in_int(de_id_array, de_len, config_de_array[category_idx][r]);
|
||||||
|
if(strcicmp(current_category, "term") == 0){
|
||||||
|
if(debug == true){
|
||||||
|
printf("Running de term command: %s\n",de_runterm_array[de_id_idx]);
|
||||||
|
}
|
||||||
|
system(de_runterm_array[de_id_idx]);
|
||||||
|
}
|
||||||
|
else{
|
||||||
|
if(debug == true){
|
||||||
|
printf("Running de gui command: %s\n",de_rungui_array[de_id_idx]);
|
||||||
|
}
|
||||||
|
system(de_rungui_array[de_id_idx]);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else if(strcicmp(prior_app, current_app) != 0){
|
||||||
|
int indent = strlen(current_category)+2;
|
||||||
|
printf("%*c%s\n", indent, ' ',current_app);
|
||||||
|
}
|
||||||
|
|
||||||
|
fflush(stdout);
|
||||||
|
|
||||||
|
strcpy(prior_app,current_app);
|
||||||
|
strcpy(prior_category,current_category);
|
||||||
|
|
||||||
|
if(strlen(run_onInput) > 0){
|
||||||
|
input_check = 1;
|
||||||
|
}
|
||||||
|
else{
|
||||||
|
input_check = 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
pthread_t threads[NUM_THREADS];
|
||||||
|
int rc;
|
||||||
|
int i;
|
||||||
|
ThreadArgs args = (ThreadArgs)malloc(sizeof(struct threadArgs));
|
||||||
|
args->run_onInput = run_onInput;
|
||||||
|
args->run_offInput = run_offInput;
|
||||||
|
for( i = 0; i < NUM_THREADS; i++ ) {
|
||||||
|
|
||||||
|
if(i==0){
|
||||||
|
rc = pthread_create(&threads[i], NULL, inputToggle, args);
|
||||||
|
}
|
||||||
|
else{
|
||||||
|
rc = pthread_create(&threads[i], NULL, nextPlease, (void *)&i);
|
||||||
|
}
|
||||||
|
if (rc) {
|
||||||
|
printf("Error:unable to create thread, %d\n", rc);
|
||||||
|
exit(-1);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
// wait for threads to close before continuing
|
||||||
|
for (int i = 0; i < NUM_THREADS; i++) {
|
||||||
|
pthread_join(threads[i], NULL);
|
||||||
|
}
|
||||||
|
|
||||||
|
w = get_focus_window(d, e.type, eventNames[e.type-1], current_app, debug);
|
||||||
|
w = get_top_window(d, w, e.type, eventNames[e.type-1], current_app, debug);
|
||||||
|
w = get_named_window(d, w, e.type, eventNames[e.type-1], current_app, debug);
|
||||||
|
}
|
||||||
|
}
|
16
linux/xkb/systemd/keyswap.service
Executable file
16
linux/xkb/systemd/keyswap.service
Executable file
@@ -0,0 +1,16 @@
|
|||||||
|
[Unit]
|
||||||
|
Description=keyswap for Terminal and GUI
|
||||||
|
PartOf=graphical-session.target
|
||||||
|
|
||||||
|
[Service]
|
||||||
|
Type=simple
|
||||||
|
Restart=always
|
||||||
|
# eg DISPLAY=:0.0
|
||||||
|
#Environment=DISPLAY={displayid}
|
||||||
|
RestartSec=1
|
||||||
|
WorkingDirectory=/home/{username}/.config/kinto
|
||||||
|
ExecStart=/bin/bash -c "/home/{username}/.config/kinto/xactive.sh carrots"
|
||||||
|
ExecStop=/bin/bash /home/{username}/.config/kinto/cleanup.sh
|
||||||
|
|
||||||
|
[Install]
|
||||||
|
WantedBy=default.target
|
11
linux/xkb/systemd/keyswap.timer
Normal file
11
linux/xkb/systemd/keyswap.timer
Normal file
@@ -0,0 +1,11 @@
|
|||||||
|
# keyswap.timer
|
||||||
|
[Unit]
|
||||||
|
Description=Runs the keyswap.service 5 seconds after boot up
|
||||||
|
|
||||||
|
[Timer]
|
||||||
|
#OnBootSec=5s
|
||||||
|
OnActiveSec=5s
|
||||||
|
Unit=keyswap.service
|
||||||
|
|
||||||
|
[Install]
|
||||||
|
WantedBy=default.target
|
76
linux/xkb/user_config.json
Normal file
76
linux/xkb/user_config.json
Normal file
@@ -0,0 +1,76 @@
|
|||||||
|
{"config":[{
|
||||||
|
"name":"gui",
|
||||||
|
"run":"",
|
||||||
|
"run_onInput":"",
|
||||||
|
"run_offInput": "killall xbindkeys > /dev/null 2>&1",
|
||||||
|
"symbols":"",
|
||||||
|
"types":"",
|
||||||
|
"de":[],
|
||||||
|
"appnames":[ "" ]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name":"term",
|
||||||
|
"run":"",
|
||||||
|
"run_onInput":"",
|
||||||
|
"run_offInput": "killall xbindkeys > /dev/null 2>&1",
|
||||||
|
"symbols":"",
|
||||||
|
"types":"",
|
||||||
|
"de":[],
|
||||||
|
"appnames":[ "alacritty","deepin-terminal","eterm","gnome-terminal","guake","hyper","io.elementary.terminal","kinto-gui.py","kitty","konsole","lxterminal","mate-terminal","qterminal","st","sakura","station","terminator","termite","tilda","tilix","urxvt","xfce4-terminal","xterm" ]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "firefox",
|
||||||
|
"run": "",
|
||||||
|
"run_onInput": "pkill -f ~/.config/kinto/.firefox-nw",
|
||||||
|
"run_offInput": "xbindkeys -f $HOME/.config/kinto/.firefox-nw",
|
||||||
|
"symbols": "",
|
||||||
|
"types": "",
|
||||||
|
"de": [],
|
||||||
|
"appnames": [ "Firefox" ]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "chrome",
|
||||||
|
"run": "",
|
||||||
|
"run_onInput": "xkbcomp -w0 -I$HOME/.xkb ~/.xkb/keymap/kbd.mac.gui $DISPLAY",
|
||||||
|
"run_offInput": "xkbcomp -w0 -I$HOME/.xkb ~/.xkb/keymap/kbd.mac.gui.chrome $DISPLAY",
|
||||||
|
"symbols": "",
|
||||||
|
"types": "",
|
||||||
|
"de": [],
|
||||||
|
"appnames": [ "Chromium","Chromium-browser","Google-chrome","Epiphany" ]
|
||||||
|
}],
|
||||||
|
"init": [],
|
||||||
|
"detypes":["gnome2","gnome3","kde4","kde5","xfce","i3wm"],
|
||||||
|
"de":[{
|
||||||
|
"id": 1,
|
||||||
|
"type": ["gnome3"],
|
||||||
|
"active": false,
|
||||||
|
"intent":"init",
|
||||||
|
"name":"gnome-init",
|
||||||
|
"description":"Gnome - Remove Superkey Overlay keybinding to Activities Overview",
|
||||||
|
"run":"gsettings set org.gnome.mutter overlay-key ''",
|
||||||
|
"run_term":"",
|
||||||
|
"run_gui":""
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": 2,
|
||||||
|
"type": ["gnome3"],
|
||||||
|
"active": false,
|
||||||
|
"intent":"gui_term",
|
||||||
|
"name":"Gnome Activities Overview",
|
||||||
|
"description":"Cmd+Space activates Activities Overview",
|
||||||
|
"run":"",
|
||||||
|
"run_term":"gsettings set org.gnome.desktop.wm.keybindings panel-main-menu \"['<Control><Shift>Space']\"",
|
||||||
|
"run_gui":"gsettings set org.gnome.desktop.wm.keybindings panel-main-menu \"['<Ctrl>Space']\""
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": 3,
|
||||||
|
"type": ["kde5"],
|
||||||
|
"active": false,
|
||||||
|
"intent":"init",
|
||||||
|
"name":"kde-init",
|
||||||
|
"description":"KDE Plasma 5 - Removes Superkey Overlay from the Launcher Menu",
|
||||||
|
"run":"kwriteconfig5 --file ~/.config/kwinrc --group ModifierOnlyShortcuts --key Meta \"\";qdbus org.kde.KWin /KWin reconfigure",
|
||||||
|
"run_term":"",
|
||||||
|
"run_gui":""
|
||||||
|
}]
|
||||||
|
}
|
@@ -4,8 +4,8 @@ Description=xkeysnail
|
|||||||
[Service]
|
[Service]
|
||||||
Type=simple
|
Type=simple
|
||||||
KillMode=process
|
KillMode=process
|
||||||
ExecStart=/usr/bin/sudo /bin/bash -c '/usr/bin/xhost +SI:localuser:root && {homedir}/.config/kinto/killdups.sh && {xkeysnail} --quiet --watch {homedir}/.config/kinto/kinto.py'
|
ExecStart={sudo}/bin/bash -c '/usr/bin/xhost +SI:localuser:root && {homedir}/.config/kinto/killdups.sh && {xkeysnail} --quiet --watch {homedir}/.config/kinto/kinto.py'
|
||||||
ExecStop=/usr/bin/sudo /bin/bash -c '/usr/bin/sudo pkill -f bin/xkeysnail && exit 0'
|
ExecStop={sudo}/bin/bash -c '{sudo}pkill -f bin/xkeysnail && exit 0'
|
||||||
Restart=on-failure
|
Restart=on-failure
|
||||||
RestartSec=3
|
RestartSec=3
|
||||||
Environment=DISPLAY={displayid}
|
Environment=DISPLAY={displayid}
|
||||||
|
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
|
28
setup.py
28
setup.py
@@ -29,15 +29,15 @@ def windows_setup():
|
|||||||
print("This install will fail if you are not running with elevated privileges")
|
print("This install will fail if you are not running with elevated privileges")
|
||||||
os.system('powershell -executionpolicy bypass ".\\windows\\autohotkey.ps1"')
|
os.system('powershell -executionpolicy bypass ".\\windows\\autohotkey.ps1"')
|
||||||
print("Copying autohotkey combinations for Terminals & Editors...")
|
print("Copying autohotkey combinations for Terminals & Editors...")
|
||||||
os.system('copy /Y "' + path + '\\windows\\kinto.ahk" "' + path + '\\windows\\kinto-new.ahk"')
|
os.system('copy /Y "' + path + '\\windows\\kinto.ahk" "' + homedir + '\\kinto-new.ahk"')
|
||||||
if default < 3:
|
if default < 3:
|
||||||
os.system('C:\\Strawberry\\perl\\bin\\perl.exe -pi -e "s/(; )(.*)(; Default)(?!( - ST2CODE))(.*)/$2$3$5/g" .\\windows\\kinto-new.ahk')
|
os.system('C:\\Strawberry\\perl\\bin\\perl.exe -pi -e "s/(; )(.*)(; Default)(?!( - ST2CODE))(.*)/$2$3$5/gm" ' + homedir + '\\kinto-new.ahk')
|
||||||
if default == 1:
|
if default == 1:
|
||||||
kbtype = "mac"
|
kbtype = "mac"
|
||||||
os.system('C:\\Strawberry\\perl\\bin\\perl.exe -pi -e "s/(; )(.*)(; MacModifiers)/$2$3/g" .\\windows\\kinto-new.ahk')
|
os.system('C:\\Strawberry\\perl\\bin\\perl.exe -pi -e "s/(; )(.*)(; MacModifiers)/$2$3/gm" ' + homedir + '\\kinto-new.ahk')
|
||||||
elif default == 2:
|
elif default == 2:
|
||||||
kbtype = "win"
|
kbtype = "win"
|
||||||
os.system('C:\\Strawberry\\perl\\bin\\perl.exe -pi -e "s/(; )(.*)(; WinModifiers)/$2$3/g" .\\windows\\kinto-new.ahk')
|
os.system('C:\\Strawberry\\perl\\bin\\perl.exe -pi -e "s/(; )(.*)(; WinModifiers)/$2$3/gm" ' + homedir + '\\kinto-new.ahk')
|
||||||
elif default == 5:
|
elif default == 5:
|
||||||
print("Removing any old registry keys from prior versions...")
|
print("Removing any old registry keys from prior versions...")
|
||||||
p = subprocess.Popen(['powershell.exe', "Remove-ItemProperty -Path HKLM:'SYSTEM\CurrentControlSet\Control\Keyboard Layout' -Name 'Scancode Map' -ErrorAction SilentlyContinue"], stdout=sys.stdout)
|
p = subprocess.Popen(['powershell.exe', "Remove-ItemProperty -Path HKLM:'SYSTEM\CurrentControlSet\Control\Keyboard Layout' -Name 'Scancode Map' -ErrorAction SilentlyContinue"], stdout=sys.stdout)
|
||||||
@@ -52,32 +52,32 @@ def windows_setup():
|
|||||||
print("Uninstall of Kinto is Complete.")
|
print("Uninstall of Kinto is Complete.")
|
||||||
if default == 3:
|
if default == 3:
|
||||||
kbtype = "chrome"
|
kbtype = "chrome"
|
||||||
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/(; )(.*)(; Chromebook)/$2$3/gm" ' + homedir + '\\kinto-new.ahk')
|
||||||
os.system('C:\\Strawberry\\perl\\bin\\perl.exe -pi -e "s/(; )(.*)(; WinModifiers/CB)/$2$3/g" .\\windows\\kinto-new.ahk')
|
os.system('C:\\Strawberry\\perl\\bin\\perl.exe -pi -e "s/(; )(.*)(; WinModifiers\/CB)/$2$3/gm" ' + homedir + '\\kinto-new.ahk')
|
||||||
if default == 3 or default == 4:
|
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/gm" ' + homedir + '\\kinto-new.ahk')
|
||||||
os.system('C:\\Strawberry\\perl\\bin\\perl.exe -pi -e "s/(; )(.*)(; WinModifiers\/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/gm" ' + homedir + '\\kinto-new.ahk')
|
||||||
if default == 4:
|
if default == 4:
|
||||||
kbtype = "ibm"
|
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/(; )(.*)(; IBM)/$2$3/gm" ' + homedir + '\\kinto-new.ahk')
|
||||||
if default > 0 and default < 5:
|
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)
|
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 Terminal Theme as default...")
|
print("\nWill now install Ubuntu Terminal Theme as default...")
|
||||||
os.system('regedit "' + path + '\\windows\\theme_ubuntu.reg"')
|
os.system('regedit "' + path + '\\windows\\theme_ubuntu.reg"')
|
||||||
os.system('robocopy "'+ path + '\\assets" "%userprofile%\\.kinto\\assets" /E')
|
os.system('robocopy "'+ path + '\\assets" "%userprofile%\\.kinto\\assets" /E')
|
||||||
if (stvscode and (default > 0 or default < 3)):
|
if (stvscode and (default > 0 or default < 3)):
|
||||||
os.system('C:\\Strawberry\\perl\\bin\\perl.exe -pi -e "s/(; )(.*)(; Default - ST2CODE)/$2$3/g" .\\windows\\kinto-new.ahk')
|
os.system('C:\\Strawberry\\perl\\bin\\perl.exe -pi -e "s/(; )(.*)(; Default - ST2CODE)/$2$3/gm" ' + homedir + '\\kinto-new.ahk')
|
||||||
elif (stvscode and (default == 3 or default == 4 )):
|
elif (stvscode and (default == 3 or default == 4 )):
|
||||||
os.system('C:\\Strawberry\\perl\\bin\\perl.exe -pi -e "s/(; )(.*)(; CB/IBM - ST2CODE)/$2$3/g" .\\windows\\kinto-new.ahk')
|
os.system('C:\\Strawberry\\perl\\bin\\perl.exe -pi -e "s/(; )(.*)(; CB/IBM - ST2CODE)/$2$3/gm" ' + homedir + '\\kinto-new.ahk')
|
||||||
os.system('copy /Y "' + path + '\\windows\\kinto-start.vbs" "%userprofile%\\.kinto\\kinto-start.vbs"')
|
os.system('copy /Y "' + path + '\\windows\\kinto-start.vbs" "%userprofile%\\.kinto\\kinto-start.vbs"')
|
||||||
os.system('C:\\Strawberry\\perl\\bin\\perl.exe -pi -e "s/{kbtype}/' + kbtype + '/g" "%userprofile%\\.kinto\\kinto-start.vbs"')
|
os.system('C:\\Strawberry\\perl\\bin\\perl.exe -pi -e "s/{kbtype}/' + kbtype + '/gm" "%userprofile%\\.kinto\\kinto-start.vbs"')
|
||||||
os.system('copy /Y "' + path + '\\windows\\usb.vbs" "%userprofile%\\.kinto\\usb.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('copy /Y "' + path + '\\windows\\detectUSB.ahk" "%userprofile%\\.kinto\\detectUSB.ahk"')
|
||||||
os.system('mklink "%userprofile%\\AppData\\Roaming\\Microsoft\\Windows\\STARTM~1\\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\\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\\toggle_kb.bat" "%userprofile%\\.kinto\\toggle_kb.bat"')
|
||||||
os.system('copy /Y "'+ path + '\\windows\\kinto-new.ahk" "%userprofile%\\.kinto\\kinto.ahk"')
|
os.system('copy /Y "'+ homedir + '\\kinto-new.ahk" "%userprofile%\\.kinto\\kinto.ahk"')
|
||||||
os.system("del /f .\\windows\\kinto-new.ahk")
|
os.system("del /f " + homedir + "\\kinto-new.ahk")
|
||||||
os.system("del \"C:\\ProgramData\\Microsoft\\Windows\\Start Menu\\Programs\\StartUp\\kinto.ahk\" 2> nul")
|
os.system("del \"C:\\ProgramData\\Microsoft\\Windows\\Start Menu\\Programs\\StartUp\\kinto.ahk\" 2> nul")
|
||||||
userpath = cmdline('cmd /c for %A in ("%userprofile%") do @echo %~sA')[:-1]
|
userpath = cmdline('cmd /c for %A in ("%userprofile%") do @echo %~sA')[:-1]
|
||||||
print('Starting... "' + userpath + '\\AppData\\Roaming\\Microsoft\\Windows\\STARTM~1\\Programs\\Startup\\kinto-start.vbs"')
|
print('Starting... "' + userpath + '\\AppData\\Roaming\\Microsoft\\Windows\\STARTM~1\\Programs\\Startup\\kinto-start.vbs"')
|
||||||
|
@@ -172,8 +172,10 @@ GroupAdd, browsers, ahk_exe msedge.exe
|
|||||||
|
|
||||||
; Disable Key Remapping for Virtual Machines
|
; Disable Key Remapping for Virtual Machines
|
||||||
; Disable for Remote desktop solutions too
|
; Disable for Remote desktop solutions too
|
||||||
GroupAdd, virtm, ahk_exe VirtualBoxVM.exe
|
GroupAdd, remotes, ahk_exe VirtualBoxVM.exe
|
||||||
GroupAdd, virtm, ahk_exe mstsc.exe
|
GroupAdd, remotes, ahk_exe mstsc.exe
|
||||||
|
GroupAdd, remotes, ahk_exe msrdc.exe
|
||||||
|
GroupAdd, remotes, ahk_exe nxplayer.bin
|
||||||
|
|
||||||
; Disabled Edge for now - no ability to close all instances
|
; Disabled Edge for now - no ability to close all instances
|
||||||
; GroupAdd, browsers, Microsoft Edge ahk_class ApplicationFrameWindow
|
; GroupAdd, browsers, Microsoft Edge ahk_class ApplicationFrameWindow
|
||||||
@@ -188,7 +190,19 @@ GroupAdd, intellij, ahk_exe idea64.exe
|
|||||||
|
|
||||||
; SetCapsLockState, AlwaysOff ; CB/IBM
|
; SetCapsLockState, AlwaysOff ; CB/IBM
|
||||||
|
|
||||||
#IfWinNotActive ahk_group virtm
|
; Keyboards w/o media keys can use this Remap
|
||||||
|
; This will replace unneeded dedicated keys
|
||||||
|
; with most commonly used media keys
|
||||||
|
;
|
||||||
|
; Insert::SoundSet, +1, , mute ; Toggles Speaker
|
||||||
|
; +Insert::Insert ; Shift Insert maps to Insert
|
||||||
|
; Home::SoundSetWaveVolume, -10 ; Decrease volume
|
||||||
|
; PgUp::SoundSetWaveVolume, +10 ; Increase volume
|
||||||
|
; Delete::Send {Media_Prev} ; Previous
|
||||||
|
; End::Send {Media_Play_Pause} ; Pause/Play
|
||||||
|
; PgDn::Send {Media_Next} ; Next
|
||||||
|
|
||||||
|
#IfWinNotActive ahk_group remotes
|
||||||
|
|
||||||
; New AltTab and CtrlTab fix
|
; New AltTab and CtrlTab fix
|
||||||
*tab::
|
*tab::
|
||||||
@@ -568,7 +582,7 @@ GroupAdd, intellij, ahk_exe idea64.exe
|
|||||||
; #x::Send ^{x} ; Default - Terminal - Ctrl-x
|
; #x::Send ^{x} ; Default - Terminal - Ctrl-x
|
||||||
; #c::Send ^{c} ; Default - Terminal - Ctrl-c sigint
|
; #c::Send ^{c} ; Default - Terminal - Ctrl-c sigint
|
||||||
; !x::Send ^{x} ; CB/IBM
|
; !x::Send ^{x} ; CB/IBM
|
||||||
; !c::Send ^{c} ; CB/IBM
|
; !c::Send ^{c} ; CB/IBM - Sigint
|
||||||
; #c::send ^{Pause} ; cancel_build
|
; #c::send ^{Pause} ; cancel_build
|
||||||
; #Space::Send ^{Space} ; Default - Basic code completion
|
; #Space::Send ^{Space} ; Default - Basic code completion
|
||||||
; !Space::Send ^{Space} ; CB/IBM - Basic code completion
|
; !Space::Send ^{Space} ; CB/IBM - Basic code completion
|
||||||
@@ -592,7 +606,6 @@ GroupAdd, intellij, ahk_exe idea64.exe
|
|||||||
Insert::Return ; cancel toggle_overwrite
|
Insert::Return ; cancel toggle_overwrite
|
||||||
^!O::send {Insert} ; toggle_overwrite
|
^!O::send {Insert} ; toggle_overwrite
|
||||||
; !c::Return ; Default - cancel toggle_case_sensitive
|
; !c::Return ; Default - cancel toggle_case_sensitive
|
||||||
; $!c::send ^{c} ; CB/IBM - Sigint
|
|
||||||
^!c::send !{c} ; toggle_case_sensitive
|
^!c::send !{c} ; toggle_case_sensitive
|
||||||
; ^h::Return ; cancel replace
|
; ^h::Return ; cancel replace
|
||||||
^!f::send ^{h} ; replace
|
^!f::send ^{h} ; replace
|
||||||
@@ -600,6 +613,7 @@ GroupAdd, intellij, ahk_exe idea64.exe
|
|||||||
^!e::send ^+{h} ; replace_next
|
^!e::send ^+{h} ; replace_next
|
||||||
F3::Return ; cancel find_next
|
F3::Return ; cancel find_next
|
||||||
^g::send {F3} ; find_next
|
^g::send {F3} ; find_next
|
||||||
|
#g::send ^{g} ; goto line - disable game bar - Start menu -> Game bar shortcuts -> toggle Off
|
||||||
*F3::Return ; cancel find_prev, find_under, find_all_under
|
*F3::Return ; cancel find_prev, find_under, find_all_under
|
||||||
^+g::send +{F3} ; find_prev
|
^+g::send +{F3} ; find_prev
|
||||||
#!g::send ^{F3} ; find_under
|
#!g::send ^{F3} ; find_under
|
||||||
@@ -729,45 +743,45 @@ GroupAdd, intellij, ahk_exe idea64.exe
|
|||||||
; Clear Terminal and Scroll Buffer
|
; Clear Terminal and Scroll Buffer
|
||||||
^k::Send clear && printf '\e[3J'{Enter}
|
^k::Send clear && printf '\e[3J'{Enter}
|
||||||
; Remap Physical Ctrl back to Ctrl
|
; Remap Physical Ctrl back to Ctrl
|
||||||
#0::Send {LCtrl down}0{Ctrl up} ; Default
|
; #0::Send {LCtrl down}0{Ctrl up} ; Default
|
||||||
#1::Send {LCtrl down}1{Ctrl up} ; Default
|
; #1::Send {LCtrl down}1{Ctrl up} ; Default
|
||||||
#2::Send {LCtrl down}2{Ctrl up} ; Default
|
; #2::Send {LCtrl down}2{Ctrl up} ; Default
|
||||||
#3::Send {LCtrl down}3{Ctrl up} ; Default
|
; #3::Send {LCtrl down}3{Ctrl up} ; Default
|
||||||
#4::Send {LCtrl down}4{Ctrl up} ; Default
|
; #4::Send {LCtrl down}4{Ctrl up} ; Default
|
||||||
#5::Send {LCtrl down}5{Ctrl up} ; Default
|
; #5::Send {LCtrl down}5{Ctrl up} ; Default
|
||||||
#6::Send {LCtrl down}6{Ctrl up} ; Default
|
; #6::Send {LCtrl down}6{Ctrl up} ; Default
|
||||||
#7::Send {LCtrl down}7{Ctrl up} ; Default
|
; #7::Send {LCtrl down}7{Ctrl up} ; Default
|
||||||
#8::Send {LCtrl down}8{Ctrl up} ; Default
|
; #8::Send {LCtrl down}8{Ctrl up} ; Default
|
||||||
#9::Send {LCtrl down}9{Ctrl up} ; Default
|
; #9::Send {LCtrl down}9{Ctrl up} ; Default
|
||||||
#-::Send {LCtrl down}-{Ctrl up} ; Default
|
; #-::Send {LCtrl down}-{Ctrl up} ; Default
|
||||||
#=::Send {LCtrl down}={Ctrl up} ; Default
|
; #=::Send {LCtrl down}={Ctrl up} ; Default
|
||||||
#`::Send {LCtrl down}`{Ctrl up} ; Default
|
; #`::Send {LCtrl down}`{Ctrl up} ; Default
|
||||||
#a::Send {LCtrl down}a{Ctrl up} ; Default
|
; #a::Send {LCtrl down}a{Ctrl up} ; Default
|
||||||
#b::Send {LCtrl down}b{Ctrl up} ; Default
|
; #b::Send {LCtrl down}b{Ctrl up} ; Default
|
||||||
#c::Send {LCtrl down}c{Ctrl up} ; Default
|
; #c::Send {LCtrl down}c{Ctrl up} ; Default
|
||||||
#d::Send {LCtrl down}d{Ctrl up} ; Default
|
; #d::Send {LCtrl down}d{Ctrl up} ; Default
|
||||||
#e::Send {LCtrl down}e{Ctrl up} ; Default
|
; #e::Send {LCtrl down}e{Ctrl up} ; Default
|
||||||
#f::Send {LCtrl down}f{Ctrl up} ; Default
|
; #f::Send {LCtrl down}f{Ctrl up} ; Default
|
||||||
#g::Send {LCtrl down}g{Ctrl up} ; Default
|
; #g::Send {LCtrl down}g{Ctrl up} ; Default
|
||||||
#h::Send {LCtrl down}h{Ctrl up} ; Default
|
; #h::Send {LCtrl down}h{Ctrl up} ; Default
|
||||||
#i::Send {LCtrl down}i{Ctrl up} ; Default
|
; #i::Send {LCtrl down}i{Ctrl up} ; Default
|
||||||
#j::Send {LCtrl down}j{Ctrl up} ; Default
|
; #j::Send {LCtrl down}j{Ctrl up} ; Default
|
||||||
#k::Send {LCtrl down}k{Ctrl up} ; Default
|
; #k::Send {LCtrl down}k{Ctrl up} ; Default
|
||||||
#l::Send {LCtrl down}l{Ctrl up} ; Default
|
; #l::Send {LCtrl down}l{Ctrl up} ; Default
|
||||||
#m::Send {LCtrl down}m{Ctrl up} ; Default
|
; #m::Send {LCtrl down}m{Ctrl up} ; Default
|
||||||
#n::Send {LCtrl down}n{Ctrl up} ; Default
|
; #n::Send {LCtrl down}n{Ctrl up} ; Default
|
||||||
#o::Send {LCtrl down}o{Ctrl up} ; Default
|
; #o::Send {LCtrl down}o{Ctrl up} ; Default
|
||||||
#p::Send {LCtrl down}p{Ctrl up} ; Default
|
; #p::Send {LCtrl down}p{Ctrl up} ; Default
|
||||||
#q::Send {LCtrl down}q{Ctrl up} ; Default
|
; #q::Send {LCtrl down}q{Ctrl up} ; Default
|
||||||
#r::Send {LCtrl down}r{Ctrl up} ; Default
|
; #r::Send {LCtrl down}r{Ctrl up} ; Default
|
||||||
#s::Send {LCtrl down}s{Ctrl up} ; Default
|
; #s::Send {LCtrl down}s{Ctrl up} ; Default
|
||||||
#t::Send {LCtrl down}t{Ctrl up} ; Default
|
; #t::Send {LCtrl down}t{Ctrl up} ; Default
|
||||||
#u::Send {LCtrl down}u{Ctrl up} ; Default
|
; #u::Send {LCtrl down}u{Ctrl up} ; Default
|
||||||
#v::Send {LCtrl down}v{Ctrl up} ; Default
|
; #v::Send {LCtrl down}v{Ctrl up} ; Default
|
||||||
#w::Send {LCtrl down}w{Ctrl up} ; Default
|
; #w::Send {LCtrl down}w{Ctrl up} ; Default
|
||||||
#x::Send {LCtrl down}x{Ctrl up} ; Default
|
; #x::Send {LCtrl down}x{Ctrl up} ; Default
|
||||||
#y::Send {LCtrl down}y{Ctrl up} ; Default
|
; #y::Send {LCtrl down}y{Ctrl up} ; Default
|
||||||
#z::Send {LCtrl down}z{Ctrl up} ; Default
|
; #z::Send {LCtrl down}z{Ctrl up} ; Default
|
||||||
; !0::Send {LCtrl down}0{Ctrl up} ; CB/IBM
|
; !0::Send {LCtrl down}0{Ctrl up} ; CB/IBM
|
||||||
; !1::Send {LCtrl down}1{Ctrl up} ; CB/IBM
|
; !1::Send {LCtrl down}1{Ctrl up} ; CB/IBM
|
||||||
; !2::Send {LCtrl down}2{Ctrl up} ; CB/IBM
|
; !2::Send {LCtrl down}2{Ctrl up} ; CB/IBM
|
||||||
|
@@ -3,11 +3,18 @@
|
|||||||
# set about:config?filter=ui.key.menuAccessKeyFocuses
|
# set about:config?filter=ui.key.menuAccessKeyFocuses
|
||||||
# to false for wordwise to work in Firefox
|
# to false for wordwise to work in Firefox
|
||||||
|
|
||||||
|
function pause(){
|
||||||
|
read -s -n 1 -p "Press any key to continue . . ."
|
||||||
|
echo ""
|
||||||
|
}
|
||||||
|
|
||||||
typeset -l distro
|
typeset -l distro
|
||||||
distro=$(awk -F= '$1=="NAME" { gsub("[\",!,_, ]","",$2);print $2 ;}' /etc/os-release)
|
distro=$(awk -F= '$1=="NAME" { gsub("[\",!,_, ]","",$2);print $2 ;}' /etc/os-release)
|
||||||
typeset -l dename
|
typeset -l dename
|
||||||
dename=$(./linux/system-config/dename.sh | cut -d " " -f1)
|
dename=$(./linux/system-config/dename.sh | cut -d " " -f1)
|
||||||
|
|
||||||
|
sysv=$(pidof systemd >/dev/null 2>&1 && echo "1" || echo "0")
|
||||||
|
|
||||||
function uninstall {
|
function uninstall {
|
||||||
|
|
||||||
echo -e "\nNote: Restoring keys is only relevant if you had installed a version prior to 1.2 of Kinto. You should skip this step if 1.2+ is all you have installed."
|
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,8 +45,12 @@ function uninstall {
|
|||||||
mv ~/.config/kglobalshortcutsrc ~/.config/kglobalshortcutsrc.kinto
|
mv ~/.config/kglobalshortcutsrc ~/.config/kglobalshortcutsrc.kinto
|
||||||
elif [ "$dename" == "xfce" ];then
|
elif [ "$dename" == "xfce" ];then
|
||||||
echo "Resetting DE hotkeys..."
|
echo "Resetting DE hotkeys..."
|
||||||
|
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
|
cp /etc/xdg/xfce4/xfconf/xfce-perchannel-xml/xfce4-keyboard-shortcuts.xml ~/.config/xfce4/xfconf/xfce-perchannel-xml/xfce4-keyboard-shortcuts.xml
|
||||||
fi
|
fi
|
||||||
|
fi
|
||||||
elif [ "$yn" == "r" ]; then
|
elif [ "$yn" == "r" ]; then
|
||||||
echo "Restore original user shortcuts"
|
echo "Restore original user shortcuts"
|
||||||
if [[ $dename == "gnome" || $dename == "budgie" ]]; then
|
if [[ $dename == "gnome" || $dename == "budgie" ]]; then
|
||||||
@@ -77,6 +88,12 @@ function uninstall {
|
|||||||
echo -e "\nWill still be restoring the overlay key"
|
echo -e "\nWill still be restoring the overlay key"
|
||||||
echo -e "gsettings set org.gnome.mutter overlay-key 'super'\n"
|
echo -e "gsettings set org.gnome.mutter overlay-key 'super'\n"
|
||||||
gsettings set org.gnome.mutter overlay-key 'super'
|
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
|
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 /etc/systemd/system/graphical.target.wants/xkeysnail.service"
|
||||||
echo "rm /usr/lib/systemd/system/xkeysnail.service"
|
echo "rm /usr/lib/systemd/system/xkeysnail.service"
|
||||||
echo "rm /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/xkeysnail.service >/dev/null 2>&1
|
||||||
sudo rm /etc/systemd/system/graphical.target.wants/xkeysnail.service >/dev/null 2>&1
|
sudo rm /etc/systemd/system/graphical.target.wants/xkeysnail.service >/dev/null 2>&1
|
||||||
sudo rm /usr/lib/systemd/system/xkeysnail.service >/dev/null 2>&1
|
sudo rm /usr/lib/systemd/system/xkeysnail.service >/dev/null 2>&1
|
||||||
@@ -207,6 +225,9 @@ fi
|
|||||||
sudo systemctl stop xkeysnail >/dev/null 2>&1
|
sudo systemctl stop xkeysnail >/dev/null 2>&1
|
||||||
sudo systemctl disable 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 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
|
sudo pkill -f "is-active xkeysnail" >/dev/null 2>&1
|
||||||
|
|
||||||
if [ "$distro" == "manjarolinux" ]; then
|
if [ "$distro" == "manjarolinux" ]; then
|
||||||
@@ -236,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.."
|
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 ''
|
gsettings set org.gnome.mutter overlay-key ''
|
||||||
fi
|
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
|
fi
|
||||||
|
|
||||||
# if ls /etc/apt/sources.list.d/system76* 1> /dev/null 2>&1; then
|
# if ls /etc/apt/sources.list.d/system76* 1> /dev/null 2>&1; then
|
||||||
@@ -280,25 +329,6 @@ if [[ $distro == 'kdeneon' ]]; then
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
if [[ $distro == 'fedora' ]]; then
|
if [[ $distro == 'fedora' ]]; then
|
||||||
echo "Checking SELinux status..."
|
|
||||||
if [[ $(perl -ne 'print if /^SELINUX=enforcing/' /etc/selinux/config | wc -l) != 0 ]]; then
|
|
||||||
while true; do
|
|
||||||
read -rep $'\nWould you like to update your SELinux state from enforcing to permissive? (y/n)\n' yn
|
|
||||||
case $yn in
|
|
||||||
[Yy]* ) setSE='yes'; break;;
|
|
||||||
[Nn]* ) exp='no'; expsh=" " break;;
|
|
||||||
# * ) echo "Please answer yes or no.";;
|
|
||||||
esac
|
|
||||||
done
|
|
||||||
|
|
||||||
if [[ $yn == "yes" ]]; then
|
|
||||||
sed -i "s/SELINUX=enforcing/SELINUX=permissive/g" /etc/selinux/config
|
|
||||||
echo "/etc/selinux/config has been updated. Please reboot your computer before continuing."
|
|
||||||
exit 0
|
|
||||||
fi
|
|
||||||
else
|
|
||||||
echo "SELinux state should be ok for Kinto to install"
|
|
||||||
fi
|
|
||||||
if [[ $(gsettings get org.gnome.desktop.wm.keybindings show-desktop | grep "\[\]" | wc -l) == 1 ]];then
|
if [[ $(gsettings get org.gnome.desktop.wm.keybindings show-desktop | grep "\[\]" | wc -l) == 1 ]];then
|
||||||
gsettings set org.gnome.desktop.wm.keybindings show-desktop "['<Super>d']"
|
gsettings set org.gnome.desktop.wm.keybindings show-desktop "['<Super>d']"
|
||||||
else
|
else
|
||||||
@@ -352,12 +382,12 @@ if ! [ -x "$(command -v pip3)" ]; then
|
|||||||
sudo ./linux/system-config/unipkg.sh python3-pip
|
sudo ./linux/system-config/unipkg.sh python3-pip
|
||||||
fi
|
fi
|
||||||
if ! [ -x "$(command -v python3-config)" ]; then
|
if ! [ -x "$(command -v python3-config)" ]; then
|
||||||
if [ "$distro" == "ubuntu" ] || [ "$distro" == "debian" ] || [ "$distro" == 'linuxmint' ]; then
|
if [ "$distro" == "ubuntu" ] || [ "${distro::6}" == "debian" ] || [ "$distro" == 'linuxmint' ]; then
|
||||||
pydev="python3-dev"
|
pydev="python3-dev"
|
||||||
elif [ "$distro" == "fedora" ]; then
|
elif [ "$distro" == "fedora" ]; then
|
||||||
pydev="python3-devel"
|
pydev="python3-devel"
|
||||||
fi
|
fi
|
||||||
if [ "$distro" == "gnome" ] || [ "$distro" == "fedora" ] || [ "$distro" == "debian" ] || [ "$distro" == 'linuxmint' ]; then
|
if [ "$distro" == "gnome" ] || [ "$distro" == "fedora" ] || [ "${distro::6}" == "debian" ] || [ "$distro" == 'linuxmint' ]; then
|
||||||
echo "Will need to install $pydev..."
|
echo "Will need to install $pydev..."
|
||||||
sudo ./linux/system-config/unipkg.sh "$pydev"
|
sudo ./linux/system-config/unipkg.sh "$pydev"
|
||||||
fi
|
fi
|
||||||
@@ -372,6 +402,8 @@ if ! [ -x "$(command -v xhost)" ] || ! [ -x "$(command -v gcc)" ]; then
|
|||||||
fi
|
fi
|
||||||
if [ "$distro" == 'linuxmint' ] ; then
|
if [ "$distro" == 'linuxmint' ] ; then
|
||||||
pip3 install setuptools
|
pip3 install setuptools
|
||||||
|
elif [ "${distro::6}" == "debian" ]; then
|
||||||
|
sudo pip3 install setuptools wheel
|
||||||
fi
|
fi
|
||||||
|
|
||||||
pip3 install pillow
|
pip3 install pillow
|
||||||
@@ -386,7 +418,11 @@ mkdir -p ~/.config/kinto
|
|||||||
|
|
||||||
# KDE startup - xhost fix
|
# KDE startup - xhost fix
|
||||||
mkdir -p ~/.config/autostart
|
mkdir -p ~/.config/autostart
|
||||||
|
if [ ! "$sysv" -eq 0 ];then
|
||||||
yes | cp -rf ./linux/xkeysnail.desktop ~/.config/kinto/xkeysnail.desktop
|
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
|
# yes | cp -rf ./linux/xkeystart.sh ~/.config/kinto/xkeystart.sh
|
||||||
|
|
||||||
@@ -411,7 +447,6 @@ else
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
yes | cp -rf ./linux/kinto.py ./linux/kinto.py.new
|
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 -rf ./linux/gui/ ~/.config/kinto/
|
||||||
yes | cp -nrf ./linux/initkb ~/.config/kinto/initkb
|
yes | cp -nrf ./linux/initkb ~/.config/kinto/initkb
|
||||||
yes | cp -rf ./linux/killdups.sh ~/.config/kinto/killdups.sh
|
yes | cp -rf ./linux/killdups.sh ~/.config/kinto/killdups.sh
|
||||||
@@ -424,6 +459,13 @@ 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-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/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/system-config/caret_status_xkey.sh ~/.config/kinto/caret_status_xkey.sh
|
||||||
|
|
||||||
|
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.service ./linux/xkeysnail.service.new
|
||||||
# yes | cp -rf ./linux/xkeysnail.timer ~/.config/systemd/user/xkeysnail.timer
|
# yes | cp -rf ./linux/xkeysnail.timer ~/.config/systemd/user/xkeysnail.timer
|
||||||
sed -i "s#{experimental-caret}#$exp#g" ./linux/xkeysnail.service.new
|
sed -i "s#{experimental-caret}#$exp#g" ./linux/xkeysnail.service.new
|
||||||
@@ -434,19 +476,19 @@ else
|
|||||||
fi
|
fi
|
||||||
sed -i "s/{username}/`whoami`/g" ./linux/xkeysnail.service.new
|
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" ./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
|
||||||
|
echo "Using sysvinit..."
|
||||||
|
fi
|
||||||
sed -i "s#{homedir}#`echo "$HOME"`#g" ~/.config/kinto/kintotray.desktop
|
sed -i "s#{homedir}#`echo "$HOME"`#g" ~/.config/kinto/kintotray.desktop
|
||||||
sed -i "s#{homedir}#`echo "$HOME"`#g" ~/.config/kinto/gui/kinto-gui.py
|
sed -i "s#{homedir}#`echo "$HOME"`#g" ~/.config/kinto/gui/kinto-gui.py
|
||||||
sed -i "s#{homedir}#`echo "$HOME"`#g" ./linux/gui/kinto.desktop.new
|
sed -i "s#{homedir}#`echo "$HOME"`#g" ./linux/gui/kinto.desktop.new
|
||||||
sudo mv ./linux/gui/kinto.desktop.new /usr/share/applications/kinto.desktop
|
sudo mv ./linux/gui/kinto.desktop.new /usr/share/applications/kinto.desktop
|
||||||
sed -i "s#{xhost}#`\\which xhost`#g" ./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#{systemctl}#`\\which systemctl`#g" ~/.config/kinto/xkeysnail.desktop
|
||||||
sed -i "s#{xhost}#`\\which xhost`#g" ~/.config/kinto/xkeysnail.desktop
|
sed -i "s#{xhost}#`\\which xhost`#g" ~/.config/kinto/xkeysnail.desktop
|
||||||
sed -i "s#{homedir}#`echo "$HOME"`#g" ~/.config/kinto/xkeysnail.desktop
|
sed -i "s#{homedir}#`echo "$HOME"`#g" ~/.config/kinto/xkeysnail.desktop
|
||||||
# sed -i "s#{homedir}#`echo "$HOME"`#g" ~/.config/kinto/prexk.sh
|
# sed -i "s#{homedir}#`echo "$HOME"`#g" ~/.config/kinto/prexk.sh
|
||||||
sed -i "s/{displayid}/`echo "$DISPLAY"`/g" ./linux/xkeysnail.service.new
|
|
||||||
# sed -i "s/{displayid}/`echo "$DISPLAY"`/g" ~/.config/kinto/prexk.sh
|
# sed -i "s/{displayid}/`echo "$DISPLAY"`/g" ~/.config/kinto/prexk.sh
|
||||||
|
|
||||||
if [[ $dename == "budgie" ]]; then
|
if [[ $dename == "budgie" ]]; then
|
||||||
@@ -459,6 +501,11 @@ fi
|
|||||||
|
|
||||||
if [[ $distro == "fedora" ]]; then
|
if [[ $distro == "fedora" ]]; then
|
||||||
perl -pi -e "\s{4}(# )(K.*)(# SL - .*fedora.*)/ \$2\$3/g" ./linux/kinto.py.new >/dev/null 2>&1
|
perl -pi -e "\s{4}(# )(K.*)(# SL - .*fedora.*)/ \$2\$3/g" ./linux/kinto.py.new >/dev/null 2>&1
|
||||||
|
sed -i "s#{sudo}##g" ./linux/xkeysnail.service.new
|
||||||
|
selinuxuser=system_u
|
||||||
|
selinuxtype=systemd_unit_file_t
|
||||||
|
else
|
||||||
|
sed -i "s#{sudo}#`\\which sudo` #g" ./linux/xkeysnail.service.new
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [[ $distro == "elementaryos" ]]; then
|
if [[ $distro == "elementaryos" ]]; then
|
||||||
@@ -491,9 +538,16 @@ if [[ $dename == "xfce" ]] && ls /etc/apt/sources.list.d/enso* 1> /dev/null 2>&1
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
if ! [[ $1 == "5" || $1 == "uninstall" || $1 == "Uninstall" ]]; then
|
if ! [[ $1 == "5" || $1 == "uninstall" || $1 == "Uninstall" ]]; then
|
||||||
|
|
||||||
mv ./linux/kinto.py.new ~/.config/kinto/kinto.py
|
mv ./linux/kinto.py.new ~/.config/kinto/kinto.py
|
||||||
# if [ "$distro" == "fedora" ];then
|
# if [ "$distro" == "fedora" ];then
|
||||||
|
if [ ! "$sysv" -eq 0 ];then
|
||||||
|
# echo "Using systemd..."
|
||||||
sudo rm /etc/systemd/system/xkeysnail.service >/dev/null 2>&1
|
sudo rm /etc/systemd/system/xkeysnail.service >/dev/null 2>&1
|
||||||
|
else
|
||||||
|
# echo "Using sysvinit..."
|
||||||
|
echo ""
|
||||||
|
fi
|
||||||
if [ -d /usr/lib/systemd/system ];then
|
if [ -d /usr/lib/systemd/system ];then
|
||||||
xkeypath="/usr/lib/systemd/system/"
|
xkeypath="/usr/lib/systemd/system/"
|
||||||
elif [ -d /lib/systemd/system ];then
|
elif [ -d /lib/systemd/system ];then
|
||||||
@@ -521,19 +575,42 @@ if ! [[ $1 == "5" || $1 == "uninstall" || $1 == "Uninstall" ]]; then
|
|||||||
echo -e "Run 'sudo pip3 install --upgrade .' to debug issue"
|
echo -e "Run 'sudo pip3 install --upgrade .' to debug issue"
|
||||||
exit 0
|
exit 0
|
||||||
fi
|
fi
|
||||||
sed -i "s#{xkeysnail}#`which xkeysnail`#g" ./linux/xkeysnail.service.new
|
|
||||||
sed -i "s#{xkeysnail}#`which xkeysnail`#g" ./linux/limitedadmins.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"
|
if [[ $distro == "fedora" ]]; then
|
||||||
|
echo "Changing SELinux context"
|
||||||
|
sudo chcon -v --user=$selinuxuser --type=$selinuxtype "$xkeypath"xkeysnail.service
|
||||||
|
fi
|
||||||
sudo chown root:root ./linux/limitedadmins.new
|
sudo chown root:root ./linux/limitedadmins.new
|
||||||
# Add a check here for xkeysnail path resolving
|
# Add a check here for xkeysnail path resolving
|
||||||
sudo mv ./linux/limitedadmins.new /etc/sudoers.d/limitedadmins
|
sudo mv ./linux/limitedadmins.new /etc/sudoers.d/limitedadmins
|
||||||
|
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"
|
||||||
|
|
||||||
|
if [[ $distro == "fedora" ]]; then
|
||||||
|
sudo cp "$xkeypath"xkeysnail.service /etc/systemd/system/xkeysnail.service && echo "Copied service file to system..." || echo "Failed to create copy..."
|
||||||
|
sudo cp "$xkeypath"xkeysnail.service /etc/systemd/system/graphical.target.wants/xkeysnail.service && echo "Copied service file to system for graphical target..." || echo "Failed to create copy for graphical target..."
|
||||||
|
sudo chown -R root:root /etc/systemd/system/xkeysnail.service && echo "Ownership set for root..." || echo "Failed to set ownership..."
|
||||||
|
sudo chown -R root:root /etc/systemd/system/graphical.target.wants/xkeysnail.service && echo "Ownership set for root..." || echo "Failed to set ownership..."
|
||||||
|
sudo chmod 644 /etc/systemd/system/xkeysnail.service && echo "Permissions set to 644..." || echo "Failed to set permissions..."
|
||||||
|
sudo chmod 644 /etc/systemd/system/graphical.target.wants/xkeysnail.service && echo "Permissions set to 644..." || echo "Failed to set permissions..."
|
||||||
|
else
|
||||||
sudo chown -R root:root "$xkeypath"xkeysnail.service && echo "Ownership set for root..." || echo "Failed to set ownership..."
|
sudo chown -R root:root "$xkeypath"xkeysnail.service && echo "Ownership set for root..." || echo "Failed to set ownership..."
|
||||||
sudo chmod 644 "$xkeypath"xkeysnail.service && echo "Permissions set to 644..." || echo "Failed to set permissions..."
|
sudo chmod 644 "$xkeypath"xkeysnail.service && echo "Permissions set to 644..." || echo "Failed to set permissions..."
|
||||||
sudo ln -s "$xkeypath"xkeysnail.service /etc/systemd/system/xkeysnail.service && echo "Created soft symlink..." || echo "Failed to create soft symlink..."
|
sudo ln -s "$xkeypath"xkeysnail.service /etc/systemd/system/xkeysnail.service && echo "Created soft symlink..." || echo "Failed to create soft symlink..."
|
||||||
sudo ln -s "$xkeypath"xkeysnail.service /etc/systemd/system/graphical.target.wants/xkeysnail.service && echo "Created soft symlink for graphical target..." || echo "Failed to create soft symlink for graphical target..."
|
sudo ln -s "$xkeypath"xkeysnail.service /etc/systemd/system/graphical.target.wants/xkeysnail.service && echo "Created soft symlink for graphical target..." || echo "Failed to create soft symlink for graphical target..."
|
||||||
|
fi
|
||||||
sudo systemctl daemon-reload
|
sudo systemctl daemon-reload
|
||||||
sudo systemctl disable xkeysnail
|
sudo systemctl disable xkeysnail
|
||||||
sudo systemctl stop 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
|
# sudo systemctl --state=not-found --all | grep xkeysnail
|
||||||
# if [ "$distro" == "fedora" ];then
|
# if [ "$distro" == "fedora" ];then
|
||||||
# systemctl enable xkeysnail.service
|
# systemctl enable xkeysnail.service
|
||||||
@@ -541,8 +618,9 @@ if ! [[ $1 == "5" || $1 == "uninstall" || $1 == "Uninstall" ]]; then
|
|||||||
# sudo systemctl enable xkeysnail.service
|
# sudo systemctl enable xkeysnail.service
|
||||||
# fi
|
# fi
|
||||||
# sudo systemctl restart xkeysnail
|
# sudo systemctl restart xkeysnail
|
||||||
sudo pkill -f kintotray >/dev/null 2>&1
|
sudo pkill -f kintotray &
|
||||||
if [[ $dename == "gnome" || $dename == "kde" ]];then
|
# >/dev/null 2>&1
|
||||||
|
if [[ $dename == "kde" ]];then
|
||||||
sed -i "s/systray = true/systray = false/g" ~/.config/kinto/initkb
|
sed -i "s/systray = true/systray = false/g" ~/.config/kinto/initkb
|
||||||
fi
|
fi
|
||||||
nohup python3 ~/.config/kinto/gui/kinto-gui.py >/dev/null 2>&1 &
|
nohup python3 ~/.config/kinto/gui/kinto-gui.py >/dev/null 2>&1 &
|
||||||
@@ -573,6 +651,24 @@ if ! [[ $1 == "5" || $1 == "uninstall" || $1 == "Uninstall" ]]; then
|
|||||||
echo -e "~/.config/kinto/gui/kinto-gui.py\n"
|
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 "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
|
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 "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"
|
echo "sudo pacman -Syu"
|
||||||
|
Reference in New Issue
Block a user