diff --git a/xkeysnail-config/gnome_logoff.sh b/linux/gnome_logoff.sh similarity index 100% rename from xkeysnail-config/gnome_logoff.sh rename to linux/gnome_logoff.sh diff --git a/xkeysnail-config/gui/capslock_1200x720.png b/linux/gui/capslock_1200x720.png old mode 100755 new mode 100644 similarity index 100% rename from xkeysnail-config/gui/capslock_1200x720.png rename to linux/gui/capslock_1200x720.png diff --git a/xkeysnail-config/gui/keys_1200x720.png b/linux/gui/keys_1200x720.png old mode 100755 new mode 100644 similarity index 100% rename from xkeysnail-config/gui/keys_1200x720.png rename to linux/gui/keys_1200x720.png diff --git a/xkeysnail-config/gui/kinto-gui.py b/linux/gui/kinto-gui.py old mode 100755 new mode 100644 similarity index 100% rename from xkeysnail-config/gui/kinto-gui.py rename to linux/gui/kinto-gui.py diff --git a/xkeysnail-config/gui/kinto.desktop b/linux/gui/kinto.desktop similarity index 100% rename from xkeysnail-config/gui/kinto.desktop rename to linux/gui/kinto.desktop diff --git a/xkeysnail-config/gui/tuxbg.png b/linux/gui/tuxbg.png old mode 100755 new mode 100644 similarity index 100% rename from xkeysnail-config/gui/tuxbg.png rename to linux/gui/tuxbg.png diff --git a/xkeysnail-config/gui/tuxcry4.png b/linux/gui/tuxcry4.png old mode 100755 new mode 100644 similarity index 100% rename from xkeysnail-config/gui/tuxcry4.png rename to linux/gui/tuxcry4.png diff --git a/xkeysnail-config/gui/tuxerror.png b/linux/gui/tuxerror.png old mode 100755 new mode 100644 similarity index 100% rename from xkeysnail-config/gui/tuxerror.png rename to linux/gui/tuxerror.png diff --git a/xkeysnail-config/gui/tuxuninstall.png b/linux/gui/tuxuninstall.png old mode 100755 new mode 100644 similarity index 100% rename from xkeysnail-config/gui/tuxuninstall.png rename to linux/gui/tuxuninstall.png diff --git a/xkeysnail-config/initkb b/linux/initkb similarity index 100% rename from xkeysnail-config/initkb rename to linux/initkb diff --git a/xkeysnail-config/killdups.sh b/linux/killdups.sh similarity index 100% rename from xkeysnail-config/killdups.sh rename to linux/killdups.sh diff --git a/xkeysnail-config/kinto.py b/linux/kinto.py similarity index 97% rename from xkeysnail-config/kinto.py rename to linux/kinto.py index 592b585c..b6aeb660 100644 --- a/xkeysnail-config/kinto.py +++ b/linux/kinto.py @@ -341,7 +341,10 @@ K("C-g"): K("f3"), # find_next K("Shift-f3"): pass_through_key, # cancel find_prev K("C-Shift-g"): K("Shift-f3"), # find_prev - K("Super-c"): K("LC-c"), # Sigints - interrupt + # K("Super-c"): K("LC-c"), # Default - Terminal - Sigint + # K("Super-x"): K("LC-x"), # Default - Terminal - Exit nano + # K("M-c"): K("LC-c"), # Chromebook/IBM - Terminal - Sigint + # K("M-x"): K("LC-x"), # Chromebook/IBM - Terminal - Exit nano # K("Super-C-g"): K("C-f2"), # Default - Sublime - find_all_under # K("C-M-g"): K("C-f2"), # Chromebook/IBM - Sublime - find_all_under # K("Super-Shift-up"): K("M-Shift-up"), # multi-cursor up - Sublime @@ -352,6 +355,10 @@ # Keybindings for Sublime Text define_keymap(re.compile("Sublime_text", re.IGNORECASE),{ + # K("Super-c"): K("LC-c"), # Default - Terminal - Sigint + # K("Super-x"): K("LC-x"), # Default - Terminal - Exit nano + # K("M-c"): K("LC-c"), # Chromebook/IBM - Terminal - Sigint + # K("M-x"): K("LC-x"), # Chromebook/IBM - Terminal - Exit nano K("Super-Space"): K("C-Space"), # Basic code completion K("C-Super-up"): K("M-o"), # Switch file K("Super-RC-f"): K("f11"), # toggle_full_screen diff --git a/xkeysnail-config/limitedadmins b/linux/limitedadmins similarity index 100% rename from xkeysnail-config/limitedadmins rename to linux/limitedadmins diff --git a/xkeysnail-config/prexk.sh b/linux/prexk.sh similarity index 100% rename from xkeysnail-config/prexk.sh rename to linux/prexk.sh diff --git a/xkeysnail-config/root_logoff.sh b/linux/root_logoff.sh similarity index 100% rename from xkeysnail-config/root_logoff.sh rename to linux/root_logoff.sh diff --git a/system-config/dename.sh b/linux/system-config/dename.sh similarity index 100% rename from system-config/dename.sh rename to linux/system-config/dename.sh diff --git a/system-config/unipkg.sh b/linux/system-config/unipkg.sh similarity index 100% rename from system-config/unipkg.sh rename to linux/system-config/unipkg.sh diff --git a/xkeysnail-config/trayapps/appindicator/icons/kinto-color-16.svg b/linux/trayapps/appindicator/icons/kinto-color-16.svg similarity index 100% rename from xkeysnail-config/trayapps/appindicator/icons/kinto-color-16.svg rename to linux/trayapps/appindicator/icons/kinto-color-16.svg diff --git a/xkeysnail-config/trayapps/appindicator/icons/kinto-color.svg b/linux/trayapps/appindicator/icons/kinto-color.svg similarity index 100% rename from xkeysnail-config/trayapps/appindicator/icons/kinto-color.svg rename to linux/trayapps/appindicator/icons/kinto-color.svg diff --git a/xkeysnail-config/trayapps/appindicator/icons/kinto-invert-16.svg b/linux/trayapps/appindicator/icons/kinto-invert-16.svg similarity index 100% rename from xkeysnail-config/trayapps/appindicator/icons/kinto-invert-16.svg rename to linux/trayapps/appindicator/icons/kinto-invert-16.svg diff --git a/xkeysnail-config/trayapps/appindicator/icons/kinto-invert.svg b/linux/trayapps/appindicator/icons/kinto-invert.svg similarity index 100% rename from xkeysnail-config/trayapps/appindicator/icons/kinto-invert.svg rename to linux/trayapps/appindicator/icons/kinto-invert.svg diff --git a/xkeysnail-config/trayapps/appindicator/icons/kinto-solid-16.svg b/linux/trayapps/appindicator/icons/kinto-solid-16.svg similarity index 100% rename from xkeysnail-config/trayapps/appindicator/icons/kinto-solid-16.svg rename to linux/trayapps/appindicator/icons/kinto-solid-16.svg diff --git a/xkeysnail-config/trayapps/appindicator/icons/kinto-solid.svg b/linux/trayapps/appindicator/icons/kinto-solid.svg similarity index 100% rename from xkeysnail-config/trayapps/appindicator/icons/kinto-solid.svg rename to linux/trayapps/appindicator/icons/kinto-solid.svg diff --git a/xkeysnail-config/trayapps/appindicator/icons/kinto.svg b/linux/trayapps/appindicator/icons/kinto.svg similarity index 100% rename from xkeysnail-config/trayapps/appindicator/icons/kinto.svg rename to linux/trayapps/appindicator/icons/kinto.svg diff --git a/xkeysnail-config/trayapps/appindicator/kintotray.desktop b/linux/trayapps/appindicator/kintotray.desktop similarity index 100% rename from xkeysnail-config/trayapps/appindicator/kintotray.desktop rename to linux/trayapps/appindicator/kintotray.desktop diff --git a/xkeysnail-config/trayapps/appindicator/kintotray.py b/linux/trayapps/appindicator/kintotray.py old mode 100755 new mode 100644 similarity index 100% rename from xkeysnail-config/trayapps/appindicator/kintotray.py rename to linux/trayapps/appindicator/kintotray.py diff --git a/xkeysnail-config/vscode_keybindings.json b/linux/vscode_keybindings.json similarity index 100% rename from xkeysnail-config/vscode_keybindings.json rename to linux/vscode_keybindings.json diff --git a/xkeysnail-config/xkeysnail.desktop b/linux/xkeysnail.desktop similarity index 100% rename from xkeysnail-config/xkeysnail.desktop rename to linux/xkeysnail.desktop diff --git a/xkeysnail-config/xkeysnail.service b/linux/xkeysnail.service similarity index 100% rename from xkeysnail-config/xkeysnail.service rename to linux/xkeysnail.service diff --git a/xkeysnail-config/xkeystart.sh b/linux/xkeystart.sh similarity index 100% rename from xkeysnail-config/xkeystart.sh rename to linux/xkeystart.sh diff --git a/setup.py b/setup.py index 38630390..fd954ef3 100755 --- a/setup.py +++ b/setup.py @@ -113,7 +113,7 @@ def cmdline(command): sys.exit() distro = cmdline("awk -F= '$1==\"NAME\" { print $2 ;}' /etc/os-release").replace('"','').strip().split(" ")[0] -dename = cmdline("./system-config/dename.sh").replace('"','').strip().split(" ")[0].lower() +dename = cmdline("./linux/system-config/dename.sh").replace('"','').strip().split(" ")[0].lower() run_pkg = "" diff --git a/windows/kinto.ahk b/windows/kinto.ahk index b779486d..2c7648fe 100644 --- a/windows/kinto.ahk +++ b/windows/kinto.ahk @@ -270,6 +270,13 @@ GroupAdd, intellij, ahk_exe idea64.exe ; $LWin up::Send {LWin up}{LAlt up}{LCtrl up} ; MacModifiers ; $LAlt up::Send {LWin up}{CapsLock up}{LAlt up}{LCtrl up} ; CB/IBM + ; Remap Alt+Esc to Break/Pause + !Esc::SendInput, {Pause} + + ; Go up or down a page + $!Down::Send {PgDn}; + $!Up::Send {PgUp}; + ; Close Apps ^q::Send !{F4} @@ -478,12 +485,19 @@ GroupAdd, intellij, ahk_exe idea64.exe !+g::send ^+{G} ; View source control ; $#c::Send {Ctrl down}c{Ctrl up} ; Default - Sigints interrupt ; $!c::Send {Ctrl down}c{Ctrl up} ; CB/IBM + ; $#x::Send {Ctrl down}x{Ctrl up} ; Default - Sigints interrupt + ; $!x::Send {Ctrl down}x{Ctrl up} ; CB/IBM ; #Space::Send ^{Space} ; Default - Basic code completion ; !Space::Send ^{Space} ; CB/IBM - Basic code completion #If #IfWinActive ahk_exe sublime_text.exe + ; #x::Send ^{x} ; Default - Terminal - Ctrl-x + ; #c::Send ^{c} ; Default - Terminal - Ctrl-c sigint + ; !x::Send ^{x} ; CB/IBM + ; !c::Send ^{c} ; CB/IBM + ; #c::send ^{Pause} ; cancel_build ; #Space::Send ^{Space} ; Default - Basic code completion ; !Space::Send ^{Space} ; CB/IBM - Basic code completion #^Up::send !{O} ; Switch file @@ -524,7 +538,6 @@ GroupAdd, intellij, ahk_exe idea64.exe ^+Down::Return ; cancel swap_line_down #!Down::send ^+{Down} ; swap_line_down ^Pause::Return ; cancel cancel_build - #c::send ^{Pause} ; cancel_build F9::Return ; cancel sort_lines case_s false F5::send {F9} ; sort_lines case_s false #F9::Return ; cancel sort_lines case_s true diff --git a/windows/macbook_winctrl_capsesc_swap.reg b/windows/unused/macbook_winctrl_capsesc_swap.reg similarity index 100% rename from windows/macbook_winctrl_capsesc_swap.reg rename to windows/unused/macbook_winctrl_capsesc_swap.reg diff --git a/windows/macbook_winctrl_swap.reg b/windows/unused/macbook_winctrl_swap.reg similarity index 100% rename from windows/macbook_winctrl_swap.reg rename to windows/unused/macbook_winctrl_swap.reg diff --git a/windows/macbook_winctrl_swap.skl b/windows/unused/macbook_winctrl_swap.skl old mode 100755 new mode 100644 similarity index 100% rename from windows/macbook_winctrl_swap.skl rename to windows/unused/macbook_winctrl_swap.skl diff --git a/windows/remove_keyswap.reg b/windows/unused/remove_keyswap.reg similarity index 100% rename from windows/remove_keyswap.reg rename to windows/unused/remove_keyswap.reg diff --git a/windows/standard_ctrlalt_capsesc_swap.reg b/windows/unused/standard_ctrlalt_capsesc_swap.reg similarity index 100% rename from windows/standard_ctrlalt_capsesc_swap.reg rename to windows/unused/standard_ctrlalt_capsesc_swap.reg diff --git a/windows/standard_ctrlalt_swap.reg b/windows/unused/standard_ctrlalt_swap.reg similarity index 100% rename from windows/standard_ctrlalt_swap.reg rename to windows/unused/standard_ctrlalt_swap.reg diff --git a/windows/theme_campbell.reg b/windows/unused/theme_campbell.reg similarity index 100% rename from windows/theme_campbell.reg rename to windows/unused/theme_campbell.reg diff --git a/windows/theme_legacy.reg b/windows/unused/theme_legacy.reg similarity index 100% rename from windows/theme_legacy.reg rename to windows/unused/theme_legacy.reg diff --git a/windows/theme_onehalfdark.reg b/windows/unused/theme_onehalfdark.reg similarity index 100% rename from windows/theme_onehalfdark.reg rename to windows/unused/theme_onehalfdark.reg diff --git a/windows/theme_onehalflight.reg b/windows/unused/theme_onehalflight.reg similarity index 100% rename from windows/theme_onehalflight.reg rename to windows/unused/theme_onehalflight.reg diff --git a/xkeysnail_service.sh b/xkeysnail_service.sh index d1e95cf3..e714d7b9 100755 --- a/xkeysnail_service.sh +++ b/xkeysnail_service.sh @@ -6,7 +6,7 @@ typeset -l distro distro=$(awk -F= '$1=="NAME" { gsub("[\",!,_, ]","",$2);print $2 ;}' /etc/os-release) typeset -l dename -dename=$(./system-config/dename.sh | cut -d " " -f1) +dename=$(./linux/system-config/dename.sh | cut -d " " -f1) function uninstall { @@ -123,14 +123,14 @@ function budgieUpdate { if [ "$yn" == "y" ]; then budgieVersion="$(/usr/bin/budgie-desktop --version | awk '{ print $2; }' | head -n1)" if [ "$budgieVersion" == "10.5.1" ]; then - if ! [ -f ./system-config/budgie-daemon_10.5.1 ]; then - wget https://github.com/rbreaves/budgie-desktop/blob/binaries/binaries/budgie-daemon_10.5.1?raw=true -O ./system-config/budgie-daemon_10.5.1 + if ! [ -f ./linux/system-config/budgie-daemon_10.5.1 ]; then + wget https://github.com/rbreaves/budgie-desktop/blob/binaries/binaries/budgie-daemon_10.5.1?raw=true -O ./linux/system-config/budgie-daemon_10.5.1 fi bdmd5=$(md5sum /usr/bin/budgie-daemon | awk '{ print $1 }') - newbdmd5=$(md5sum ./system-config/budgie-daemon_10.5.1 | awk '{ print $1 }') + newbdmd5=$(md5sum ./linux/system-config/budgie-daemon_10.5.1 | awk '{ print $1 }') if [ "$bdmd5" != "$newbdmd5" ]; then cp /usr/bin/budgie-daemon ./budgie-daemon_"$budgieVersion".bak - sudo pkill budgie-daemon && sudo cp ./system-config/budgie-daemon_10.5.1 /usr/bin/budgie-daemon + sudo pkill budgie-daemon && sudo cp ./linux/system-config/budgie-daemon_10.5.1 /usr/bin/budgie-daemon echo "Updated Budgie to use App Switching Patch" else echo "Budgie-daemon already patched, skipping replacement." @@ -146,11 +146,11 @@ function budgieUpdate { esac done if [ "$yn" == "y" ]; then - if ! [ -f ./system-config/budgie-daemon_10.5.1 ]; then - wget https://github.com/rbreaves/budgie-desktop/raw/43d3b44243b0bcaee3262a79818024a651475b58/binaries/budgie-daemon_10.5.1 -O ./system-config/budgie-daemon_10.5.1 + if ! [ -f ./linux/system-config/budgie-daemon_10.5.1 ]; then + wget https://github.com/rbreaves/budgie-desktop/raw/43d3b44243b0bcaee3262a79818024a651475b58/binaries/budgie-daemon_10.5.1 -O ./linux/system-config/budgie-daemon_10.5.1 fi cp /usr/bin/budgie-daemon ./budgie-daemon_"$budgieVersion".bak - sudo pkill budgie-daemon && sudo cp ./system-config/budgie-daemon_10.5.1 /usr/bin/budgie-daemon + sudo pkill budgie-daemon && sudo cp ./linux/system-config/budgie-daemon_10.5.1 /usr/bin/budgie-daemon echo "Updated Budgie to use App Switching Patch" fi fi @@ -243,15 +243,15 @@ fi if ! [ -x "$(command -v xhost)" ] || ! [ -x "$(command -v gcc)" ]; then if [ "$distro" == "manjarolinux" ]; then - sudo ./system-config/unipkg.sh "xorg-xhost gcc" + sudo ./linux/system-config/unipkg.sh "xorg-xhost gcc" fi fi if [[ $dename == "kde" ]]; then if [[ $distro == "manjarolinux" ]]; then - sudo ./system-config/unipkg.sh vte3 + sudo ./linux/system-config/unipkg.sh vte3 else - sudo ./system-config/unipkg.sh libvte-2.91-dev + sudo ./linux/system-config/unipkg.sh libvte-2.91-dev fi fi if [[ $distro == 'kdeneon' ]]; then @@ -324,11 +324,11 @@ expsh=" " # sudo systemctl enable xkeysnail >/dev/null 2>&1 # if ! [ -x "$(command -v inotifywait)" ]; then # echo "Will need to install inotify-tools to restart key remapper live for config file changes..." -# sudo ./system-config/unipkg.sh inotify-tools +# sudo ./linux/system-config/unipkg.sh inotify-tools # fi if ! [ -x "$(command -v pip3)" ]; then echo "Will need to install python3-pip..." - sudo ./system-config/unipkg.sh python3-pip + sudo ./linux/system-config/unipkg.sh python3-pip fi if ! [ -x "$(command -v python3-config)" ]; then if [ "$distro" == "ubuntu" ] || [ "$distro" == "debian" ] || [ "$distro" == 'linuxmint' ]; then @@ -338,15 +338,15 @@ if ! [ -x "$(command -v python3-config)" ]; then fi if [ "$distro" == "gnome" ] || [ "$distro" == "fedora" ] || [ "$distro" == "debian" ] || [ "$distro" == 'linuxmint' ]; then echo "Will need to install $pydev..." - sudo ./system-config/unipkg.sh "$pydev" + sudo ./linux/system-config/unipkg.sh "$pydev" fi fi # if [ "$distro" == "ubuntu" ] && [ "$dename" == "gnome" ];then -# sudo ./system-config/unipkg.sh gnome-tweaks gnome-shell-extension-appindicator gir1.2-appindicator3-0.1 +# sudo ./linux/system-config/unipkg.sh gnome-tweaks gnome-shell-extension-appindicator gir1.2-appindicator3-0.1 # fi if ! [ -x "$(command -v xhost)" ] || ! [ -x "$(command -v gcc)" ]; then if [ "$distro" == "\"manjaro linux\"" ]; then - sudo ./system-config/unipkg.sh "xorg-xhost gcc" + sudo ./linux/system-config/unipkg.sh "xorg-xhost gcc" fi fi if [ "$distro" == 'linuxmint' ]; then @@ -363,103 +363,103 @@ mkdir -p ~/.config/kinto # KDE startup - xhost fix mkdir -p ~/.config/autostart -yes | cp -rf ./xkeysnail-config/xkeysnail.desktop ~/.config/kinto/xkeysnail.desktop +yes | cp -rf ./linux/xkeysnail.desktop ~/.config/kinto/xkeysnail.desktop -# yes | cp -rf ./xkeysnail-config/xkeystart.sh ~/.config/kinto/xkeystart.sh +# yes | cp -rf ./linux/xkeystart.sh ~/.config/kinto/xkeystart.sh # *** More testing needing, universal way of killing kinto on user log out? *** -# yes | sudo cp -rf xkeysnail-config/root_logoff.sh /usr/local/bin/logoff.sh +# yes | sudo cp -rf linux/root_logoff.sh /usr/local/bin/logoff.sh # sudo chown root:root /usr/local/bin/logoff.sh # sudo chmod u+rwx /usr/local/bin/logoff.sh # sudo chmod go-w+rx /usr/local/bin/logoff.sh # *** End universal killing of kinto # logoff fix - not solid for every os. Prevents missed 1 character input on login -# yes | sudo cp -rf xkeysnail-config/gnome_logoff.sh ~/.config/kinto/logoff.sh +# yes | sudo cp -rf linux/gnome_logoff.sh ~/.config/kinto/logoff.sh echo "$(git describe --tag --abbrev=0 | head -n 1)" "build" "$(git rev-parse --short HEAD)" > ~/.config/kinto/version -yes | cp -rf ./xkeysnail-config/kinto.py ./xkeysnail-config/kinto.py.new -yes | cp -rf ./xkeysnail-config/limitedadmins ./xkeysnail-config/limitedadmins.new -yes | cp -rf ./xkeysnail-config/gui/ ~/.config/kinto/ -yes | cp -nrf ./xkeysnail-config/initkb ~/.config/kinto/initkb -yes | cp -rf ./xkeysnail-config/killdups.sh ~/.config/kinto/killdups.sh -yes | cp -rf ./xkeysnail-config/trayapps/appindicator/kintotray.py ~/.config/kinto/kintotray.py -yes | cp -rf ./xkeysnail-config/trayapps/appindicator/kintotray.desktop ~/.config/kinto/kintotray.desktop -yes | cp -rf ./xkeysnail-config/gui/kinto.desktop ./xkeysnail-config/gui/kinto.desktop.new -yes | cp -rf ./xkeysnail-config/trayapps/appindicator/icons/kinto-color-16.svg ~/.config/kinto/kinto-color.svg -yes | cp -rf ./xkeysnail-config/trayapps/appindicator/icons/kinto-color-16.svg ~/.config/kinto/kinto-color-48.svg -yes | cp -rf ./xkeysnail-config/trayapps/appindicator/icons/kinto-invert-16.svg ~/.config/kinto/kinto-invert.svg -yes | cp -rf ./xkeysnail-config/trayapps/appindicator/icons/kinto-solid-16.svg ~/.config/kinto/kinto-solid.svg -yes | cp -rf ./xkeysnail-config/trayapps/appindicator/icons/kinto.svg ~/.config/kinto/kinto.svg -# yes | cp -rf ./system-config/caret_status_xkey.sh ~/.config/kinto/caret_status_xkey.sh -yes | cp -rf ./xkeysnail-config/xkeysnail.service ./xkeysnail-config/xkeysnail.service.new -# yes | cp -rf ./xkeysnail-config/xkeysnail.timer ~/.config/systemd/user/xkeysnail.timer -sed -i "s#{experimental-caret}#$exp#g" ./xkeysnail-config/xkeysnail.service.new +yes | cp -rf ./linux/kinto.py ./linux/kinto.py.new +yes | cp -rf ./linux/limitedadmins ./linux/limitedadmins.new +yes | cp -rf ./linux/gui/ ~/.config/kinto/ +yes | cp -nrf ./linux/initkb ~/.config/kinto/initkb +yes | cp -rf ./linux/killdups.sh ~/.config/kinto/killdups.sh +yes | cp -rf ./linux/trayapps/appindicator/kintotray.py ~/.config/kinto/kintotray.py +yes | cp -rf ./linux/trayapps/appindicator/kintotray.desktop ~/.config/kinto/kintotray.desktop +yes | cp -rf ./linux/gui/kinto.desktop ./linux/gui/kinto.desktop.new +yes | cp -rf ./linux/trayapps/appindicator/icons/kinto-color-16.svg ~/.config/kinto/kinto-color.svg +yes | cp -rf ./linux/trayapps/appindicator/icons/kinto-color-16.svg ~/.config/kinto/kinto-color-48.svg +yes | cp -rf ./linux/trayapps/appindicator/icons/kinto-invert-16.svg ~/.config/kinto/kinto-invert.svg +yes | cp -rf ./linux/trayapps/appindicator/icons/kinto-solid-16.svg ~/.config/kinto/kinto-solid.svg +yes | cp -rf ./linux/trayapps/appindicator/icons/kinto.svg ~/.config/kinto/kinto.svg +# yes | cp -rf ./linux/system-config/caret_status_xkey.sh ~/.config/kinto/caret_status_xkey.sh +yes | cp -rf ./linux/xkeysnail.service ./linux/xkeysnail.service.new +# yes | cp -rf ./linux/xkeysnail.timer ~/.config/systemd/user/xkeysnail.timer +sed -i "s#{experimental-caret}#$exp#g" ./linux/xkeysnail.service.new if [ "$expsh" != " " ];then - sed -i "s#{kill-caret}#/usr/bin/pkill -f $expsh#g" ./xkeysnail-config/xkeysnail.service.new + sed -i "s#{kill-caret}#/usr/bin/pkill -f $expsh#g" ./linux/xkeysnail.service.new else - sed -i "s#{kill-caret}#$expsh#g" ./xkeysnail-config/xkeysnail.service.new + sed -i "s#{kill-caret}#$expsh#g" ./linux/xkeysnail.service.new fi -sed -i "s/{username}/`whoami`/g" ./xkeysnail-config/xkeysnail.service.new -sed -i "s#{homedir}#`echo "$HOME"`#g" ./xkeysnail-config/xkeysnail.service.new +sed -i "s/{username}/`whoami`/g" ./linux/xkeysnail.service.new +sed -i "s#{homedir}#`echo "$HOME"`#g" ./linux/xkeysnail.service.new sed -i "s#{homedir}#`echo "$HOME"`#g" ~/.config/kinto/kintotray.desktop 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/{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#{homedir}#`echo "$HOME"`#g" ./linux/gui/kinto.desktop.new +sudo mv ./linux/gui/kinto.desktop.new /usr/share/applications/kinto.desktop +sed -i "s#{xhost}#`\\which xhost`#g" ./linux/xkeysnail.service.new +sed -i "s/{username}/`whoami`/g" ./linux/limitedadmins.new +sed -i "s#{systemctl}#`\\which systemctl`#g" ./linux/limitedadmins.new +sed -i "s#{pkill}#`\\which pkill`#g" ./linux/limitedadmins.new sed -i "s#{systemctl}#`\\which systemctl`#g" ~/.config/kinto/xkeysnail.desktop sed -i "s#{xhost}#`\\which xhost`#g" ~/.config/kinto/xkeysnail.desktop sed -i "s#{homedir}#`echo "$HOME"`#g" ~/.config/kinto/xkeysnail.desktop # sed -i "s#{homedir}#`echo "$HOME"`#g" ~/.config/kinto/prexk.sh -sed -i "s/{displayid}/`echo "$DISPLAY"`/g" ./xkeysnail-config/xkeysnail.service.new +sed -i "s/{displayid}/`echo "$DISPLAY"`/g" ./linux/xkeysnail.service.new # sed -i "s/{displayid}/`echo "$DISPLAY"`/g" ~/.config/kinto/prexk.sh if [[ $dename == "budgie" ]]; then - perl -pi -e "s/\s{4}(# )(K.*)(# Default SL - Change workspace.*budgie.*)/ \$2\$3/g" ./xkeysnail-config/kinto.py.new >/dev/null 2>&1 + perl -pi -e "s/\s{4}(# )(K.*)(# Default SL - Change workspace.*budgie.*)/ \$2\$3/g" ./linux/kinto.py.new >/dev/null 2>&1 fi if [[ $distro == "popos" ]]; then - perl -pi -e "\s{4}(# )(K.*)(# SL - .*popos.*)/ \$2\$3/g" ./xkeysnail-config/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 if [[ $distro == "fedora" ]]; then - perl -pi -e "\s{4}(# )(K.*)(# SL - .*fedora.*)/ \$2\$3/g" ./xkeysnail-config/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 fi if [[ $distro == "elementaryos" ]]; then - perl -pi -e "\s{4}(# )(K.*)(# SL - .*eos.*)/ \$2\$3/g" ./xkeysnail-config/kinto.py.new >/dev/null 2>&1 + perl -pi -e "\s{4}(# )(K.*)(# SL - .*eos.*)/ \$2\$3/g" ./linux/kinto.py.new >/dev/null 2>&1 fi if [[ "$distro" == "manjaro"* ]]; then - perl -pi -e "\s{4}(# )(K.*)(# SL - .*manjaro.*)/ \$2\$3/g" ./xkeysnail-config/kinto.py.new >/dev/null 2>&1 + perl -pi -e "\s{4}(# )(K.*)(# SL - .*manjaro.*)/ \$2\$3/g" ./linux/kinto.py.new >/dev/null 2>&1 fi if [[ $dename == "gnome" ]]; then - perl -pi -e "\s{4}(# )(K.*)(# SL - .*ubuntu.*)/ \$2\$3/g" ./xkeysnail-config/kinto.py.new >/dev/null 2>&1 + perl -pi -e "\s{4}(# )(K.*)(# SL - .*ubuntu.*)/ \$2\$3/g" ./linux/kinto.py.new >/dev/null 2>&1 fi if [[ $dename == "kde" ]]; then echo "Applying Cmd-Space to open App Launcher for KDE..." - perl -pi -e "s/(# )(.*)(#.*kde)/\$2\$3/g" ./xkeysnail-config/kinto.py.new >/dev/null 2>&1 + perl -pi -e "s/(# )(.*)(#.*kde)/\$2\$3/g" ./linux/kinto.py.new >/dev/null 2>&1 fi if [[ $dename == "xfce" ]]; then - perl -pi -e "\s{4}(# )(K.*)(# SL - .*xfce.*)/ \$2\$3/g" ./xkeysnail-config/kinto.py.new >/dev/null 2>&1 - perl -pi -e "s/(# )(.*)(# xfce4)/\$2\$3/g" ./xkeysnail-config/kinto.py.new - perl -pi -e "s/(\w.*)(# Default not-xfce4)/# \$1\$2/g" ./xkeysnail-config/kinto.py.new + perl -pi -e "\s{4}(# )(K.*)(# SL - .*xfce.*)/ \$2\$3/g" ./linux/kinto.py.new >/dev/null 2>&1 + perl -pi -e "s/(# )(.*)(# xfce4)/\$2\$3/g" ./linux/kinto.py.new + perl -pi -e "s/(\w.*)(# Default not-xfce4)/# \$1\$2/g" ./linux/kinto.py.new fi if [[ $dename == "xfce" ]] && ls /etc/apt/sources.list.d/enso* 1> /dev/null 2>&1; then echo "enso OS detected, applying Cmd-Space for Launchy..." - perl -pi -e "s/(K\(\"RC-Space)(.*)(# )(xfce4)/\$3\$1\$2\$3\$4/g" ./xkeysnail-config/kinto.py.new >/dev/null 2>&1 + perl -pi -e "s/(K\(\"RC-Space)(.*)(# )(xfce4)/\$3\$1\$2\$3\$4/g" ./linux/kinto.py.new >/dev/null 2>&1 xfconf-query --channel xfce4-keyboard-shortcuts --property "/commands/custom/space" --create --type string --set "launchy" fi if ! [[ $1 == "5" || $1 == "uninstall" || $1 == "Uninstall" ]]; then - mv ./xkeysnail-config/kinto.py.new ~/.config/kinto/kinto.py + mv ./linux/kinto.py.new ~/.config/kinto/kinto.py # if [ "$distro" == "fedora" ];then sudo rm /etc/systemd/system/xkeysnail.service >/dev/null 2>&1 if [ -d /usr/lib/systemd/system ];then @@ -490,12 +490,12 @@ if ! [[ $1 == "5" || $1 == "uninstall" || $1 == "Uninstall" ]]; then echo -e "Run 'sudo pip3 install --upgrade .' to debug issue" exit 0 fi - 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 + sed -i "s#{xkeysnail}#`which xkeysnail`#g" ./linux/xkeysnail.service.new + sed -i "s#{xkeysnail}#`which xkeysnail`#g" ./linux/limitedadmins.new + sudo mv ./linux/xkeysnail.service.new "$xkeypath"xkeysnail.service && echo "Service file added to "$xkeypath"xkeysnail.service" + sudo chown root:root ./linux/limitedadmins.new # Add a check here for xkeysnail path resolving - sudo mv ./xkeysnail-config/limitedadmins.new /etc/sudoers.d/limitedadmins + sudo mv ./linux/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..."