From 39f65c0e2bbc53c8bd2dd7c306a1da60e1809535 Mon Sep 17 00:00:00 2001 From: Ben Reaves Date: Wed, 11 Nov 2020 13:02:20 -0600 Subject: [PATCH 1/3] - Added support for commandbox (coldfusion) on Windows --- windows/kinto.ahk | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/windows/kinto.ahk b/windows/kinto.ahk index 75f6425..0e49fc1 100644 --- a/windows/kinto.ahk +++ b/windows/kinto.ahk @@ -132,6 +132,7 @@ GroupAdd, terminals, ahk_exe WindowsTerminal.exe GroupAdd, terminals, ahk_exe Hyper.exe GroupAdd, terminals, ahk_exe mintty.exe GroupAdd, terminals, ahk_exe Cmd.exe +GroupAdd, terminals, ahk_exe box.exe GroupAdd, terminals, ahk_exe Terminus.exe GroupAdd, terminals, Fluent Terminal ahk_class ApplicationFrameWindow @@ -523,7 +524,7 @@ GroupAdd, intellij, ahk_exe idea64.exe ; Copy ^c:: - If WinActive("ahk_exe cmd.exe"){ + If WinActive("ahk_exe cmd.exe") OR WinActive("ahk_exe box.exe"){ Send {Enter} } else if WinActive("ahk_exe mintty.exe"){ @@ -537,7 +538,7 @@ GroupAdd, intellij, ahk_exe idea64.exe return ^c up:: - If not WinActive("ahk_group cmd.exe"){ + If not WinActive("ahk_group cmd.exe") OR WinActive("ahk_exe box.exe"){ SetKeyDelay -1 Send {Blind}{c Up}{LShift Up} } @@ -555,6 +556,9 @@ GroupAdd, intellij, ahk_exe idea64.exe else if WinActive("ahk_group posix"){ Send {Blind}{Shift down}v{Shift up} } + else if WinActive("ahk_exe box.exe"){ + SendEvent {RButton} + } else{ Send {Blind}v } From a9afdac847cab6d13084d8057d1f38c7ec04a940 Mon Sep 17 00:00:00 2001 From: Ben Reaves Date: Wed, 11 Nov 2020 14:03:31 -0600 Subject: [PATCH 2/3] - Relocated xkeysnail replacement to after xkeysnail install. Closes #311 --- xkeysnail_service.sh | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/xkeysnail_service.sh b/xkeysnail_service.sh index 0daf420..695888c 100755 --- a/xkeysnail_service.sh +++ b/xkeysnail_service.sh @@ -400,11 +400,9 @@ sed -i "s#{homedir}#`echo "$HOME"`#g" ~/.config/kinto/gui/kinto-gui.py sed -i "s#{homedir}#`echo "$HOME"`#g" ./xkeysnail-config/gui/kinto.desktop.new sudo mv ./xkeysnail-config/gui/kinto.desktop.new /usr/share/applications/kinto.desktop sed -i "s#{xhost}#`\\which xhost`#g" ./xkeysnail-config/xkeysnail.service.new -sed -i "s#{xkeysnail}#`which xkeysnail`#g" ./xkeysnail-config/xkeysnail.service.new sed -i "s/{username}/`whoami`/g" ./xkeysnail-config/limitedadmins.new sed -i "s#{systemctl}#`\\which systemctl`#g" ./xkeysnail-config/limitedadmins.new sed -i "s#{pkill}#`\\which pkill`#g" ./xkeysnail-config/limitedadmins.new -sed -i "s#{xkeysnail}#`which xkeysnail`#g" ./xkeysnail-config/limitedadmins.new sudo chown root:root ./xkeysnail-config/limitedadmins.new sudo mv ./xkeysnail-config/limitedadmins.new /etc/sudoers.d/limitedadmins sed -i "s#{systemctl}#`\\which systemctl`#g" ~/.config/kinto/xkeysnail.desktop @@ -464,11 +462,6 @@ if ! [[ $1 == "5" || $1 == "uninstall" || $1 == "Uninstall" ]]; then elif [ -d /lib/systemd/system ];then xkeypath="/lib/systemd/system/" fi - sudo mv ./xkeysnail-config/xkeysnail.service.new "$xkeypath"xkeysnail.service && echo "Service file added to "$xkeypath"xkeysnail.service" - sudo chown -R root:root "$xkeypath"xkeysnail.service && echo "Ownership set for root..." || echo "Failed to set ownership..." - sudo chmod 644 "$xkeypath"xkeysnail.service && echo "Permissions set to 644..." || echo "Failed to set permissions..." - sudo ln -s "$xkeypath"xkeysnail.service /etc/systemd/system/xkeysnail.service && echo "Created soft symlink..." || echo "Failed to create soft symlink..." - sudo ln -s "$xkeypath"xkeysnail.service /etc/systemd/system/graphical.target.wants/xkeysnail.service && echo "Created soft symlink for graphical target..." || echo "Failed to create soft symlink for graphical target..." xhost +SI:localuser:root git clone --depth 10 https://github.com/rbreaves/xkeysnail.git cd xkeysnail @@ -485,6 +478,13 @@ if ! [[ $1 == "5" || $1 == "uninstall" || $1 == "Uninstall" ]]; then fi sudo pip3 install --upgrade . cd .. + sed -i "s#{xkeysnail}#`which xkeysnail`#g" ./xkeysnail-config/xkeysnail.service.new + sed -i "s#{xkeysnail}#`which xkeysnail`#g" ./xkeysnail-config/limitedadmins.new + sudo mv ./xkeysnail-config/xkeysnail.service.new "$xkeypath"xkeysnail.service && echo "Service file added to "$xkeypath"xkeysnail.service" + sudo chown -R root:root "$xkeypath"xkeysnail.service && echo "Ownership set for root..." || echo "Failed to set ownership..." + sudo chmod 644 "$xkeypath"xkeysnail.service && echo "Permissions set to 644..." || echo "Failed to set permissions..." + sudo ln -s "$xkeypath"xkeysnail.service /etc/systemd/system/xkeysnail.service && echo "Created soft symlink..." || echo "Failed to create soft symlink..." + sudo ln -s "$xkeypath"xkeysnail.service /etc/systemd/system/graphical.target.wants/xkeysnail.service && echo "Created soft symlink for graphical target..." || echo "Failed to create soft symlink for graphical target..." sudo systemctl daemon-reload sudo systemctl disable xkeysnail sudo systemctl stop xkeysnail From 94595a3324015f4fff3c4866cad551e921052163 Mon Sep 17 00:00:00 2001 From: Ben Reaves Date: Wed, 11 Nov 2020 14:17:40 -0600 Subject: [PATCH 3/3] - Relocated limitedadmins as well for #311, will add check later --- xkeysnail_service.sh | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/xkeysnail_service.sh b/xkeysnail_service.sh index 695888c..7a077fe 100755 --- a/xkeysnail_service.sh +++ b/xkeysnail_service.sh @@ -403,8 +403,6 @@ sed -i "s#{xhost}#`\\which xhost`#g" ./xkeysnail-config/xkeysnail.service.new sed -i "s/{username}/`whoami`/g" ./xkeysnail-config/limitedadmins.new sed -i "s#{systemctl}#`\\which systemctl`#g" ./xkeysnail-config/limitedadmins.new sed -i "s#{pkill}#`\\which pkill`#g" ./xkeysnail-config/limitedadmins.new -sudo chown root:root ./xkeysnail-config/limitedadmins.new -sudo mv ./xkeysnail-config/limitedadmins.new /etc/sudoers.d/limitedadmins sed -i "s#{systemctl}#`\\which systemctl`#g" ~/.config/kinto/xkeysnail.desktop sed -i "s#{xhost}#`\\which xhost`#g" ~/.config/kinto/xkeysnail.desktop sed -i "s#{homedir}#`echo "$HOME"`#g" ~/.config/kinto/xkeysnail.desktop @@ -481,6 +479,9 @@ if ! [[ $1 == "5" || $1 == "uninstall" || $1 == "Uninstall" ]]; then sed -i "s#{xkeysnail}#`which xkeysnail`#g" ./xkeysnail-config/xkeysnail.service.new sed -i "s#{xkeysnail}#`which xkeysnail`#g" ./xkeysnail-config/limitedadmins.new sudo mv ./xkeysnail-config/xkeysnail.service.new "$xkeypath"xkeysnail.service && echo "Service file added to "$xkeypath"xkeysnail.service" + sudo chown root:root ./xkeysnail-config/limitedadmins.new + # Add a check here for xkeysnail path resolving + sudo mv ./xkeysnail-config/limitedadmins.new /etc/sudoers.d/limitedadmins sudo chown -R root:root "$xkeypath"xkeysnail.service && echo "Ownership set for root..." || echo "Failed to set ownership..." sudo chmod 644 "$xkeypath"xkeysnail.service && echo "Permissions set to 644..." || echo "Failed to set permissions..." sudo ln -s "$xkeypath"xkeysnail.service /etc/systemd/system/xkeysnail.service && echo "Created soft symlink..." || echo "Failed to create soft symlink..."