mirror of
https://github.com/rbreaves/kinto.git
synced 2025-09-26 11:39:30 +02:00
Compare commits
61 Commits
xkb-xkeysn
...
CI
Author | SHA1 | Date | |
---|---|---|---|
![]() |
c4b30587dd | ||
![]() |
81581c547b | ||
![]() |
bd9ecd123f | ||
![]() |
14ac2c8349 | ||
![]() |
a91bbec93c | ||
![]() |
df43fb363d | ||
![]() |
0dd5baca34 | ||
![]() |
896ab30e57 | ||
![]() |
f9aaae3038 | ||
![]() |
94b018aa48 | ||
![]() |
6b3ea9afab | ||
![]() |
1ee92339c0 | ||
![]() |
4e1331f9bb | ||
![]() |
f44182cefd | ||
![]() |
d15972dcae | ||
![]() |
65f48ce2f1 | ||
![]() |
589807bad9 | ||
![]() |
55a6d132c7 | ||
![]() |
eebf4d61eb | ||
![]() |
b364902db0 | ||
![]() |
035b9e2d85 | ||
![]() |
db68031eb4 | ||
![]() |
30f4c1285b | ||
![]() |
f858ae9614 | ||
![]() |
75dbe611b3 | ||
![]() |
6cdedf41e3 | ||
![]() |
df8d46e1c1 | ||
![]() |
b9f15950b2 | ||
![]() |
2f8ae2380f | ||
![]() |
77d52ec176 | ||
![]() |
13a98ce8cc | ||
![]() |
8f333dec20 | ||
![]() |
f7ff8d1728 | ||
![]() |
5b2a2c88c2 | ||
![]() |
48b5699aed | ||
![]() |
eec325024d | ||
![]() |
a5087b0f95 | ||
![]() |
36f189e434 | ||
![]() |
50b31abba9 | ||
![]() |
aa53c83c61 | ||
![]() |
5f795328c9 | ||
![]() |
39ed3c83f9 | ||
![]() |
bf35285914 | ||
![]() |
7a3d9cbd7c | ||
![]() |
2a920d0622 | ||
![]() |
253b061b12 | ||
![]() |
c8a28fe3e0 | ||
![]() |
9f5ba6e14e | ||
![]() |
f855da301c | ||
![]() |
4e33e5516b | ||
![]() |
5c25cd15cb | ||
![]() |
af4b4ea08e | ||
![]() |
e69e529a18 | ||
![]() |
f717db9aaa | ||
![]() |
353c2c6bb4 | ||
![]() |
b3fc4c9202 | ||
![]() |
4858b9cf28 | ||
![]() |
45ad4f3f68 | ||
![]() |
1f4b2bb451 | ||
![]() |
9a5b44661c | ||
![]() |
d19e5836a5 |
34
.github/workflows/01-ubuntu-budgie.yml
vendored
Normal file
34
.github/workflows/01-ubuntu-budgie.yml
vendored
Normal file
@@ -0,0 +1,34 @@
|
|||||||
|
# This is a basic workflow to help you get started with Actions
|
||||||
|
|
||||||
|
name: CI
|
||||||
|
|
||||||
|
# Controls when the workflow will run
|
||||||
|
on:
|
||||||
|
# Triggers the workflow on push or pull request events but only for the master branch
|
||||||
|
push:
|
||||||
|
branches: [ staging ]
|
||||||
|
|
||||||
|
# Allows you to run this workflow manually from the Actions tab
|
||||||
|
workflow_dispatch:
|
||||||
|
|
||||||
|
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
|
||||||
|
jobs:
|
||||||
|
# This workflow contains a single job called "build"
|
||||||
|
build:
|
||||||
|
# The type of runner that the job will run on
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
|
# Steps represent a sequence of tasks that will be executed as part of the job
|
||||||
|
steps:
|
||||||
|
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
|
||||||
|
- uses: actions/checkout@v3
|
||||||
|
|
||||||
|
# Runs a single command using the runners shell
|
||||||
|
- name: Run a one-line script
|
||||||
|
run: echo Hello, world!
|
||||||
|
|
||||||
|
# Runs a set of commands using the runners shell
|
||||||
|
- name: Run a multi-line script
|
||||||
|
run: |
|
||||||
|
echo Add other actions to build,
|
||||||
|
echo test, and deploy your project.
|
15
README.md
15
README.md
@@ -26,7 +26,9 @@ If you like or appreciate this project then please consider donating.
|
|||||||
|**Wishlists**|[Amazon](https://smile.amazon.com/hz/wishlist/ls/3EVXR21VFKD9Z?ref_=wl_share)|[Adafruit](https://www.adafruit.com/wishlists/515932)|[eBay](https://www.ebay.com/mye/myebay/WatchList?custom_list_id=636668138019)|
|
|**Wishlists**|[Amazon](https://smile.amazon.com/hz/wishlist/ls/3EVXR21VFKD9Z?ref_=wl_share)|[Adafruit](https://www.adafruit.com/wishlists/515932)|[eBay](https://www.ebay.com/mye/myebay/WatchList?custom_list_id=636668138019)|
|
||||||
|---|---|---|---|
|
|---|---|---|---|
|
||||||
|
|
||||||
If you would like to send me a keyboard directly then please reach out to me over [twitter](https://twitter.com/gbit86) and send me a DM.
|
I have received some really great letters with donations & email. I've also posted some of them with redacted first names to kinto.sh.
|
||||||
|
|
||||||
|
Also if you would like to send me a keyboard directly then please reach out to me over [twitter](https://twitter.com/gbit86) and send me a DM.
|
||||||
|
|
||||||
## How to install (Linux)
|
## How to install (Linux)
|
||||||
|
|
||||||
@@ -84,9 +86,12 @@ sudo apt install xfce4-appmenu-plugin vala-panel-appmenu-common appmenu-gtk2-mod
|
|||||||
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"
|
||||||
```
|
```
|
||||||
|
|
||||||
**Perfect HiDPI fractional scaling on Ubuntu Budgie 20.04 under x11**
|
**Fractional HiDPI Scaling for Gnome/Budgie w/ x11**
|
||||||
|
|
||||||
|
https://github.com/rbreaves/betterScale
|
||||||
|
|
||||||
|
Use this with autorandr to save your settings as a profile that will auto re-apply when needed.
|
||||||
|
|
||||||
https://discourse.ubuntubudgie.org/t/ubuntu-budgie-20-04-fractional-hidpi-for-x11/4777
|
|
||||||
|
|
||||||
## How to Install (Windows)
|
## How to Install (Windows)
|
||||||
|
|
||||||
@@ -157,6 +162,10 @@ RDP fully works as long as the entire keyboard input is being captured. RDP had
|
|||||||
|Royal TSX Client| 🍎macOS⇒| ❖Windows | ❌ No|Initial Cmd key press not being passed|
|
|Royal TSX Client| 🍎macOS⇒| ❖Windows | ❌ No|Initial Cmd key press not being passed|
|
||||||
|Official MS RDP| 🍎🤖iOS/Android⇒| ❖Windows | ❌ No|No workaround atm|
|
|Official MS RDP| 🍎🤖iOS/Android⇒| ❖Windows | ❌ No|No workaround atm|
|
||||||
|
|
||||||
|
## How to Remap Windows keyboards for remote access to macOS
|
||||||
|
Quick summary - Swap Alt & Win to conform with Apple keyboard layouts. Sharpkeys for Windows, Setkeycodes for Linux, then install Kinto.sh or change/update the Keyboard Type to Apple in the system tray.
|
||||||
|
https://benreaves.medium.com/macos-to-linux-back-again-c6151200f4dc
|
||||||
|
|
||||||
## FreeRDP for macOS
|
## FreeRDP for macOS
|
||||||
|
|
||||||
1. Install [brew.sh](https://brew.sh).
|
1. Install [brew.sh](https://brew.sh).
|
||||||
|
0
linux/config.d/app-general-browsers.yaml
Normal file
0
linux/config.d/app-general-browsers.yaml
Normal file
50
linux/config.d/conditional-modmap-gui.yaml
Normal file
50
linux/config.d/conditional-modmap-gui.yaml
Normal file
@@ -0,0 +1,50 @@
|
|||||||
|
# Keyboard options
|
||||||
|
# - "IBM", "Chromebook","WinMac", "Mac"
|
||||||
|
keyboard: ""
|
||||||
|
# Possible options
|
||||||
|
# - ["altgr","caps2cmd"]
|
||||||
|
options: []
|
||||||
|
Any:
|
||||||
|
default: []
|
||||||
|
altgr: []
|
||||||
|
caps2cmd: ["Key.CAPSLOCK: Key.RIGHT_CTRL,"]
|
||||||
|
IBM:
|
||||||
|
default: [
|
||||||
|
"Key.LEFT_ALT: Key.RIGHT_CTRL,",
|
||||||
|
"Key.LEFT_CTRL: Key.LEFT_ALT,",
|
||||||
|
"Key.CAPSLOCK: Key.LEFT_META,"
|
||||||
|
]
|
||||||
|
altgr: [
|
||||||
|
"Key.RIGHT_ALT: Key.RIGHT_CTRL,",
|
||||||
|
"Key.RIGHT_CTRL: Key.RIGHT_ALT,"
|
||||||
|
]
|
||||||
|
Chromebook:
|
||||||
|
default: [
|
||||||
|
"Key.LEFT_ALT: Key.RIGHT_CTRL,",
|
||||||
|
"Key.LEFT_CTRL: Key.LEFT_ALT,"
|
||||||
|
]
|
||||||
|
altgr: [
|
||||||
|
"Key.RIGHT_ALT: Key.RIGHT_CTRL,",
|
||||||
|
"Key.RIGHT_CTRL: Key.RIGHT_ALT,"
|
||||||
|
]
|
||||||
|
caps2cmd: ["Key.LEFT_META: Key.RIGHT_CTRL,"]
|
||||||
|
WinMac:
|
||||||
|
default: [
|
||||||
|
"Key.LEFT_ALT: Key.RIGHT_CTRL,",
|
||||||
|
"Key.LEFT_META: Key.LEFT_ALT,",
|
||||||
|
"Key.LEFT_CTRL: Key.LEFT_META,"
|
||||||
|
]
|
||||||
|
altgr: [
|
||||||
|
"Key.RIGHT_ALT: Key.RIGHT_CTRL,",
|
||||||
|
"Key.RIGHT_META: Key.RIGHT_ALT,",
|
||||||
|
"Key.RIGHT_CTRL: Key.RIGHT_META,"
|
||||||
|
]
|
||||||
|
Mac:
|
||||||
|
default: [
|
||||||
|
"Key.LEFT_META: Key.RIGHT_CTRL,",
|
||||||
|
"Key.LEFT_CTRL: Key.LEFT_META,"
|
||||||
|
]
|
||||||
|
altgr: [
|
||||||
|
"Key.RIGHT_META: Key.RIGHT_CTRL,",
|
||||||
|
"Key.RIGHT_CTRL: Key.RIGHT_META,"
|
||||||
|
]
|
49
linux/config.d/conditional-modmap-terminal.yaml
Normal file
49
linux/config.d/conditional-modmap-terminal.yaml
Normal file
@@ -0,0 +1,49 @@
|
|||||||
|
# Keyboard options
|
||||||
|
# - "IBM", "Chromebook","WinMac", "Mac"
|
||||||
|
keyboard: ""
|
||||||
|
# Possible options
|
||||||
|
# - ["altgr","caps2cmd"]
|
||||||
|
options: []
|
||||||
|
Any:
|
||||||
|
default: []
|
||||||
|
altgr: []
|
||||||
|
caps2cmd: ["Key.CAPSLOCK: Key.RIGHT_CTRL,"]
|
||||||
|
IBM:
|
||||||
|
default: [
|
||||||
|
"Key.LEFT_ALT: Key.RIGHT_CTRL,",
|
||||||
|
"Key.CAPSLOCK: Key.LEFT_ALT,",
|
||||||
|
"Key.RIGHT_CTRL: Key.RIGHT_ALT,"
|
||||||
|
]
|
||||||
|
altgr: [
|
||||||
|
"Key.RIGHT_ALT: Key.RIGHT_CTRL,",
|
||||||
|
"Key.RIGHT_CTRL: Key.RIGHT_ALT,"
|
||||||
|
]
|
||||||
|
Chromebook:
|
||||||
|
default: [
|
||||||
|
"Key.LEFT_ALT: Key.RIGHT_CTRL,",
|
||||||
|
"Key.LEFT_META: Key.LEFT_ALT,",
|
||||||
|
"Key.RIGHT_CTRL: Key.RIGHT_ALT,"
|
||||||
|
]
|
||||||
|
altgr: [
|
||||||
|
"Key.RIGHT_ALT: Key.RIGHT_CTRL,"
|
||||||
|
]
|
||||||
|
caps2cmd: ["Key.LEFT_META: Key.RIGHT_CTRL,"]
|
||||||
|
WinMac:
|
||||||
|
default: [
|
||||||
|
"Key.LEFT_ALT: Key.RIGHT_CTRL,",
|
||||||
|
"Key.LEFT_META: Key.LEFT_ALT,",
|
||||||
|
"Key.LEFT_CTRL: Key.LEFT_CTRL,"
|
||||||
|
]
|
||||||
|
altgr: [
|
||||||
|
"Key.RIGHT_ALT: Key.RIGHT_CTRL,",
|
||||||
|
"Key.RIGHT_META: Key.RIGHT_ALT,",
|
||||||
|
"Key.RIGHT_CTRL: Key.LEFT_CTRL,"
|
||||||
|
]
|
||||||
|
Mac:
|
||||||
|
default: [
|
||||||
|
"Key.LEFT_META: Key.RIGHT_CTRL,"
|
||||||
|
]
|
||||||
|
altgr: [
|
||||||
|
"Key.RIGHT_META: Key.RIGHT_CTRL,",
|
||||||
|
"Key.RIGHT_CTRL: Key.LEFT_CTRL,"
|
||||||
|
]
|
0
linux/config.d/group-terminals.yaml
Normal file
0
linux/config.d/group-terminals.yaml
Normal file
@@ -353,7 +353,7 @@ class MyWindow(Gtk.Window):
|
|||||||
self.queryConfig('cp '+os.environ['HOME']+'/.config/kinto/xkeysnail.desktop '+os.environ['HOME']+'/.config/autostart/xkeysnail.desktop')
|
self.queryConfig('cp '+os.environ['HOME']+'/.config/kinto/xkeysnail.desktop '+os.environ['HOME']+'/.config/autostart/xkeysnail.desktop')
|
||||||
if self.options["systray"]:
|
if self.options["systray"]:
|
||||||
self.queryConfig('cp '+os.environ['HOME']+'/.config/kinto/kintotray.desktop '+os.environ['HOME']+'/.config/autostart/kintotray.desktop')
|
self.queryConfig('cp '+os.environ['HOME']+'/.config/kinto/kintotray.desktop '+os.environ['HOME']+'/.config/autostart/kintotray.desktop')
|
||||||
self.queryConfig("nohup python3 ~/.config/kinto/kintotray.py >/dev/null 2>&1 &")
|
self.queryConfig("nohup /usr/bin/python3 ~/.config/kinto/kintotray.py >/dev/null 2>&1 &")
|
||||||
self.menuitem_systray.disconnect(self.menuitem_systray.signal_id)
|
self.menuitem_systray.disconnect(self.menuitem_systray.signal_id)
|
||||||
self.menuitem_systray.set_active(True)
|
self.menuitem_systray.set_active(True)
|
||||||
self.menuitem_systray.signal_id = self.menuitem_systray.connect('activate',self.checkTray,False)
|
self.menuitem_systray.signal_id = self.menuitem_systray.connect('activate',self.checkTray,False)
|
||||||
@@ -616,7 +616,7 @@ class MyWindow(Gtk.Window):
|
|||||||
if tray_bool:
|
if tray_bool:
|
||||||
Popen(['cp',os.environ['HOME']+'/.config/kinto/kintotray.desktop',os.environ['HOME']+'/.config/autostart/kintotray.desktop'])
|
Popen(['cp',os.environ['HOME']+'/.config/kinto/kintotray.desktop',os.environ['HOME']+'/.config/autostart/kintotray.desktop'])
|
||||||
if not kintotray:
|
if not kintotray:
|
||||||
Popen([os.environ['HOME']+'/.config/kinto/kintotray.py'])
|
Popen(['/usr/bin/python3',os.environ['HOME']+'/.config/kinto/kintotray.py'])
|
||||||
self.menuitem_systray.disconnect(self.menuitem_systray.signal_id)
|
self.menuitem_systray.disconnect(self.menuitem_systray.signal_id)
|
||||||
self.menuitem_systray.set_active(True)
|
self.menuitem_systray.set_active(True)
|
||||||
self.menuitem_systray.signal_id = self.menuitem_systray.connect('activate',self.checkTray,False)
|
self.menuitem_systray.signal_id = self.menuitem_systray.connect('activate',self.checkTray,False)
|
||||||
|
@@ -4,7 +4,7 @@ Name=Kinto.sh
|
|||||||
GenericName=Kinto.sh
|
GenericName=Kinto.sh
|
||||||
Categories=Utility;
|
Categories=Utility;
|
||||||
Type=Application
|
Type=Application
|
||||||
Exec={homedir}/.config/kinto/gui/kinto-gui.py
|
Exec=/usr/bin/python3 {homedir}/.config/kinto/gui/kinto-gui.py
|
||||||
Icon={homedir}/.config/kinto/kinto-color-48.svg
|
Icon={homedir}/.config/kinto/kinto-color-48.svg
|
||||||
# Icon=/usr/share/icons/Pocillo/kinto-color.svg
|
# Icon=/usr/share/icons/Pocillo/kinto-color.svg
|
||||||
Terminal=false
|
Terminal=false
|
||||||
|
195
linux/kinto.py
195
linux/kinto.py
@@ -9,6 +9,7 @@ from xkeysnail.transform import *
|
|||||||
# xbindkeys -mk
|
# xbindkeys -mk
|
||||||
terminals = [
|
terminals = [
|
||||||
"alacritty",
|
"alacritty",
|
||||||
|
"cutefish-terminal",
|
||||||
"deepin-terminal",
|
"deepin-terminal",
|
||||||
"eterm",
|
"eterm",
|
||||||
"gnome-terminal",
|
"gnome-terminal",
|
||||||
@@ -24,6 +25,7 @@ terminals = [
|
|||||||
"st",
|
"st",
|
||||||
"sakura",
|
"sakura",
|
||||||
"station",
|
"station",
|
||||||
|
"tabby",
|
||||||
"terminator",
|
"terminator",
|
||||||
"termite",
|
"termite",
|
||||||
"tilda",
|
"tilda",
|
||||||
@@ -46,6 +48,8 @@ remotes = [
|
|||||||
"org.remmina.Remmina",
|
"org.remmina.Remmina",
|
||||||
"remmina",
|
"remmina",
|
||||||
"qemu-system-.*",
|
"qemu-system-.*",
|
||||||
|
"qemu",
|
||||||
|
"Spicy",
|
||||||
"Virt-manager",
|
"Virt-manager",
|
||||||
"VirtualBox",
|
"VirtualBox",
|
||||||
"VirtualBox Machine",
|
"VirtualBox Machine",
|
||||||
@@ -64,6 +68,8 @@ browsers = [
|
|||||||
"Discord",
|
"Discord",
|
||||||
"Epiphany",
|
"Epiphany",
|
||||||
"Firefox",
|
"Firefox",
|
||||||
|
"Firefox Developer Edition",
|
||||||
|
"Waterfox",
|
||||||
"Google-chrome",
|
"Google-chrome",
|
||||||
"microsoft-edge",
|
"microsoft-edge",
|
||||||
"microsoft-edge-dev",
|
"microsoft-edge-dev",
|
||||||
@@ -81,6 +87,8 @@ chromes = [
|
|||||||
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)
|
||||||
|
|
||||||
|
# Reference group-name-custom.yaml
|
||||||
|
|
||||||
# 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)
|
||||||
@@ -267,20 +275,26 @@ define_keymap(re.compile("^jetbrains-(?!.*toolbox).*$", 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("caja", re.IGNORECASE),{
|
define_keymap(re.compile("caja", re.IGNORECASE),{
|
||||||
# K("RC-Super-o"): K("RC-Shift-Enter"), # Open in new tab
|
# K("RC-Super-o"): K("RC-Shift-Enter"), # Open in new tab
|
||||||
K("RC-Super-o"): K("RC-Shift-W"), # Open in new window
|
K("RC-Super-o"): K("RC-Shift-W"), # Open in new window
|
||||||
},"Overrides for Caja - Finder")
|
},"Overrides for Caja - Finder Mods")
|
||||||
|
|
||||||
# Keybindings overrides for DDE (Deepin) File Manager
|
# Keybindings overrides for DDE (Deepin) File Manager
|
||||||
# (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"): None, # Disable preferences shortcut (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")
|
K("RC-Shift-Left_Brace"): K("C-Shift-Tab"), # Go to prior tab
|
||||||
|
K("RC-Shift-Right_Brace"): K("C-Tab"), # Go to next tab
|
||||||
|
K("RC-Shift-Left"): K("C-Shift-Tab"), # Go to prior tab
|
||||||
|
K("RC-Shift-Right"): K("C-Tab"), # Go to next tab
|
||||||
|
},"Overrides for DDE File Manager - Finder Mods")
|
||||||
|
|
||||||
# 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-KEY_2"): K("C-KEY_3"), # View as List (Detailed)
|
||||||
|
K("RC-KEY_3"): K("C-KEY_2"), # View as List (Compact)
|
||||||
##########################################################################################
|
##########################################################################################
|
||||||
### "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.
|
||||||
@@ -288,51 +302,64 @@ define_keymap(re.compile("dolphin", re.IGNORECASE),{
|
|||||||
### "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-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 Mods")
|
||||||
|
|
||||||
# Keybindings overrides for elementary OS Files
|
# Keybindings overrides for elementary OS Files (Pantheon)
|
||||||
# (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 available
|
K("RC-comma"): None, # Disable preferences shortcut since none available
|
||||||
},"Overrides for Pantheon - Finder")
|
},"Overrides for Pantheon - Finder Mods")
|
||||||
|
|
||||||
# Keybindings overrides for Nautilus
|
# Keybindings overrides for Nautilus
|
||||||
# (overrides some bindings from general file manager code block below)
|
# (overrides some bindings from general file manager code block below)
|
||||||
define_keymap(re.compile("org.gnome.nautilus|nautilus", re.IGNORECASE),{
|
define_keymap(re.compile("org.gnome.nautilus|nautilus", re.IGNORECASE),{
|
||||||
K("RC-Super-o"): K("Shift-Enter"), # Open in new window
|
# K("RC-N"): K("C-M-Space"), # macOS Finder search window shortcut Cmd+Option+Space
|
||||||
# K("RC-Super-o"): K("RC-Enter"), # Open in new tab
|
# For this ^^^^^^^^^^^ to work, a custom shortcut must be set up in the Settings app in GNOME
|
||||||
K("RC-comma"): K("RC-comma"), # Overrides "Open preferences dialog" shortcut below
|
# to run command: "nautilus --new-window /home/USER" [ replace "USER" ]
|
||||||
},"Overrides for Nautilus - Finder")
|
K("RC-KEY_1"): K("C-KEY_2"), # View as Icons
|
||||||
|
K("RC-KEY_2"): K("C-KEY_1"), # View as List (Detailed)
|
||||||
|
K("RC-Super-o"): K("Shift-Enter"), # Open in new window
|
||||||
|
# K("RC-Super-o"): K("RC-Enter"), # Open in new tab
|
||||||
|
K("RC-comma"): K("RC-comma"), # Overrides "Open preferences dialog" shortcut below
|
||||||
|
},"Overrides for Nautilus - Finder Mods")
|
||||||
|
|
||||||
# Keybindings overrides for PCManFM and PCManFM-Qt
|
# 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|pcmanfm-qt", 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-KEY_2"): K("C-KEY_4"), # View as List (Detailed) [Not in PCManFM-Qt]
|
||||||
},"Overrides for PCManFM - Finder")
|
K("RC-Backspace"): [K("Delete"),K("Enter")], # Move to Trash (delete, bypass dialog)
|
||||||
|
},"Overrides for PCManFM - Finder Mods")
|
||||||
|
|
||||||
# Keybindings overrides for SpaceFM
|
# Keybindings overrides for SpaceFM
|
||||||
# (overrides some bindings from general file manager code block below)
|
# (overrides some bindings from general file manager code block below)
|
||||||
define_keymap(re.compile("spacefm", re.IGNORECASE),{
|
define_keymap(re.compile("spacefm", re.IGNORECASE),{
|
||||||
K("RC-Shift-N"): [K("RC-F")], # Create new folder is Ctrl+F by default
|
K("RC-Page_Up"): K("C-Shift-Tab"), # Go to prior tab
|
||||||
K("RC-Backspace"): [K("Delete"),K("Enter")], # Move to Trash (delete, bypass dialog)
|
K("RC-Page_Down"): K("C-Tab"), # Go to next tab
|
||||||
K("RC-comma"): [K("M-V"),K("p")], # Overrides "Open preferences dialog" shortcut below
|
K("RC-Shift-Left_Brace"): K("C-Shift-Tab"), # Go to prior tab
|
||||||
|
K("RC-Shift-Right_Brace"): K("C-Tab"), # Go to next tab
|
||||||
|
K("RC-Shift-Left"): K("C-Shift-Tab"), # Go to prior tab
|
||||||
|
K("RC-Shift-Right"): K("C-Tab"), # Go to next tab
|
||||||
|
K("RC-Shift-N"): K("RC-F"), # Create new folder is Ctrl+F by default
|
||||||
|
K("RC-Backspace"): [K("Delete"),K("Enter")], # Move to Trash (delete, bypass dialog)
|
||||||
|
K("RC-comma"): [K("M-V"),K("p")], # Overrides "Open preferences dialog" shortcut below
|
||||||
# This shortcut ^^^^^^^^^^^^^^^ is not fully working in SpaceFM. Opens "View" menu but not Preferences.
|
# This shortcut ^^^^^^^^^^^^^^^ is not fully working in SpaceFM. Opens "View" menu but not Preferences.
|
||||||
# SpaceFM seems to be doing some nasty binding that blocks things like Alt+Tab while the menu is open.
|
# SpaceFM seems to be doing some nasty binding that blocks things like Alt+Tab while the menu is open.
|
||||||
},"Overrides for SpaceFM - Finder")
|
},"Overrides for SpaceFM - Finder Mods")
|
||||||
|
|
||||||
# Keybindings overrides for Thunar
|
# Keybindings overrides for Thunar
|
||||||
# (overrides some bindings from general file manager code block below)
|
# (overrides some bindings from general file manager code block below)
|
||||||
define_keymap(re.compile("thunar", re.IGNORECASE),{
|
define_keymap(re.compile("thunar", re.IGNORECASE),{
|
||||||
K("RC-Super-o"): K("RC-Shift-P"), # Open in new tab
|
K("RC-Super-o"): K("RC-Shift-P"), # Open in new tab
|
||||||
K("RC-comma"): [K("M-E"),K("E")], # Overrides "Open preferences dialog" shortcut below
|
K("RC-comma"): [K("M-E"),K("E")], # Overrides "Open preferences dialog" shortcut below
|
||||||
},"Overrides for Thunar - Finder")
|
},"Overrides for Thunar - Finder Mods")
|
||||||
|
|
||||||
filemanagers = [
|
filemanagers = [
|
||||||
"caja",
|
"caja",
|
||||||
|
"cutefish-filemanager",
|
||||||
"dde-file-manager",
|
"dde-file-manager",
|
||||||
"dolphin",
|
"dolphin",
|
||||||
"io.elementary.files",
|
"io.elementary.files",
|
||||||
@@ -365,37 +392,58 @@ define_keymap(re.compile(filemanagerStr, re.IGNORECASE),{
|
|||||||
###########################################################################################################
|
###########################################################################################################
|
||||||
### Show Properties (Get Info) | Open Settings/Preferences | Show/Hide hidden files ###
|
### Show Properties (Get Info) | Open Settings/Preferences | Show/Hide hidden files ###
|
||||||
###########################################################################################################
|
###########################################################################################################
|
||||||
K("RC-i"): K("M-Enter"), # File properties dialog (Get Info)
|
K("RC-i"): K("M-Enter"), # File properties dialog (Get Info)
|
||||||
K("RC-comma"): [K("M-E"),K("N")], # Open preferences dialog
|
K("RC-comma"): [K("M-E"),K("N")], # Open preferences dialog
|
||||||
K("RC-Shift-dot"): K("RC-H"), # Show/hide hidden files ("dot" files)
|
K("RC-Shift-dot"): K("RC-H"), # Show/hide hidden files ("dot" files)
|
||||||
###########################################################################################################
|
###########################################################################################################
|
||||||
### Navigation ###
|
### Navigation ###
|
||||||
###########################################################################################################
|
###########################################################################################################
|
||||||
K("RC-Left"): K("M-Left"), # Go Back
|
K("RC-Left_Brace"): K("M-Left"), # Go Back
|
||||||
K("RC-Right"): K("M-Right"), # Go Forward
|
K("RC-Right_Brace"): K("M-Right"), # Go Forward
|
||||||
K("RC-Up"): K("M-Up"), # Go Up dir
|
K("RC-Left"): K("M-Left"), # Go Back
|
||||||
# K("RC-Down"): K("M-Down"), # Go Down dir (only works on folders) [not universal]
|
K("RC-Right"): K("M-Right"), # Go Forward
|
||||||
# K("RC-Down"): K("RC-O"), # Go Down dir (open folder/file) [not universal]
|
K("RC-Up"): K("M-Up"), # Go Up dir
|
||||||
K("RC-Down"): K("Enter"), # Go Down dir (open folder/file) [universal]
|
# K("RC-Down"): K("M-Down"), # Go Down dir (only works on folders) [not universal]
|
||||||
|
# K("RC-Down"): K("RC-O"), # Go Down dir (open folder/file) [not universal]
|
||||||
|
K("RC-Down"): K("Enter"), # Go Down dir (open folder/file) [universal]
|
||||||
|
K("RC-Shift-Left_Brace"): K("C-Page_Up"), # Go to prior tab
|
||||||
|
K("RC-Shift-Right_Brace"): K("C-Page_Down"), # Go to next tab
|
||||||
|
K("RC-Shift-Left"): K("C-Page_Up"), # Go to prior tab
|
||||||
|
K("RC-Shift-Right"): K("C-Page_Down"), # Go to next tab
|
||||||
###########################################################################################################
|
###########################################################################################################
|
||||||
### Open in New Window | Move to Trash | Duplicate file/folder ###
|
### Open in New Window | Move to Trash | Duplicate file/folder ###
|
||||||
###########################################################################################################
|
###########################################################################################################
|
||||||
K("RC-Super-o"): K("RC-Shift-o"), # Open in new window (or tab, depends on FM setup) [not universal]
|
K("RC-Super-o"): K("RC-Shift-o"), # Open in new window (or tab, depends on FM setup) [not universal]
|
||||||
K("RC-Backspace"): K("Delete"), # Move to Trash (delete)
|
K("RC-Backspace"): K("Delete"), # Move to Trash (delete)
|
||||||
K("RC-D"): [K("RC-C"),K("RC-V")], # Mimic Finder's Duplicate command (Copy, then Paste)
|
# K("RC-D"): [K("RC-C"),K("RC-V")], # Duplicate file/folder (Copy, then Paste) [conflicts with "Add Bookmark"]
|
||||||
###########################################################################################################
|
###########################################################################################################
|
||||||
### To enable renaming files with the Enter key, uncomment the two keymapping lines just below this. ###
|
### To enable renaming files with the Enter key, uncomment the two keymapping lines just below this. ###
|
||||||
### Use Ctrl+Shift+Enter to escape or activate text fields such as "[F]ind" and "[L]ocation" fields. ###
|
### Use Ctrl+Shift+Enter to escape or activate text fields such as "[F]ind" and "[L]ocation" fields. ###
|
||||||
###########################################################################################################
|
###########################################################################################################
|
||||||
# K("Enter"): K("F2"), # Rename with Enter key
|
# K("Enter"): K("F2"), # Rename with Enter key
|
||||||
# K("RC-Shift-Enter"): K("Enter"), # Remap alternative "Enter" key to easily activate/exit text fields
|
# K("RC-Shift-Enter"): K("Enter"), # Remap alternative "Enter" key to easily activate/exit text fields
|
||||||
},"File Managers - Finder")
|
# K("RC-Shift-Enter"): K("F2"), # Rename with Cmd+Shift+Enter
|
||||||
|
},"General File Managers - Finder Mods")
|
||||||
|
|
||||||
############################################
|
############################################
|
||||||
### END OF FILE MANAGER GROUP OF KEYMAPS ###
|
### END OF FILE MANAGER GROUP OF KEYMAPS ###
|
||||||
############################################
|
############################################
|
||||||
|
|
||||||
# Keybindings for Browsers
|
# Open preferences in browsers
|
||||||
|
define_keymap(re.compile("Firefox", re.IGNORECASE),{
|
||||||
|
K("C-comma"): [
|
||||||
|
K("C-T"),K("a"),K("b"),K("o"),K("u"),K("t"),
|
||||||
|
K("Shift-SEMICOLON"),K("p"),K("r"),K("e"),K("f"),
|
||||||
|
K("e"),K("r"),K("e"),K("n"),K("c"),K("e"),K("s"),K("Enter")
|
||||||
|
],
|
||||||
|
K("RC-Shift-N"): K("RC-Shift-P"), # Open private window with Ctrl+Shift+N like other browsers
|
||||||
|
})
|
||||||
|
define_keymap(re.compile(chromeStr, re.IGNORECASE),{
|
||||||
|
K("C-comma"): [K("M-e"), K("s"),K("Enter")],
|
||||||
|
}, "Browsers")
|
||||||
|
# Opera C-F12
|
||||||
|
|
||||||
|
# Keybindings for General Web Browsers
|
||||||
define_keymap(re.compile(browserStr, re.IGNORECASE),{
|
define_keymap(re.compile(browserStr, re.IGNORECASE),{
|
||||||
K("RC-Q"): K("RC-Q"), # Close all browsers Instances
|
K("RC-Q"): K("RC-Q"), # Close all browsers Instances
|
||||||
K("M-RC-I"): K("RC-Shift-I"), # Dev tools
|
K("M-RC-I"): K("RC-Shift-I"), # Dev tools
|
||||||
@@ -409,22 +457,40 @@ define_keymap(re.compile(browserStr, re.IGNORECASE),{
|
|||||||
K("RC-Key_7"): K("M-Key_7"),
|
K("RC-Key_7"): K("M-Key_7"),
|
||||||
K("RC-Key_8"): K("M-Key_8"),
|
K("RC-Key_8"): K("M-Key_8"),
|
||||||
K("RC-Key_9"): K("M-Key_9"), # Jump to last tab
|
K("RC-Key_9"): K("M-Key_9"), # Jump to last tab
|
||||||
K("C-Left_Brace"): K("C-Page_Up"),
|
# Enable Cmd+Shift+Braces for tab navigation
|
||||||
K("C-Right_Brace"): K("C-Page_Down"),
|
K("RC-Shift-Left_Brace"): K("C-Page_Up"), # Go to prior tab
|
||||||
})
|
K("RC-Shift-Right_Brace"): K("C-Page_Down"), # Go to next tab
|
||||||
|
# Enable Cmd+Option+Left/Right for tab navigation
|
||||||
|
K("RC-M-Left"): K("C-Page_Up"), # Go to prior tab
|
||||||
|
K("RC-M-Right"): K("C-Page_Down"), # Go to next tab
|
||||||
|
# Enable Ctrl+PgUp/PgDn for tab navigation
|
||||||
|
K("Super-Page_Up"): K("C-Page_Up"), # Go to prior tab
|
||||||
|
K("Super-Page_Down"): K("C-Page_Down"), # Go to next tab
|
||||||
|
# Use Cmd+Braces keys for tab navigation instead of page navigation
|
||||||
|
# K("C-Left_Brace"): K("C-Page_Up"),
|
||||||
|
# K("C-Right_Brace"): K("C-Page_Down"),
|
||||||
|
}, "General Web Browsers")
|
||||||
|
|
||||||
# Open preferences in browsers
|
define_keymap(re.compile("ulauncher", re.IGNORECASE),{
|
||||||
define_keymap(re.compile("Firefox", re.IGNORECASE),{
|
K("RC-Key_1"): K("M-Key_1"), # Remap Ctrl+[1-9] and Ctrl+[a-z] to Alt+[1-9] and Alt+[a-z]
|
||||||
K("C-comma"): [
|
K("RC-Key_2"): K("M-Key_2"),
|
||||||
K("C-T"),K("a"),K("b"),K("o"),K("u"),K("t"),
|
K("RC-Key_3"): K("M-Key_3"),
|
||||||
K("Shift-SEMICOLON"),K("p"),K("r"),K("e"),K("f"),
|
K("RC-Key_4"): K("M-Key_4"),
|
||||||
K("e"),K("r"),K("e"),K("n"),K("c"),K("e"),K("s"),K("Enter")
|
K("RC-Key_5"): K("M-Key_5"),
|
||||||
],
|
K("RC-Key_6"): K("M-Key_6"),
|
||||||
})
|
K("RC-Key_7"): K("M-Key_7"),
|
||||||
define_keymap(re.compile(chromeStr, re.IGNORECASE),{
|
K("RC-Key_8"): K("M-Key_8"),
|
||||||
K("C-comma"): [K("M-e"), K("s"),K("Enter")],
|
K("RC-Key_9"): K("M-Key_9"),
|
||||||
}, "Browsers")
|
K("RC-Key_0"): K("M-Key_0"),
|
||||||
# Opera C-F12
|
# K("RC-a"): K("M-a"),
|
||||||
|
K("RC-b"): K("M-b"),
|
||||||
|
# K("RC-c"): K("M-c"),
|
||||||
|
K("RC-d"): K("M-d"),
|
||||||
|
K("RC-e"): K("M-e"),
|
||||||
|
K("RC-f"): K("M-f"),
|
||||||
|
K("RC-g"): K("M-g"),
|
||||||
|
K("RC-h"): K("M-h"),
|
||||||
|
}, "Ulauncher")
|
||||||
|
|
||||||
# Note: terminals extends to remotes as well
|
# Note: terminals extends to remotes as well
|
||||||
define_keymap(lambda wm_class: wm_class.casefold() not in terminals,{
|
define_keymap(lambda wm_class: wm_class.casefold() not in terminals,{
|
||||||
@@ -438,6 +504,7 @@ define_keymap(lambda wm_class: wm_class.casefold() not in remotes,{
|
|||||||
K("RC-Space"): K("Alt-F1"), # Default SL - Launch Application Menu (gnome/kde)
|
K("RC-Space"): K("Alt-F1"), # Default SL - Launch Application Menu (gnome/kde)
|
||||||
K("RC-F3"):K("Super-d"), # Default SL - Show Desktop (gnome/kde,eos)
|
K("RC-F3"):K("Super-d"), # Default SL - Show Desktop (gnome/kde,eos)
|
||||||
K("RC-Super-f"):K("M-F10"), # Default SL - Maximize app (gnome/kde)
|
K("RC-Super-f"):K("M-F10"), # Default SL - Maximize app (gnome/kde)
|
||||||
|
# K("RC-Super-f"): K("Super-Page_Up"), # SL - Toggle maximized window state (kde_neon)
|
||||||
# K("Super-Right"):K("C-M-Right"), # Default SL - Change workspace (budgie)
|
# K("Super-Right"):K("C-M-Right"), # Default SL - Change workspace (budgie)
|
||||||
# K("Super-Left"):K("C-M-Left"), # Default SL - Change workspace (budgie)
|
# K("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
|
||||||
@@ -543,10 +610,12 @@ define_keymap(re.compile(codeStr, re.IGNORECASE),{
|
|||||||
K("M-Shift-Left"): [K("M-F19"),K("C-Shift-Left")], # Select Left of Word
|
K("M-Shift-Left"): [K("M-F19"),K("C-Shift-Left")], # Select Left of Word
|
||||||
K("M-Shift-Right"): [K("M-F19"),K("C-Shift-Right")], # Select Right of Word
|
K("M-Shift-Right"): [K("M-F19"),K("C-Shift-Right")], # Select Right of Word
|
||||||
|
|
||||||
# K("C-PAGE_DOWN"): pass_through_key, # cancel next_view
|
# K("C-PAGE_DOWN"): pass_through_key, # cancel next_view
|
||||||
# K("C-PAGE_UP"): pass_through_key, # cancel prev_view
|
# K("C-PAGE_UP"): pass_through_key, # cancel prev_view
|
||||||
K("C-M-Left"): K("C-PAGE_UP"), # next_view
|
K("C-M-Left"): K("C-PAGE_UP"), # next_view
|
||||||
K("C-M-Right"): K("C-PAGE_DOWN"), # prev_view
|
K("C-M-Right"): K("C-PAGE_DOWN"), # prev_view
|
||||||
|
K("RC-Shift-Left_Brace"): K("C-PAGE_UP"), # next_view
|
||||||
|
K("RC-Shift-Right_Brace"): K("C-PAGE_DOWN"), # prev_view
|
||||||
|
|
||||||
# VS Code Shortcuts
|
# VS Code Shortcuts
|
||||||
K("C-g"): pass_through_key, # cancel Go to Line...
|
K("C-g"): pass_through_key, # cancel Go to Line...
|
||||||
@@ -694,6 +763,8 @@ define_keymap(re.compile(termStr, re.IGNORECASE),{
|
|||||||
K("RC-P"): K("C-Shift-P"),
|
K("RC-P"): K("C-Shift-P"),
|
||||||
K("RC-LEFT_BRACE"): K("C-Shift-LEFT_BRACE"),
|
K("RC-LEFT_BRACE"): K("C-Shift-LEFT_BRACE"),
|
||||||
K("RC-RIGHT_BRACE"): K("C-Shift-RIGHT_BRACE"),
|
K("RC-RIGHT_BRACE"): K("C-Shift-RIGHT_BRACE"),
|
||||||
|
K("RC-Shift-Left_Brace"): K("C-Page_Up"), # Go to prior tab (Left)
|
||||||
|
K("RC-Shift-Right_Brace"): K("C-Page_Down"), # Go to next tab (Right)
|
||||||
K("RC-A"): K("C-Shift-A"),
|
K("RC-A"): K("C-Shift-A"),
|
||||||
K("RC-S"): K("C-Shift-S"),
|
K("RC-S"): K("C-Shift-S"),
|
||||||
K("RC-D"): K("C-Shift-D"),
|
K("RC-D"): K("C-Shift-D"),
|
||||||
|
@@ -116,6 +116,8 @@ class Indicator():
|
|||||||
with open(self.kconfig) as configfile:
|
with open(self.kconfig) as configfile:
|
||||||
autostart_line = configfile.read().split('\n')[1]
|
autostart_line = configfile.read().split('\n')[1]
|
||||||
|
|
||||||
|
autostart_bool = False
|
||||||
|
|
||||||
# Autostart
|
# Autostart
|
||||||
if "autostart = true" in autostart_line.casefold():
|
if "autostart = true" in autostart_line.casefold():
|
||||||
autostart_bool = True
|
autostart_bool = True
|
||||||
@@ -619,9 +621,9 @@ class Indicator():
|
|||||||
def runDebug(self,button,opendebug):
|
def runDebug(self,button,opendebug):
|
||||||
try:
|
try:
|
||||||
if opendebug:
|
if opendebug:
|
||||||
Popen([os.environ['HOME']+'/.config/kinto/gui/kinto-gui.py','-d'])
|
Popen(['/usr/bin/python3',os.environ['HOME']+'/.config/kinto/gui/kinto-gui.py','-d'])
|
||||||
else:
|
else:
|
||||||
Popen([os.environ['HOME']+'/.config/kinto/gui/kinto-gui.py'])
|
Popen(['/usr/bin/python3',os.environ['HOME']+'/.config/kinto/gui/kinto-gui.py'])
|
||||||
except:
|
except:
|
||||||
Popen(['notify-send','Kinto: Error opening Kinto!'])
|
Popen(['notify-send','Kinto: Error opening Kinto!'])
|
||||||
|
|
||||||
|
@@ -1,5 +0,0 @@
|
|||||||
partial modifier_keys
|
|
||||||
xkb_symbols "swap_lalt_lctrl" {
|
|
||||||
replace key <LALT> { [ Control_L, Control_L ] };
|
|
||||||
replace key <LCTL> { [ Alt_L, Meta_L ] };
|
|
||||||
};
|
|
@@ -1,781 +0,0 @@
|
|||||||
// 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)
|
|
||||||
]
|
|
||||||
};
|
|
||||||
};
|
|
@@ -1,210 +0,0 @@
|
|||||||
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)
|
|
||||||
]
|
|
||||||
};
|
|
||||||
};
|
|
@@ -1,100 +0,0 @@
|
|||||||
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>)
|
|
||||||
]
|
|
||||||
};
|
|
||||||
};
|
|
@@ -1,53 +0,0 @@
|
|||||||
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";
|
|
||||||
};
|
|
||||||
};
|
|
@@ -1,53 +0,0 @@
|
|||||||
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";
|
|
||||||
};
|
|
||||||
};
|
|
@@ -1,7 +0,0 @@
|
|||||||
"xdotool key --delay 0 --clearmodifiers Alt+Left"
|
|
||||||
Control + Left + Release
|
|
||||||
#Home + release
|
|
||||||
|
|
||||||
"xdotool key --delay 0 --clearmodifiers Alt+Right"
|
|
||||||
Control + Right + Release
|
|
||||||
#End + release
|
|
@@ -1,5 +0,0 @@
|
|||||||
"xdotool key --delay 0 --clearmodifiers Home"
|
|
||||||
Control + Left + Release
|
|
||||||
|
|
||||||
"xdotool key --delay 0 --clearmodifiers End"
|
|
||||||
Control + Right + Release
|
|
@@ -1,7 +0,0 @@
|
|||||||
#"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
|
|
@@ -1,10 +0,0 @@
|
|||||||
#!/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
|
|
@@ -1,10 +0,0 @@
|
|||||||
#!/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
|
|
@@ -1,86 +0,0 @@
|
|||||||
{"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)"
|
|
||||||
}]
|
|
||||||
}
|
|
@@ -1,167 +0,0 @@
|
|||||||
#!/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
|
|
@@ -1,40 +0,0 @@
|
|||||||
#!/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
|
|
@@ -1,8 +0,0 @@
|
|||||||
[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
|
|
@@ -1,76 +0,0 @@
|
|||||||
{"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":""
|
|
||||||
}]
|
|
||||||
}
|
|
@@ -1,10 +0,0 @@
|
|||||||
#!/bin/bash
|
|
||||||
|
|
||||||
if [ $# -eq 0 ]
|
|
||||||
then
|
|
||||||
# No arguments
|
|
||||||
./kintox11
|
|
||||||
else
|
|
||||||
./caret_status.sh &
|
|
||||||
./kintox11
|
|
||||||
fi
|
|
Binary file not shown.
@@ -1,5 +0,0 @@
|
|||||||
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
|
|
@@ -1,694 +0,0 @@
|
|||||||
// -*- 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);
|
|
||||||
}
|
|
||||||
}
|
|
@@ -1,16 +0,0 @@
|
|||||||
[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
|
|
@@ -1,11 +0,0 @@
|
|||||||
# 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
|
|
@@ -1,76 +0,0 @@
|
|||||||
{"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":""
|
|
||||||
}]
|
|
||||||
}
|
|
BIN
windows/WinToMac_AltWin_swap.skl
Normal file
BIN
windows/WinToMac_AltWin_swap.skl
Normal file
Binary file not shown.
@@ -176,6 +176,7 @@ GroupAdd, remotes, ahk_exe VirtualBoxVM.exe
|
|||||||
GroupAdd, remotes, ahk_exe mstsc.exe
|
GroupAdd, remotes, ahk_exe mstsc.exe
|
||||||
GroupAdd, remotes, ahk_exe msrdc.exe
|
GroupAdd, remotes, ahk_exe msrdc.exe
|
||||||
GroupAdd, remotes, ahk_exe nxplayer.bin
|
GroupAdd, remotes, ahk_exe nxplayer.bin
|
||||||
|
GroupAdd, remotes, ahk_exe vmconnect.exe
|
||||||
|
|
||||||
; 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
|
||||||
@@ -202,6 +203,44 @@ GroupAdd, intellij, ahk_exe idea64.exe
|
|||||||
; End::Send {Media_Play_Pause} ; Pause/Play
|
; End::Send {Media_Play_Pause} ; Pause/Play
|
||||||
; PgDn::Send {Media_Next} ; Next
|
; PgDn::Send {Media_Next} ; Next
|
||||||
|
|
||||||
|
; Virtual Desktop Hack via TotalSpaces2 - macOS Remote Desktop
|
||||||
|
; Custom Bind Gestures in Windows
|
||||||
|
; Shift-F8 on Left Swipe
|
||||||
|
; Shift-F9 on Right Swipe
|
||||||
|
#IfWinActive ahk_exe nxplayer.bin
|
||||||
|
+F8::Send !+- ; macOS TotalSpaces2 - Space Left
|
||||||
|
+F6::Send !+= ; macOS TotalSpaces2 - Space Right
|
||||||
|
#If
|
||||||
|
; +F8::Send {LCtrl down}{LWin down}{left}{LCtrl up}{LWin up} ; Comment out on host machine
|
||||||
|
; +F6::Send {LCtrl down}{LWin down}{right}{LCtrl up}{LWin up} ; Comment out on host machine
|
||||||
|
|
||||||
|
#IfWinNotActive ahk_group remotes
|
||||||
|
; Lock Workstation
|
||||||
|
#^q::DllCall("LockWorkStation")
|
||||||
|
; Conflicts w/ Win-L so will use Ctrl-Shift-L as Ctrl-L replacement
|
||||||
|
; Helpful for Sublime text lowercasing & VSCode
|
||||||
|
^+l::Send ^{l}
|
||||||
|
; Adds Task View to Ctrl-Cmd-Down
|
||||||
|
#^Down::
|
||||||
|
Run, "C:\Windows\explorer.exe" "shell:::{3080F90E-D7AD-11D9-BD98-0000947B0257}"
|
||||||
|
return
|
||||||
|
; wordwise support
|
||||||
|
^Up::Send ^{Home}
|
||||||
|
^+Up::Send ^+{Home}
|
||||||
|
^Down::Send ^{End}
|
||||||
|
^+Down::Send ^+{End}
|
||||||
|
$^Backspace::Send +{Home}{Delete}
|
||||||
|
!Backspace::Send ^{Backspace}
|
||||||
|
!Left::Send ^{Left}
|
||||||
|
!+Left::Send ^+{Left}
|
||||||
|
!Right::Send ^{Right}
|
||||||
|
!+Right::Send ^+{Right}
|
||||||
|
$^Left::Send {Home}
|
||||||
|
$^+Left::Send +{Home}
|
||||||
|
$^Right::Send {End}
|
||||||
|
$^+Right::Send +{End}
|
||||||
|
#If
|
||||||
|
|
||||||
#IfWinNotActive ahk_group remotes
|
#IfWinNotActive ahk_group remotes
|
||||||
|
|
||||||
; New AltTab and CtrlTab fix
|
; New AltTab and CtrlTab fix
|
||||||
@@ -308,8 +347,10 @@ GroupAdd, intellij, ahk_exe idea64.exe
|
|||||||
!Esc::SendInput, {Pause}
|
!Esc::SendInput, {Pause}
|
||||||
|
|
||||||
; Go up or down a page
|
; Go up or down a page
|
||||||
$!Down::Send {PgDn};
|
#IfWinNotActive ahk_group editors
|
||||||
$!Up::Send {PgUp};
|
$!Down::Send {PgDn}
|
||||||
|
$!Up::Send {PgUp}
|
||||||
|
#If
|
||||||
|
|
||||||
; Close Apps
|
; Close Apps
|
||||||
^q::Send !{F4}
|
^q::Send !{F4}
|
||||||
@@ -366,22 +407,6 @@ GroupAdd, intellij, ahk_exe idea64.exe
|
|||||||
; !^space::Send #e ; Default
|
; !^space::Send #e ; Default
|
||||||
; #^space::Send #e ; CB/IBM
|
; #^space::Send #e ; CB/IBM
|
||||||
|
|
||||||
; wordwise support
|
|
||||||
^Up::Send ^{Home}
|
|
||||||
^+Up::Send ^+{Home}
|
|
||||||
^Down::Send ^{End}
|
|
||||||
^+Down::Send ^+{End}
|
|
||||||
$^Backspace::Send +{Home}{Delete}
|
|
||||||
!Backspace::Send ^{Backspace}
|
|
||||||
!Left::Send ^{Left}
|
|
||||||
!+Left::Send ^+{Left}
|
|
||||||
!Right::Send ^{Right}
|
|
||||||
!+Right::Send ^+{Right}
|
|
||||||
$^Left::Send {Home}
|
|
||||||
$^+Left::Send +{Home}
|
|
||||||
$^Right::Send {End}
|
|
||||||
$^+Right::Send +{End}
|
|
||||||
|
|
||||||
; #if GetKeyState("LWin", "P") || GetKeyState("RAlt", "P") ; Chromebook
|
; #if GetKeyState("LWin", "P") || GetKeyState("RAlt", "P") ; Chromebook
|
||||||
; Space::Send ^{Esc} ; Chromebook
|
; Space::Send ^{Esc} ; Chromebook
|
||||||
; 0::Send #0 ; Chromebook
|
; 0::Send #0 ; Chromebook
|
||||||
@@ -536,6 +561,13 @@ GroupAdd, intellij, ahk_exe idea64.exe
|
|||||||
|
|
||||||
; Close all browsers
|
; Close all browsers
|
||||||
#IfWinActive ahk_group browsers
|
#IfWinActive ahk_group browsers
|
||||||
|
;Tab Navigation
|
||||||
|
^+[::send ^{PgUp}
|
||||||
|
^+]::send ^{PgDn}
|
||||||
|
^!Left::send ^{PgUp}
|
||||||
|
^!Right::send ^{PgDn}
|
||||||
|
#Left::send ^{PgUp}
|
||||||
|
#Right::send ^{PgDn}
|
||||||
^q::send {Alt Down}f{Alt Up}x ; exit all windows
|
^q::send {Alt Down}f{Alt Up}x ; exit all windows
|
||||||
; Dev Tools
|
; Dev Tools
|
||||||
!^i::send {Ctrl Down}{Shift Down}i{Shift Up}{Ctrl Up}
|
!^i::send {Ctrl Down}{Shift Down}i{Shift Up}{Ctrl Up}
|
||||||
@@ -543,6 +575,7 @@ GroupAdd, intellij, ahk_exe idea64.exe
|
|||||||
; Open preferences
|
; Open preferences
|
||||||
#IfWinActive ahk_exe firefox.exe
|
#IfWinActive ahk_exe firefox.exe
|
||||||
^,::send, {Ctrl Down}t{Ctrl Up}about:preferences{Enter}
|
^,::send, {Ctrl Down}t{Ctrl Up}about:preferences{Enter}
|
||||||
|
^+n::send ^+p
|
||||||
#If
|
#If
|
||||||
#IfWinActive ahk_exe chrome.exe
|
#IfWinActive ahk_exe chrome.exe
|
||||||
^,::send {Alt Down}e{Alt Up}s{Enter}
|
^,::send {Alt Down}e{Alt Up}s{Enter}
|
||||||
|
@@ -305,6 +305,7 @@ fi
|
|||||||
|
|
||||||
if [[ $distro == "elementaryos" ]]; then
|
if [[ $distro == "elementaryos" ]]; then
|
||||||
gsettings set io.elementary.terminal.settings natural-copy-paste false
|
gsettings set io.elementary.terminal.settings natural-copy-paste false
|
||||||
|
sudo ./linux/system-config/unipkg.sh libvte-2.91-dev
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if ! [ -x "$(command -v xhost)" ] || ! [ -x "$(command -v gcc)" ]; then
|
if ! [ -x "$(command -v xhost)" ] || ! [ -x "$(command -v gcc)" ]; then
|
||||||
@@ -554,17 +555,15 @@ if ! [[ $1 == "5" || $1 == "uninstall" || $1 == "Uninstall" ]]; then
|
|||||||
xkeypath="/lib/systemd/system/"
|
xkeypath="/lib/systemd/system/"
|
||||||
fi
|
fi
|
||||||
xhost +SI:localuser:root
|
xhost +SI:localuser:root
|
||||||
git clone --depth 10 https://github.com/rbreaves/xkeysnail.git
|
git clone -b kinto --depth 10 https://github.com/rbreaves/xkeysnail.git
|
||||||
cd xkeysnail
|
cd xkeysnail
|
||||||
git checkout kinto
|
|
||||||
giturl=$(git ls-remote --get-url)
|
giturl=$(git ls-remote --get-url)
|
||||||
if [ "$giturl" != "https://github.com/rbreaves/xkeysnail.git" ];then
|
if [ "$giturl" != "https://github.com/rbreaves/xkeysnail.git" ];then
|
||||||
echo -e "\nreplacing xkeysnail with fork...\n"
|
echo -e "\nreplacing xkeysnail with fork...\n"
|
||||||
cd ..
|
cd ..
|
||||||
rm -rf ./xkeysnail
|
rm -rf ./xkeysnail
|
||||||
git clone --depth 10 https://github.com/rbreaves/xkeysnail.git
|
git clone -b kinto --depth 10 https://github.com/rbreaves/xkeysnail.git
|
||||||
cd xkeysnail
|
cd xkeysnail
|
||||||
git checkout kinto
|
|
||||||
fi
|
fi
|
||||||
sudo pip3 install --upgrade .
|
sudo pip3 install --upgrade .
|
||||||
cd ..
|
cd ..
|
||||||
|
Reference in New Issue
Block a user