mirror of
https://github.com/rbreaves/kinto.git
synced 2025-08-02 09:06:40 +02:00
Compare commits
9 Commits
1.2-8
...
feature/Br
Author | SHA1 | Date | |
---|---|---|---|
![]() |
9562a25ebb | ||
![]() |
b7f4c6c54d | ||
![]() |
c0bc49b150 | ||
![]() |
bcea1e682a | ||
![]() |
78e480c5ad | ||
![]() |
37c7949fb4 | ||
![]() |
ef99b6548c | ||
![]() |
7647cebf22 | ||
![]() |
1a836d20d5 |
11
linux/.xbindkeysrc
Executable file
11
linux/.xbindkeysrc
Executable file
@@ -0,0 +1,11 @@
|
||||
"~/.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
|
75
linux/browsers.sh
Executable file
75
linux/browsers.sh
Executable file
@@ -0,0 +1,75 @@
|
||||
#!/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
|
@@ -209,6 +209,9 @@ 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"),
|
||||
|
@@ -343,9 +343,29 @@ GroupAdd, intellij, ahk_exe idea64.exe
|
||||
^+4::Send #+{S}
|
||||
|
||||
; wordwise support
|
||||
$^Left::Send {Home}
|
||||
#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}
|
||||
$^Right::Send {End}
|
||||
$^+Right::Send +{End}
|
||||
^Up::Send ^{Home}
|
||||
^+Up::Send ^+{Home}
|
||||
@@ -469,9 +489,18 @@ 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}
|
||||
@@ -759,4 +788,22 @@ Send {RWin up}
|
||||
Send {LWin up}
|
||||
Send {RShift up}
|
||||
Send {LShift up}
|
||||
return
|
||||
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
|
||||
}
|
Reference in New Issue
Block a user