Compare commits

..

3 Commits
1.2-13 ... CI

Author SHA1 Message Date
Ben Reaves
c4b30587dd Restructing kinto.py 2022-04-02 01:33:14 -05:00
Ben Reaves
81581c547b Merge branch 'master' into staging 2022-04-01 23:59:14 -05:00
Ben Reaves
a91bbec93c Windows - Adds new Lockscreen hotkey, lowercase hotkey & taskview 2022-03-13 17:21:18 -05:00
9 changed files with 126 additions and 56 deletions

View File

@@ -322,7 +322,7 @@ define_keymap(re.compile("Sublime_text"),{
In the above example I am also showing that you can define a single shortcut to enact multiple shortcut keys if needed by defining an array of shortcuts to trigger. In the above example I am also showing that you can define a single shortcut to enact multiple shortcut keys if needed by defining an array of shortcuts to trigger.
To make changes you can edit ~/.config/kinto/kinto.py under linux & restart the xkeysnail service via the system tray, app or CLI. You can also make changes to the file in your /tmp/kinto/xkeysnail/kinto.py location and see them take affect in real time, but for your changes to be permanent you will need to make your changes in the ~/.config/kinto/kinto.py location & restart the xkeysnail service.
systemd systemd
``` ```

View File

View 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,"
]

View 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,"
]

View File

View File

@@ -69,8 +69,6 @@ browsers = [
"Epiphany", "Epiphany",
"Firefox", "Firefox",
"Firefox Developer Edition", "Firefox Developer Edition",
"Navigator",
"firefoxdeveloperedition",
"Waterfox", "Waterfox",
"Google-chrome", "Google-chrome",
"microsoft-edge", "microsoft-edge",
@@ -89,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)
@@ -438,15 +438,9 @@ define_keymap(re.compile("Firefox", re.IGNORECASE),{
], ],
K("RC-Shift-N"): K("RC-Shift-P"), # Open private window with Ctrl+Shift+N like other browsers 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),{ define_keymap(re.compile(chromeStr, re.IGNORECASE),{
K("C-comma"): [K("M-e"), K("s"),K("Enter")], # Open preferences K("C-comma"): [K("M-e"), K("s"),K("Enter")],
K("RC-q"): K("M-F4"), # Quit Chrome(s) browsers with Cmd+Q }, "Browsers")
# K("RC-Left"): K("M-Left"), # Page nav: Back to prior page in history (conflict with wordwise)
# K("RC-Right"): K("M-Right"), # Page nav: Forward to next page in history (conflict with wordwise)
K("RC-Left_Brace"): K("M-Left"), # Page nav: Back to prior page in history
K("RC-Right_Brace"): K("M-Right"), # Page nav: Forward to next page in history
}, "Chrome Browsers")
# Opera C-F12 # Opera C-F12
# Keybindings for General Web Browsers # Keybindings for General Web Browsers

View File

@@ -3,19 +3,15 @@
import gi import gi
gi.require_version('Gtk', '3.0') gi.require_version('Gtk', '3.0')
gi.require_version('AppIndicator3', '0.1')
gi.require_version('Notify', '0.7') gi.require_version('Notify', '0.7')
import signal,time,os,fcntl,datetime,re import signal,time,os,fcntl,datetime,re
from subprocess import Popen, PIPE, CalledProcessError from subprocess import Popen, PIPE, CalledProcessError
from shutil import which from shutil import which
from gi.repository import Gtk,GLib,GdkPixbuf from gi.repository import Gtk,GLib,GdkPixbuf
from gi.repository import AppIndicator3 as appindicator
from gi.repository import Notify as notify from gi.repository import Notify as notify
try:
gi.require_version('AyatanaAppIndicator3', '0.1')
from gi.repository import AyatanaAppIndicator3 as appindicator
except ValueError:
gi.require_version('AppIndicator3', '0.1')
from gi.repository import AppIndicator3 as appindicator
import signal import signal

View File

@@ -215,6 +215,15 @@ GroupAdd, intellij, ahk_exe idea64.exe
; +F6::Send {LCtrl down}{LWin down}{right}{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 #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 ; wordwise support
^Up::Send ^{Home} ^Up::Send ^{Home}
^+Up::Send ^+{Home} ^+Up::Send ^+{Home}
@@ -552,16 +561,13 @@ GroupAdd, intellij, ahk_exe idea64.exe
; Close all browsers ; Close all browsers
#IfWinActive ahk_group browsers #IfWinActive ahk_group browsers
; Page Navigation ;Tab Navigation
^[::send !{Left} ; Go to prior page ^+[::send ^{PgUp}
^]::send !{Right} ; Go to next page ^+]::send ^{PgDn}
;Tab Navigation ^!Left::send ^{PgUp}
^+[::send ^{PgUp} ; Go to prior tab (left) ^!Right::send ^{PgDn}
^+]::send ^{PgDn} ; Go to next tab (right) #Left::send ^{PgUp}
^!Left::send ^{PgUp} ; Go to prior tab (left) #Right::send ^{PgDn}
^!Right::send ^{PgDn} ; Go to next tab (right)
#Left::send ^{PgUp} ; Go to prior tab (left)
#Right::send ^{PgDn} ; Go to next tab (right)
^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}
@@ -861,28 +867,3 @@ Send {LWin up}
Send {RShift up} Send {RShift up}
Send {LShift up} Send {LShift up}
return return
#IfWinNotActive ahk_group remotes
$!u::Goto, ActivateUmlautModifier
$!s::Send, ß
ActivateUmlautModifier:
StringCaseSense, On
; watch next input string
Input, UserInput, L1 B
if UserInput = o
Send, ö
else if UserInput = O
Send, Ö
else if UserInput = a
Send, ä
else if UserInput = A
Send, Ä
else if UserInput = u
Send, ü
else if UserInput = U
Send, Ü
else
Send, %UserInput%
return
#If

