From 4c5cb365038a55a5201a5e03adb2896fda3cde4a Mon Sep 17 00:00:00 2001 From: Ben Reaves Date: Wed, 27 May 2020 02:38:14 -0500 Subject: [PATCH 1/2] - Added cmd-t/w - open/close tabs to win terminals --- windows/kinto.ahk | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/windows/kinto.ahk b/windows/kinto.ahk index 65d2acd..6b7851c 100644 --- a/windows/kinto.ahk +++ b/windows/kinto.ahk @@ -12,7 +12,9 @@ GroupAdd, terminals, Fluent Terminal ahk_class ApplicationFrameWindow GroupAdd, posix, ahk_exe ubuntu.exe GroupAdd, posix, ahk_exe ConEmu.exe GroupAdd, posix, ahk_exe ConEmu64.exe +GroupAdd, posix, ahk_exe Hyper.exe GroupAdd, posix, ahk_exe mintty.exe +GroupAdd, posix, Fluent Terminal ahk_class ApplicationFrameWindow GroupAdd, ConEmu, ahk_exe ConEmu.exe GroupAdd, ConEmu, ahk_exe ConEmu64.exe @@ -117,6 +119,9 @@ $^+Right::Send +{End} #If #IfWinActive ahk_group posix + ; Open/Close Tab for those that support it + ^t::Send {LCtrl down}{LShift down}t{LCtrl Up}{LShift Up} + ^w::Send {LCtrl down}{LShift down}w{LCtrl Up}{LShift Up} ; End of Line #e::Send {LCtrl down}e{LCtrl Up} ^e::return From 2ffe6390243ac508c646cd2e02a6f3484ee45198 Mon Sep 17 00:00:00 2001 From: Ben Reaves Date: Fri, 29 May 2020 15:33:53 -0500 Subject: [PATCH 2/2] - Resolves multi-language support under xkeysnail. Closes #192. --- .gitignore | 2 ++ xkeysnail-config/kinto.py | 4 ++-- xkeysnail_service.sh | 14 ++++++++++++++ 3 files changed, 18 insertions(+), 2 deletions(-) diff --git a/.gitignore b/.gitignore index 19075ff..74c58f6 100644 --- a/.gitignore +++ b/.gitignore @@ -2,3 +2,5 @@ .DS_Store __pycache__/ xkeysnail/ +keybindings_* +mutter_* diff --git a/xkeysnail-config/kinto.py b/xkeysnail-config/kinto.py index 40f6091..64b06b4 100644 --- a/xkeysnail-config/kinto.py +++ b/xkeysnail-config/kinto.py @@ -44,7 +44,7 @@ define_conditional_modmap(re.compile(termStr, re.IGNORECASE), { # Key.LEFT_ALT: Key.RIGHT_CTRL, # Chromebook # # Left Ctrl Stays Left Ctrl # Key.LEFT_META: Key.LEFT_ALT, # Chromebook - # Key.RIGHT_ALT: Key.RIGHT_CTRL, # Chromebook + # Key.RIGHT_ALT: Key.RIGHT_CTRL, # Chromebook - Multi-language (Remove) # Key.RIGHT_CTRL: Key.RIGHT_ALT, # Chromebook # # Right Meta does not exist on chromebooks @@ -52,7 +52,7 @@ define_conditional_modmap(re.compile(termStr, re.IGNORECASE), { # Key.LEFT_ALT: Key.RIGHT_CTRL, # WinMac # Key.LEFT_META: Key.LEFT_ALT, # WinMac # Key.LEFT_CTRL: Key.LEFT_CTRL, # WinMac - # Key.RIGHT_ALT: Key.RIGHT_CTRL, # WinMac + # Key.RIGHT_ALT: Key.RIGHT_CTRL, # WinMac - Multi-language (Remove) # Key.RIGHT_META: Key.RIGHT_ALT, # WinMac # Key.RIGHT_CTRL: Key.LEFT_CTRL, # WinMac diff --git a/xkeysnail_service.sh b/xkeysnail_service.sh index 96e5401..47ee4c2 100755 --- a/xkeysnail_service.sh +++ b/xkeysnail_service.sh @@ -149,6 +149,15 @@ if [ $# -eq 0 ]; then fi if [[ $1 == "1" || $1 == "2" || $1 == "3" || $1 == "4" || $1 == "kintowin" || $1 == "winmac" || $1 == "mac" || $1 == "chromebook" ]]; then + rightalt=false + while true; do + read -rep $'\nDo you want multi-language support (the right Alt key will not remap)? (y/n)\n' yn + case $yn in + [Yy]* ) rightalt=true; break;; + [Nn]* ) break;; + # * ) echo "Please answer yes or no.";; + esac + done branch=$(git rev-parse --abbrev-ref HEAD) if [ "$branch" == "dev" ] || [ "$branch" == "alpha" ];then while true; do @@ -251,6 +260,11 @@ elif [[ $1 == "4" || $1 == "kintowin" ]]; then perl -pi -e "s/(# )(.*)(# KintoWin)/\$2\$3/g" ./xkeysnail-config/kinto.py.new fi +if "$rightalt"; then + echo "Enabling mutli-language support." + perl -pi -e "s/(\w.*)(Multi-language)/# \$1\$2/g" ./xkeysnail-config/kinto.py.new +fi + if [[ $1 == "1" || $1 == "2" || $1 == "3" || $1 == "4" || $1 == "kintowin" || $1 == "winmac" || $1 == "mac" || $1 == "chromebook" ]]; then mv ./xkeysnail-config/kinto.py.new ~/.config/kinto/kinto.py # if [ "$distro" == "fedora" ];then