Compare commits
2 Commits
feature/Br
...
hellosyste
Author | SHA1 | Date | |
---|---|---|---|
![]() |
b37a6000ee | ||
![]() |
52d2cac4f7 |
61
README.md
@@ -5,24 +5,25 @@
|
||||
|
||||
[](https://github.com/rbreaves/kinto/releases/latest)
|
||||
|
||||
\- Linux & Windows with Mac-style shortcut keys. \-
|
||||
\- Type in Linux & Windows like it's a Mac. \-
|
||||
|
||||
Seamless copy and paste with all apps and terminals. The zero effort solution.
|
||||
|
||||
v1.2 Release - Kinto now includes a system tray and simple wizard to setup the install with minimal effort.
|
||||
|
||||
Kinto is powered by [xkeysnail](https://github.com/mooz/xkeysnail) for Linux & by [Autohotkey](https://github.com/Lexikos/AutoHotkey_L) for Windows 10.
|
||||
|
||||
### [Table of Contents ](#Table-of-Contents)
|
||||
|
||||
## Donations
|
||||
|
||||
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)|
|
||||
|---|---|---|---|
|
||||
[Amazon wishlist](https://smile.amazon.com/hz/wishlist/ls/3EVXR21VFKD9Z?ref_=wl_share)
|
||||
|
||||
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.
|
||||
[Adafruit Wishlist](https://www.adafruit.com/wishlists/515932)
|
||||
|
||||
[eBay Wishlist](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 will accept shipments (of keyboards in particular) as well.
|
||||
|
||||
## How to install (Linux)
|
||||
|
||||
@@ -50,24 +51,20 @@ sudo apt install python3
|
||||
./setup.py
|
||||
```
|
||||
|
||||
**Troubleshoot**
|
||||
Troubleshoot
|
||||
|
||||
If the wizard does not appear then either type in "kinto.sh" in your application overview search bar or run this following command.
|
||||
```
|
||||
~/.config/kinto/gui/kinto-gui.py
|
||||
```
|
||||
|
||||
**Issues with Numpad?**
|
||||
|
||||
Try toggling numlock on & off (clear key on official mac keyboards). If it still does not work then restart the Kinto service and try toggling the numlock/clear key again, it will likely work after that. #369
|
||||
|
||||
**Uninstall Kinto**
|
||||
To Uninstall Kinto
|
||||
|
||||
```
|
||||
./setup.py -r
|
||||
```
|
||||
|
||||
**Other tips**
|
||||
Other tips
|
||||
|
||||
If you want a global menu app similar to what mac users have then I strongly recommend Ubuntu Budgie as it has the Vala Appmenu built in and ready for activation. Short of that Vala-AppMenu can be installed in various distros, mileage will vary. If you try to activate it in the latest 20.xx releases with XFCE then you may need to run the following commands.
|
||||
|
||||
@@ -100,27 +97,25 @@ py setup.py
|
||||
<img src="https://user-images.githubusercontent.com/10969616/85195079-30fd4f80-b295-11ea-8bcd-257990b77dcb.png" width="50%" height="50%">
|
||||
<img src="https://user-images.githubusercontent.com/10969616/85195082-322e7c80-b295-11ea-8c81-320dab424c3c.png" width="50%" height="50%">
|
||||
|
||||
**Uninstall Kinto**
|
||||
To Uninstall Kinto - Select Uninstall
|
||||
|
||||
```
|
||||
py setup.py
|
||||
```
|
||||
|
||||
Select Uninstall
|
||||
|
||||
## How to use in Remote Desktop Solutions
|
||||
|
||||
Currently this may be limited to Windows RDP Clients and Servers on both ends, but in theory any remote desktop solution that properly handles the Windows key should work is what I am finding. The latest version of Kinto may need to be suspended via the system tray on the computer running the Client software of the Remote Desktop solution you are using - or you can add it to the "virtm" group of the Kinto.ahk script for Windows 10. On the linux side a 3rd, but similar "define_conditional_modmap" terminals like group may need to be added to align with virtm.
|
||||
|
||||
Note: virtm is just a shortname for virtual machine and remote desktop exceptions - so that remapping can happen within their OS & not on your host machine - if it can be avoided.
|
||||
|
||||
|Program|Host OS|Client OS|Works? |Notes|
|
||||
|---|---|---|---|---|
|
||||
|mstsc.exe (rdp)| Windows | Windows | Yes| |
|
||||
|Official MS RDP| macOS | Windows | No|Use Windows in VM & RDP from it|
|
||||
|FreeRDP| macOS | Windows | No|Use Windows in VM & RDP from it|
|
||||
|FreeRDP| Linux | Windows | No|Use Windows in VM & RDP from it|
|
||||
|Official MS RDP| iOS/Android | Windows | No|No workaround atm|
|
||||
Scenarios confirmed working?
|
||||
Windows RDP Client -> Windows Computer
|
||||
|
||||
Scenarios that don't appear to work?
|
||||
Microsoft RDP Client on a Mac -> Windows Computer
|
||||
FreeRDP based client on a Mac -> Windows Computer
|
||||
Android/iOS RDP Client -> Windows Computer
|
||||
|
||||
## Table of Contents
|
||||
|
||||
@@ -385,23 +380,10 @@ I'd appreciate any help from people with non-US based keyboards, to help ensure
|
||||
|
||||
Yet another keyboard remapping tool for X environment
|
||||
|
||||
[Interception](https://gitlab.com/interception/linux/tools)
|
||||
|
||||
Another low level key remapper, not as easily configurable as Xkeysnail, but does not rely on X11.
|
||||
|
||||
[Wincent](https://github.com/wincent/wincent) by Greg Hurrell
|
||||
|
||||
Dot files and configurations that may help those that want mac-style shortcut keys that work under Wayland, or w/o x11.
|
||||
[Vim #102: macOS keyboard bindings on Linux](https://www.youtube.com/watch?v=TBqTHesnzkI)
|
||||
|
||||
[mac-precision-touchpad](https://github.com/imbushuo/mac-precision-touchpad) by imbushuo
|
||||
|
||||
Windows 10 touchpad to precision touchpad driver
|
||||
|
||||
[macOS-cursors-for-Windows](https://github.com/antiden/macOS-cursors-for-Windows) by antiden
|
||||
|
||||
macOS cursors for Windows
|
||||
|
||||
[fusuma](https://github.com/iberianpig/fusuma) by iberianpig
|
||||
|
||||
Multitouch gestures with libinput driver on Linux
|
||||
@@ -410,11 +392,10 @@ Multitouch gestures with libinput driver on Linux
|
||||
|
||||
Linux driver for Facetime HD on macbooks
|
||||
|
||||
[Windows Terminal Preview](https://aka.ms/terminal-preview) by Microsoft
|
||||
[Fluent Terminal - Windows only](https://github.com/felixse/FluentTerminal) by felixse
|
||||
|
||||
The best Terminal app built for Windows hands down. I have tried countless, but this one actually seems to get everything right, despite the lack of a GUI to configure all aspects of the program. Custom configurations have to be done via a json file - but given the performance and feature set I feel like it is the a decent trade off.
|
||||
|
||||
I will update Kinto to have custom configurations for this specific Terminal in the future. Will make seamless copy & paste, which already works, work even better (Cmd-C can still trigger sigint - but there is a fix for that that involves updating the json config).
|
||||
A Terminal Emulator based on UWP and web technologies.
|
||||
|
||||
[PowerToys - Windows only](https://github.com/microsoft/PowerToys) by microsoft
|
||||
|
||||
@@ -464,7 +445,7 @@ Dark & Light Theme w/ OSX controls for Elementary OS
|
||||
|
||||
Auto-detect the connected display hardware and load the appropriate X11 setup using xrandr
|
||||
|
||||
[Barrier](https://github.com/debauchee/barrier) by debauchee (Note: Does not appear to work with Kinto v1.2+, may work w/ Kinto v1.1?)
|
||||
[Barrier](https://github.com/debauchee/barrier) by debauchee
|
||||
|
||||
Open-source KVM software
|
||||
|
||||
|
@@ -1,11 +0,0 @@
|
||||
"~/.config/kinto/browsers.sh Left"
|
||||
m:0x8 + c:192
|
||||
Alt + XF86Launch5
|
||||
|
||||
"~/.config/kinto/browsers.sh Right"
|
||||
m:0x8 + c:193
|
||||
Alt + XF86Launch6
|
||||
|
||||
"~/.config/kinto/browsers.sh Undo"
|
||||
m:0x8 + c:194
|
||||
Alt + XF86Launch7
|
@@ -1,75 +0,0 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
action=$1
|
||||
|
||||
saveClipboard=$(xclip -selection clipboard -o)
|
||||
echo "" | xclip -i -selection clipboard
|
||||
|
||||
if [ "$action" == "Left" ] || [ "$action" == "Undo" ];then
|
||||
xdotool getactivewindow key --delay 40 --clearmodifiers Shift+Home ctrl+c Home
|
||||
firstClipboard=$(xclip -selection clipboard -o)
|
||||
if [ "$firstClipboard" == "" ];then
|
||||
xdotool getactivewindow key --delay 40 --clearmodifiers Shift+Right ctrl+c Home
|
||||
firstClipboard=$(xclip -selection clipboard -o)
|
||||
if [ "$firstClipboard" == "" ];then
|
||||
xdotool getactivewindow key --delay 24 --clearmodifiers bar Shift+Left ctrl+x
|
||||
firstClipboard=$(xclip -selection clipboard -o)
|
||||
fi
|
||||
fi
|
||||
echo "" | xclip -i -selection clipboard
|
||||
xdotool getactivewindow key --clearmodifiers Shift+Right ctrl+c Home
|
||||
if [ "${firstClipboard:0:1}" == "$(xclip -selection clipboard -o)" ];then
|
||||
echo "" | xclip -i -selection clipboard
|
||||
fi
|
||||
|
||||
fi
|
||||
|
||||
if [ "$action" == "Right" ];then
|
||||
xdotool getactivewindow key --delay 40 --clearmodifiers Shift+End ctrl+c
|
||||
firstClipboard=$(xclip -selection clipboard -o | tr -d /)
|
||||
if [ "$firstClipboard" == "" ];then
|
||||
xdotool getactivewindow key --delay 40 --clearmodifiers Left Shift+Right ctrl+c
|
||||
firstClipboard=$(xclip -selection clipboard -o | tr -d /)
|
||||
if [ "$firstClipboard" == "" ];then
|
||||
xdotool getactivewindow key --delay 24 --clearmodifiers bar Shift+Left ctrl+x
|
||||
firstClipboard=$(xclip -selection clipboard -o | tr -d /)
|
||||
fi
|
||||
fi
|
||||
if [ "$firstClipboard" != "" ];then
|
||||
xdotool getactivewindow key --clearmodifiers Right
|
||||
fi
|
||||
echo "" | xclip -i -selection clipboard
|
||||
xdotool getactivewindow key --clearmodifiers Shift+Left ctrl+c
|
||||
if [ "${firstClipboard: -1}" == "$(xclip -selection clipboard -o)" ];then
|
||||
echo "" | xclip -i -selection clipboard
|
||||
xdotool getactivewindow key --clearmodifiers Right
|
||||
fi
|
||||
fi
|
||||
|
||||
newClipboard=$(xclip -selection clipboard -o)
|
||||
|
||||
# echo ${#firstClipboard}
|
||||
# echo "$firstClipboard""-"
|
||||
# echo "first"
|
||||
# echo ${#newClipboard}
|
||||
# echo "$newClipboard""-"
|
||||
# echo "hello"
|
||||
|
||||
|
||||
if [ "$action" == "Left" ] && ([ "$firstClipboard" == "" ] || [ "$newClipboard" != "" ]);then
|
||||
xdotool getactivewindow key --clearmodifiers alt+Left
|
||||
fi
|
||||
|
||||
if [ "$action" == "Right" ] && ([ "$firstClipboard" == "" ] || [ "$newClipboard" != "" ]);then
|
||||
xdotool getactivewindow key --clearmodifiers alt+Right
|
||||
elif [ "$action" == "Right" ];then
|
||||
xdotool getactivewindow key --clearmodifiers End
|
||||
fi
|
||||
|
||||
if [ "$action" == "Undo" ] && ([ "$firstClipboard" != "" ] && [ "$newClipboard" == "" ]);then
|
||||
xdotool getactivewindow key --delay 24 --clearmodifiers ctrl+z
|
||||
elif [ "$action" == "Undo" ];then
|
||||
xdotool getactivewindow key ctrl+Shift+t
|
||||
fi
|
||||
|
||||
echo $saveClipboard | xclip -i -selection clipboard
|
2
setup.py
@@ -113,7 +113,7 @@ if len(check_x11) == 0:
|
||||
sys.exit()
|
||||
|
||||
distro = cmdline("awk -F= '$1==\"NAME\" { print $2 ;}' /etc/os-release").replace('"','').strip().split(" ")[0]
|
||||
dename = cmdline("./linux/system-config/dename.sh").replace('"','').strip().split(" ")[0].lower()
|
||||
dename = cmdline("./system-config/dename.sh").replace('"','').strip().split(" ")[0].lower()
|
||||
|
||||
run_pkg = ""
|
||||
|
||||
|
@@ -1,4 +1,36 @@
|
||||
#!/bin/bash
|
||||
#!/usr/bin/env bash
|
||||
|
||||
unamestr=$(uname)
|
||||
if [ "$unamestr" = 'FreeBSD' ]; then
|
||||
|
||||
DESKTOP="unknown"
|
||||
|
||||
ps -aux | grep -E '[s]tart-hello'
|
||||
if [ $? -ne 1 ];then
|
||||
echo "hellosystem"
|
||||
exit 0
|
||||
fi
|
||||
|
||||
ps -aux | grep -E '[o]penbox'
|
||||
if [ $? -ne 1 ];then
|
||||
echo "openbox"
|
||||
exit 0
|
||||
fi
|
||||
|
||||
ps -aux | grep -E '[m]ate-panel'
|
||||
if [ $? -ne 1 ];then
|
||||
echo "mate"
|
||||
exit 0
|
||||
fi
|
||||
|
||||
ps -aux | grep -E '[x]fce4-session'
|
||||
if [ $? -ne 1 ];then
|
||||
echo "xfce"
|
||||
exit 0
|
||||
fi
|
||||
|
||||
fi
|
||||
|
||||
|
||||
function detect_budgie()
|
||||
{
|
@@ -1,4 +1,4 @@
|
||||
#!/bin/bash
|
||||
#!/usr/bin/env bash
|
||||
|
||||
if pkgmgr="$( which apt-get )" 2> /dev/null; then
|
||||
echo "Debian"
|
@@ -263,10 +263,6 @@ GroupAdd, intellij, ahk_exe idea64.exe
|
||||
; Static
|
||||
$LCtrl up::Send {Ctrl down}{LWin up}{Ctrl up}
|
||||
|
||||
; Disable Win-Up/Down - interferes with Sublime text 3 multi-cursors
|
||||
#Down::return
|
||||
#Up::return
|
||||
|
||||
; temporary hack to ensure keys don't get stuck
|
||||
; impacts Alt-Tab fix
|
||||
; Primary
|
||||
@@ -274,24 +270,6 @@ 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
|
||||
|
||||
!Enter::
|
||||
{
|
||||
if (GetKeyState("RAlt", "P")) {
|
||||
Send {Insert}
|
||||
}
|
||||
else{
|
||||
Send {Alt down}{Enter}{Alt up}
|
||||
}
|
||||
Return
|
||||
}
|
||||
|
||||
; 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}
|
||||
|
||||
@@ -343,29 +321,9 @@ GroupAdd, intellij, ahk_exe idea64.exe
|
||||
^+4::Send #+{S}
|
||||
|
||||
; wordwise support
|
||||
#if !winactive("ahk_group browsers")
|
||||
$^Left::Send {Home}
|
||||
$^Right::Send {End}
|
||||
#if
|
||||
#if winactive("ahk_group browsers")
|
||||
$^Left::
|
||||
if(blinking()){
|
||||
Send, {Home}
|
||||
}
|
||||
else{
|
||||
Send, !{Left}
|
||||
}
|
||||
Return
|
||||
$^Right::
|
||||
if(blinking()){
|
||||
Send, {End}
|
||||
}
|
||||
else{
|
||||
Send, !{Right}
|
||||
}
|
||||
Return
|
||||
#if
|
||||
$^Left::Send {Home}
|
||||
$^+Left::Send +{Home}
|
||||
$^Right::Send {End}
|
||||
$^+Right::Send +{End}
|
||||
^Up::Send ^{Home}
|
||||
^+Up::Send ^+{Home}
|
||||
@@ -489,18 +447,9 @@ GroupAdd, intellij, ahk_exe idea64.exe
|
||||
; Dev Tools
|
||||
!^i::send {Ctrl Down}{Shift Down}i{Shift Up}{Ctrl Up}
|
||||
!^j::send {Ctrl Down}{Shift Down}j{Shift Up}{Ctrl Up}
|
||||
; Reopen closed tab or Undo text field
|
||||
$^z::
|
||||
if(blinking()){
|
||||
Send ^z
|
||||
}
|
||||
else{
|
||||
Send ^+t
|
||||
}
|
||||
Return
|
||||
; Open preferences
|
||||
#IfWinActive ahk_exe firefox.exe
|
||||
^,::send {Ctrl Down}t{Ctrl Up}about:preferences{Enter}
|
||||
^,::send, {Ctrl Down}t{Ctrl Up}about:preferences{Enter}
|
||||
#If
|
||||
#IfWinActive ahk_exe chrome.exe
|
||||
^,::send {Alt Down}e{Alt Up}s{Enter}
|
||||
@@ -529,19 +478,12 @@ 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
|
||||
@@ -582,6 +524,7 @@ 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
|
||||
@@ -788,22 +731,4 @@ Send {RWin up}
|
||||
Send {LWin up}
|
||||
Send {RShift up}
|
||||
Send {LShift up}
|
||||
return
|
||||
|
||||
blinking(){
|
||||
ClipSaved := ClipboardAll
|
||||
clipboard := ""
|
||||
status := False
|
||||
Send, {Left}{Left}{Right}
|
||||
Send, +{Right}
|
||||
Send, ^c
|
||||
Send, {Left}
|
||||
ClipWait, 0.2
|
||||
if(clipboard != "" ){
|
||||
status := True
|
||||
}
|
||||
Sleep, 100
|
||||
clipboard := ClipSaved
|
||||
ClipSaved := ""
|
||||
return status
|
||||
}
|
||||
return
|
0
windows/unused/macbook_winctrl_swap.skl → windows/macbook_winctrl_swap.skl
Normal file → Executable file
@@ -1,4 +1,4 @@
|
||||
#!/bin/bash
|
||||
#!/usr/bin/env bash
|
||||
dbus-monitor --session "type='signal',interface='org.gnome.SessionManager.Logout'" | grep '1' |
|
||||
while read x; do
|
||||
# echo "$x"
|
0
linux/gui/capslock_1200x720.png → xkeysnail-config/gui/capslock_1200x720.png
Normal file → Executable file
Before Width: | Height: | Size: 7.0 KiB After Width: | Height: | Size: 7.0 KiB |
0
linux/gui/keys_1200x720.png → xkeysnail-config/gui/keys_1200x720.png
Normal file → Executable file
Before Width: | Height: | Size: 8.4 KiB After Width: | Height: | Size: 8.4 KiB |
0
linux/gui/kinto.desktop → xkeysnail-config/gui/kinto.desktop
Executable file → Normal file
0
linux/gui/tuxbg.png → xkeysnail-config/gui/tuxbg.png
Normal file → Executable file
Before Width: | Height: | Size: 111 KiB After Width: | Height: | Size: 111 KiB |
0
linux/gui/tuxcry4.png → xkeysnail-config/gui/tuxcry4.png
Normal file → Executable file
Before Width: | Height: | Size: 65 KiB After Width: | Height: | Size: 65 KiB |
0
linux/gui/tuxerror.png → xkeysnail-config/gui/tuxerror.png
Normal file → Executable file
Before Width: | Height: | Size: 172 KiB After Width: | Height: | Size: 172 KiB |
0
linux/gui/tuxuninstall.png → xkeysnail-config/gui/tuxuninstall.png
Normal file → Executable file
Before Width: | Height: | Size: 94 KiB After Width: | Height: | Size: 94 KiB |
@@ -1,4 +1,4 @@
|
||||
#!/bin/bash
|
||||
#!/usr/bin/env bash
|
||||
|
||||
xkeycount=$(pgrep 'xkeysnail' | wc -l)
|
||||
|
37
linux/kinto.py → xkeysnail-config/kinto.py
Executable file → Normal file
@@ -107,7 +107,7 @@ define_conditional_modmap(re.compile(termStr, re.IGNORECASE), {
|
||||
})
|
||||
|
||||
# Keybindings for IntelliJ
|
||||
define_keymap(re.compile("^jetbrains-(?!.*toolbox).*$", re.IGNORECASE),{
|
||||
define_keymap(re.compile("jetbrains-idea", re.IGNORECASE),{
|
||||
# General
|
||||
K("C-Key_0"): K("M-Key_0"), # Open corresponding tool window
|
||||
K("C-Key_1"): K("M-Key_1"), # Open corresponding tool window
|
||||
@@ -209,18 +209,6 @@ define_keymap(re.compile(browserStr, re.IGNORECASE),{
|
||||
K("RC-Q"): K("RC-Q"), # Close all browsers Instances
|
||||
K("M-RC-I"): K("RC-Shift-I"), # Dev tools
|
||||
K("M-RC-J"): K("RC-Shift-J"), # Dev tools
|
||||
K("RC-Left"): K("M-F14"), # Back
|
||||
K("RC-Right"): K("M-F15"), # Forward
|
||||
K("RC-Z"): K("M-F16"), # Undo Text/Closed Tab
|
||||
K("RC-Key_1"): K("M-Key_1"), # Jump to Tab #1-#8
|
||||
K("RC-Key_2"): K("M-Key_2"),
|
||||
K("RC-Key_3"): K("M-Key_3"),
|
||||
K("RC-Key_4"): K("M-Key_4"),
|
||||
K("RC-Key_5"): K("M-Key_5"),
|
||||
K("RC-Key_6"): K("M-Key_6"),
|
||||
K("RC-Key_7"): K("M-Key_7"),
|
||||
K("RC-Key_8"): K("M-Key_8"),
|
||||
K("RC-Key_9"): K("M-Key_9"), # Jump to last tab
|
||||
})
|
||||
|
||||
# Open preferences in browsers
|
||||
@@ -244,7 +232,7 @@ define_keymap(None,{
|
||||
K("RC-Tab"): K("M-Tab"), # Default not-xfce4 - Cmd Tab - App Switching Default
|
||||
K("RC-Shift-Tab"): K("M-Shift-Tab"), # Default not-xfce4 - Cmd Tab - App Switching Default
|
||||
K("RC-Grave"): K("M-Grave"), # Default not-xfce4 - Cmd ` - Same App Switching
|
||||
K("RC-Shift-Grave"): K("M-Shift-Grave"), # Default not-xfce4 - Cmd ` - Same App Switching
|
||||
K("RC-Shift-Grave"): K("M-Grave"), # Default not-xfce4 - Cmd ` - Same App Switching
|
||||
# K("Super-Right"):K("Super-Page_Up"), # SL - Change workspace (ubuntu/fedora)
|
||||
# K("Super-Left"):K("Super-Page_Down"), # SL - Change workspace (ubuntu/fedora)
|
||||
# K("Super-Right"):K("Super-C-Up"), # SL - Change workspace (popos)
|
||||
@@ -270,9 +258,6 @@ define_keymap(None,{
|
||||
# K("M-Grave") : K("C-Shift-Tab"), # Chromebook/IBM - In-App Tab switching
|
||||
K("Super-Tab"): K("LC-Tab"), # Default not-chromebook
|
||||
K("Super-Shift-Tab"): K("LC-Shift-Tab"), # Default not-chromebook
|
||||
|
||||
# Fn to Alt style remaps
|
||||
K("RM-Enter"): K("insert"), # Insert
|
||||
|
||||
# emacs style
|
||||
K("Super-a"): K("Home"), # Beginning of Line
|
||||
@@ -356,10 +341,7 @@ define_keymap(re.compile(codeStr, re.IGNORECASE),{
|
||||
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"), # 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"): K("LC-c"), # Sigints - interrupt
|
||||
# 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
|
||||
@@ -370,10 +352,6 @@ define_keymap(re.compile(codeStr, re.IGNORECASE),{
|
||||
|
||||
# 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
|
||||
@@ -469,14 +447,9 @@ define_keymap(re.compile(termStr, re.IGNORECASE),{
|
||||
K("LC-Tab") : K("LC-PAGE_DOWN"),
|
||||
K("LC-Shift-Tab") : K("LC-PAGE_UP"),
|
||||
K("LC-Grave") : K("LC-PAGE_UP"),
|
||||
# K("M-Tab"): pass_through_key, # Default not-xfce4 - Cmd Tab - App Switching Default
|
||||
# K("RC-Tab"): K("M-Tab"), # Default not-xfce4 - Cmd Tab - App Switching Default
|
||||
# K("RC-Shift-Tab"): K("M-Shift-Tab"), # Default not-xfce4 - Cmd Tab - App Switching Default
|
||||
# Cmd Tab - App Switching Default
|
||||
# K("RC-Tab"): K("RC-backslash"), # xfce4
|
||||
# K("RC-Shift-Tab"): K("RC-Shift-backslash"), # xfce4
|
||||
# K("RC-Grave"): K("RC-Shift-backslash"), # xfce4
|
||||
# Converts Cmd to use Ctrl-Shift
|
||||
K("RC-Tab"): K("RC-F13"),
|
||||
K("RC-Shift-Tab"): K("RC-Shift-F13"),
|
||||
K("RC-V"): K("C-Shift-V"),
|
||||
K("RC-MINUS"): K("C-Shift-MINUS"),
|
||||
K("RC-EQUAL"): K("C-Shift-EQUAL"),
|
@@ -1,4 +1,4 @@
|
||||
#!/bin/bash
|
||||
#!/usr/bin/env bash
|
||||
if [ -f {homedir}/.config/systemd/user/keyswap.timer ]; then
|
||||
systemctl --user stop keyswap.timer >/dev/null 2>&1
|
||||
systemctl --user disable keyswap.timer >/dev/null 2>&1
|
@@ -1,4 +1,4 @@
|
||||
#!/bin/bash
|
||||
#!/usr/bin/env bash
|
||||
# /usr/local/bin/logoff.sh
|
||||
while true; do
|
||||
w | grep -E "$1.*$2" > /dev/null 2>&1 || (sudo systemctl stop xkeysnail && sudo pkill -f logoff)
|
Before Width: | Height: | Size: 3.0 KiB After Width: | Height: | Size: 3.0 KiB |
Before Width: | Height: | Size: 3.0 KiB After Width: | Height: | Size: 3.0 KiB |
Before Width: | Height: | Size: 2.2 KiB After Width: | Height: | Size: 2.2 KiB |
Before Width: | Height: | Size: 2.2 KiB After Width: | Height: | Size: 2.2 KiB |
Before Width: | Height: | Size: 2.1 KiB After Width: | Height: | Size: 2.1 KiB |
Before Width: | Height: | Size: 2.1 KiB After Width: | Height: | Size: 2.1 KiB |
Before Width: | Height: | Size: 2.4 KiB After Width: | Height: | Size: 2.4 KiB |
0
linux/xkeysnail.desktop → xkeysnail-config/xkeysnail.desktop
Executable file → Normal file
0
linux/xkeysnail.service → xkeysnail-config/xkeysnail.service
Executable file → Normal file
@@ -1,4 +1,4 @@
|
||||
#!/bin/bash
|
||||
#!/usr/bin/env bash
|
||||
# >/dev/null 2>&1
|
||||
|
||||
if [ -f /usr/local/bin/xkeysnail ];then
|
@@ -1,4 +1,4 @@
|
||||
#!/bin/bash
|
||||
#!/usr/bin/env bash
|
||||
|
||||
# set about:config?filter=ui.key.menuAccessKeyFocuses
|
||||
# to false for wordwise to work in Firefox
|
||||
@@ -6,7 +6,7 @@
|
||||
typeset -l distro
|
||||
distro=$(awk -F= '$1=="NAME" { gsub("[\",!,_, ]","",$2);print $2 ;}' /etc/os-release)
|
||||
typeset -l dename
|
||||
dename=$(./linux/system-config/dename.sh | cut -d " " -f1)
|
||||
dename=$(./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 ./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
|
||||
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
|
||||
fi
|
||||
bdmd5=$(md5sum /usr/bin/budgie-daemon | awk '{ print $1 }')
|
||||
newbdmd5=$(md5sum ./linux/system-config/budgie-daemon_10.5.1 | awk '{ print $1 }')
|
||||
newbdmd5=$(md5sum ./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 ./linux/system-config/budgie-daemon_10.5.1 /usr/bin/budgie-daemon
|
||||
sudo pkill budgie-daemon && sudo cp ./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 ./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
|
||||
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
|
||||
fi
|
||||
cp /usr/bin/budgie-daemon ./budgie-daemon_"$budgieVersion".bak
|
||||
sudo pkill budgie-daemon && sudo cp ./linux/system-config/budgie-daemon_10.5.1 /usr/bin/budgie-daemon
|
||||
sudo pkill budgie-daemon && sudo cp ./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 ./linux/system-config/unipkg.sh "xorg-xhost gcc"
|
||||
sudo ./system-config/unipkg.sh "xorg-xhost gcc"
|
||||
fi
|
||||
fi
|
||||
|
||||
if [[ $dename == "kde" ]]; then
|
||||
if [[ $distro == "manjarolinux" ]]; then
|
||||
sudo ./linux/system-config/unipkg.sh vte3
|
||||
sudo ./system-config/unipkg.sh vte3
|
||||
else
|
||||
sudo ./linux/system-config/unipkg.sh libvte-2.91-dev
|
||||
sudo ./system-config/unipkg.sh libvte-2.91-dev
|
||||
fi
|
||||
fi
|
||||
if [[ $distro == 'kdeneon' ]]; then
|
||||
@@ -324,11 +324,15 @@ 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 ./linux/system-config/unipkg.sh inotify-tools
|
||||
# sudo ./system-config/unipkg.sh inotify-tools
|
||||
# fi
|
||||
if ! [ -x "$(command -v pip3)" ]; then
|
||||
echo "Will need to install python3-pip..."
|
||||
sudo ./linux/system-config/unipkg.sh python3-pip
|
||||
if [ "$distro" == "freebsd" ]; then
|
||||
sudo python3 -m ensurepip
|
||||
else
|
||||
echo "Will need to install python3-pip..."
|
||||
sudo ./system-config/unipkg.sh python3-pip
|
||||
fi
|
||||
fi
|
||||
if ! [ -x "$(command -v python3-config)" ]; then
|
||||
if [ "$distro" == "ubuntu" ] || [ "$distro" == "debian" ] || [ "$distro" == 'linuxmint' ]; then
|
||||
@@ -338,15 +342,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 ./linux/system-config/unipkg.sh "$pydev"
|
||||
sudo ./system-config/unipkg.sh "$pydev"
|
||||
fi
|
||||
fi
|
||||
# if [ "$distro" == "ubuntu" ] && [ "$dename" == "gnome" ];then
|
||||
# sudo ./linux/system-config/unipkg.sh gnome-tweaks gnome-shell-extension-appindicator gir1.2-appindicator3-0.1
|
||||
# sudo ./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 ./linux/system-config/unipkg.sh "xorg-xhost gcc"
|
||||
sudo ./system-config/unipkg.sh "xorg-xhost gcc"
|
||||
fi
|
||||
fi
|
||||
if [ "$distro" == 'linuxmint' ]; then
|
||||
@@ -363,103 +367,103 @@ mkdir -p ~/.config/kinto
|
||||
|
||||
# KDE startup - xhost fix
|
||||
mkdir -p ~/.config/autostart
|
||||
yes | cp -rf ./linux/xkeysnail.desktop ~/.config/kinto/xkeysnail.desktop
|
||||
yes | cp -rf ./xkeysnail-config/xkeysnail.desktop ~/.config/kinto/xkeysnail.desktop
|
||||
|
||||
# yes | cp -rf ./linux/xkeystart.sh ~/.config/kinto/xkeystart.sh
|
||||
# yes | cp -rf ./xkeysnail-config/xkeystart.sh ~/.config/kinto/xkeystart.sh
|
||||
|
||||
# *** More testing needing, universal way of killing kinto on user log out? ***
|
||||
# yes | sudo cp -rf linux/root_logoff.sh /usr/local/bin/logoff.sh
|
||||
# yes | sudo cp -rf xkeysnail-config/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 linux/gnome_logoff.sh ~/.config/kinto/logoff.sh
|
||||
# yes | sudo cp -rf xkeysnail-config/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 ./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
|
||||
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/gui
|
||||
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
|
||||
if [ "$expsh" != " " ];then
|
||||
sed -i "s#{kill-caret}#/usr/bin/pkill -f $expsh#g" ./linux/xkeysnail.service.new
|
||||
sed -i "s#{kill-caret}#/usr/bin/pkill -f $expsh#g" ./xkeysnail-config/xkeysnail.service.new
|
||||
else
|
||||
sed -i "s#{kill-caret}#$expsh#g" ./linux/xkeysnail.service.new
|
||||
sed -i "s#{kill-caret}#$expsh#g" ./xkeysnail-config/xkeysnail.service.new
|
||||
fi
|
||||
sed -i "s/{username}/`whoami`/g" ./linux/xkeysnail.service.new
|
||||
sed -i "s#{homedir}#`echo "$HOME"`#g" ./linux/xkeysnail.service.new
|
||||
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#{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" ./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#{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#{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" ./linux/xkeysnail.service.new
|
||||
sed -i "s/{displayid}/`echo "$DISPLAY"`/g" ./xkeysnail-config/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" ./linux/kinto.py.new >/dev/null 2>&1
|
||||
perl -pi -e "s/\s{4}(# )(K.*)(# Default SL - Change workspace.*budgie.*)/ \$2\$3/g" ./xkeysnail-config/kinto.py.new >/dev/null 2>&1
|
||||
fi
|
||||
|
||||
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" ./xkeysnail-config/kinto.py.new >/dev/null 2>&1
|
||||
fi
|
||||
|
||||
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" ./xkeysnail-config/kinto.py.new >/dev/null 2>&1
|
||||
fi
|
||||
|
||||
if [[ $distro == "elementaryos" ]]; then
|
||||
perl -pi -e "\s{4}(# )(K.*)(# SL - .*eos.*)/ \$2\$3/g" ./linux/kinto.py.new >/dev/null 2>&1
|
||||
perl -pi -e "\s{4}(# )(K.*)(# SL - .*eos.*)/ \$2\$3/g" ./xkeysnail-config/kinto.py.new >/dev/null 2>&1
|
||||
fi
|
||||
|
||||
if [[ "$distro" == "manjaro"* ]]; then
|
||||
perl -pi -e "\s{4}(# )(K.*)(# SL - .*manjaro.*)/ \$2\$3/g" ./linux/kinto.py.new >/dev/null 2>&1
|
||||
perl -pi -e "\s{4}(# )(K.*)(# SL - .*manjaro.*)/ \$2\$3/g" ./xkeysnail-config/kinto.py.new >/dev/null 2>&1
|
||||
fi
|
||||
|
||||
if [[ $dename == "gnome" ]]; then
|
||||
perl -pi -e "\s{4}(# )(K.*)(# SL - .*ubuntu.*)/ \$2\$3/g" ./linux/kinto.py.new >/dev/null 2>&1
|
||||
perl -pi -e "\s{4}(# )(K.*)(# SL - .*ubuntu.*)/ \$2\$3/g" ./xkeysnail-config/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" ./linux/kinto.py.new >/dev/null 2>&1
|
||||
perl -pi -e "s/(# )(.*)(#.*kde)/\$2\$3/g" ./xkeysnail-config/kinto.py.new >/dev/null 2>&1
|
||||
fi
|
||||
|
||||
if [[ $dename == "xfce" ]]; then
|
||||
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
|
||||
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
|
||||
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" ./linux/kinto.py.new >/dev/null 2>&1
|
||||
perl -pi -e "s/(K\(\"RC-Space)(.*)(# )(xfce4)/\$3\$1\$2\$3\$4/g" ./xkeysnail-config/kinto.py.new >/dev/null 2>&1
|
||||
xfconf-query --channel xfce4-keyboard-shortcuts --property "/commands/custom/<Primary>space" --create --type string --set "launchy"
|
||||
fi
|
||||
|
||||
if ! [[ $1 == "5" || $1 == "uninstall" || $1 == "Uninstall" ]]; then
|
||||
mv ./linux/kinto.py.new ~/.config/kinto/kinto.py
|
||||
mv ./xkeysnail-config/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
|
||||
@@ -470,7 +474,8 @@ if ! [[ $1 == "5" || $1 == "uninstall" || $1 == "Uninstall" ]]; then
|
||||
xhost +SI:localuser:root
|
||||
git clone --depth 10 https://github.com/rbreaves/xkeysnail.git
|
||||
cd xkeysnail
|
||||
git checkout kinto
|
||||
git pull --depth 10
|
||||
git checkout 51c369084e0045a8410d227bab52411bf84fb65b
|
||||
giturl=$(git ls-remote --get-url)
|
||||
if [ "$giturl" != "https://github.com/rbreaves/xkeysnail.git" ];then
|
||||
echo -e "\nreplacing xkeysnail with fork...\n"
|
||||
@@ -478,7 +483,7 @@ if ! [[ $1 == "5" || $1 == "uninstall" || $1 == "Uninstall" ]]; then
|
||||
rm -rf ./xkeysnail
|
||||
git clone --depth 10 https://github.com/rbreaves/xkeysnail.git
|
||||
cd xkeysnail
|
||||
git checkout kinto
|
||||
git checkout 51c369084e0045a8410d227bab52411bf84fb65b
|
||||
fi
|
||||
sudo pip3 install --upgrade .
|
||||
cd ..
|
||||
@@ -489,12 +494,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" ./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
|
||||
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 ./linux/limitedadmins.new /etc/sudoers.d/limitedadmins
|
||||
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..."
|
||||
|