View File

@@ -329,7 +329,7 @@ if [[ $distro == 'kdeneon' ]]; then
kquitapp5 kglobalaccel && sleep 2s && kglobalaccel5 & kquitapp5 kglobalaccel && sleep 2s && kglobalaccel5 &
fi fi
if [[ $distro == 'fedora' ]] || [[ $distro == 'fedoralinux' ]]; then if [[ $distro == 'fedora' ]]; then
if [[ $(gsettings get org.gnome.desktop.wm.keybindings show-desktop | grep "\[\]" | wc -l) == 1 ]];then if [[ $(gsettings get org.gnome.desktop.wm.keybindings show-desktop | grep "\[\]" | wc -l) == 1 ]];then
gsettings set org.gnome.desktop.wm.keybindings show-desktop "['<Super>d']" gsettings set org.gnome.desktop.wm.keybindings show-desktop "['<Super>d']"
else else
@@ -500,7 +500,7 @@ if [[ $distro == "popos" ]]; then
perl -pi -e "\s{4}(# )(K.*)(# SL - .*popos.*)/ \$2\$3/g" ./linux/kinto.py.new >/dev/null 2>&1 perl -pi -e "\s{4}(# )(K.*)(# SL - .*popos.*)/ \$2\$3/g" ./linux/kinto.py.new >/dev/null 2>&1
fi fi
if [[ $distro == 'fedora' ]] || [[ $distro == 'fedoralinux' ]]; then if [[ $distro == "fedora" ]]; then
perl -pi -e "\s{4}(# )(K.*)(# SL - .*fedora.*)/ \$2\$3/g" ./linux/kinto.py.new >/dev/null 2>&1 perl -pi -e "\s{4}(# )(K.*)(# SL - .*fedora.*)/ \$2\$3/g" ./linux/kinto.py.new >/dev/null 2>&1
sed -i "s#{sudo}##g" ./linux/xkeysnail.service.new sed -i "s#{sudo}##g" ./linux/xkeysnail.service.new
selinuxuser=system_u selinuxuser=system_u
@@ -575,7 +575,7 @@ if ! [[ $1 == "5" || $1 == "uninstall" || $1 == "Uninstall" ]]; then
exit 0 exit 0
fi fi
sed -i "s#{xkeysnail}#`which xkeysnail`#g" ./linux/limitedadmins.new sed -i "s#{xkeysnail}#`which xkeysnail`#g" ./linux/limitedadmins.new
if [[ $distro == 'fedora' ]] || [[ $distro == 'fedoralinux' ]]; then if [[ $distro == "fedora" ]]; then
echo "Changing SELinux context" echo "Changing SELinux context"
sudo chcon -v --user=$selinuxuser --type=$selinuxtype "$xkeypath"xkeysnail.service sudo chcon -v --user=$selinuxuser --type=$selinuxtype "$xkeypath"xkeysnail.service
fi fi
@@ -587,7 +587,7 @@ if ! [[ $1 == "5" || $1 == "uninstall" || $1 == "Uninstall" ]]; then
sed -i "s#{xkeysnail}#`which xkeysnail`#g" ./linux/xkeysnail.service.new sed -i "s#{xkeysnail}#`which xkeysnail`#g" ./linux/xkeysnail.service.new
sudo mv ./linux/xkeysnail.service.new "$xkeypath"xkeysnail.service && echo "Service file added to "$xkeypath"xkeysnail.service" sudo mv ./linux/xkeysnail.service.new "$xkeypath"xkeysnail.service && echo "Service file added to "$xkeypath"xkeysnail.service"
if [[ $distro == 'fedora' ]] || [[ $distro == 'fedoralinux' ]]; then if [[ $distro == "fedora" ]]; then
sudo cp "$xkeypath"xkeysnail.service /etc/systemd/system/xkeysnail.service && echo "Copied service file to system..." || echo "Failed to create copy..." sudo cp "$xkeypath"xkeysnail.service /etc/systemd/system/xkeysnail.service && echo "Copied service file to system..." || echo "Failed to create copy..."
sudo cp "$xkeypath"xkeysnail.service /etc/systemd/system/graphical.target.wants/xkeysnail.service && echo "Copied service file to system for graphical target..." || echo "Failed to create copy for graphical target..." sudo cp "$xkeypath"xkeysnail.service /etc/systemd/system/graphical.target.wants/xkeysnail.service && echo "Copied service file to system for graphical target..." || echo "Failed to create copy for graphical target..."
sudo chown -R root:root /etc/systemd/system/xkeysnail.service && echo "Ownership set for root..." || echo "Failed to set ownership..." sudo chown -R root:root /etc/systemd/system/xkeysnail.service && echo "Ownership set for root..." || echo "Failed to set ownership..."