mirror of
https://github.com/rbreaves/kinto.git
synced 2025-08-05 18:38:26 +02:00
- WIP Back/Forward/Close Tab Browser hotkeys for Linux. #348
This commit is contained in:
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
|
31
linux/browsers.sh
Executable file
31
linux/browsers.sh
Executable file
@@ -0,0 +1,31 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
|
action=$1
|
||||||
|
|
||||||
|
saveClipboard=$(xclip -selection clipboard -o)
|
||||||
|
echo "$saveClipboard"
|
||||||
|
echo "" | xclip -i -selection clipboard
|
||||||
|
# --delay 12
|
||||||
|
xdotool getactivewindow key --clearmodifiers Left Left Right Shift+Right ctrl+c Right
|
||||||
|
newClipboard=$(xclip -selection clipboard -o)
|
||||||
|
|
||||||
|
|
||||||
|
if [ "$newClipboard" == "" ] && [ "$action" == "Left" ];then
|
||||||
|
xdotool getactivewindow key --clearmodifiers alt+Left
|
||||||
|
elif [ "$action" == "Left" ];then
|
||||||
|
xdotool getactivewindow key --clearmodifiers Home
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ "$newClipboard" == "" ] && [ "$action" == "Right" ];then
|
||||||
|
xdotool getactivewindow key --clearmodifiers alt+Right
|
||||||
|
elif [ "$action" == "Right" ];then
|
||||||
|
xdotool getactivewindow key --clearmodifiers End
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ "$newClipboard" == "" ] && [ "$action" == "Undo" ];then
|
||||||
|
xdotool getactivewindow key ctrl+Shift+t
|
||||||
|
elif [ "$action" == "Undo" ];then
|
||||||
|
xdotool getactivewindow key --clearmodifiers ctrl+z
|
||||||
|
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("RC-Q"): K("RC-Q"), # Close all browsers Instances
|
||||||
K("M-RC-I"): K("RC-Shift-I"), # Dev tools
|
K("M-RC-I"): K("RC-Shift-I"), # Dev tools
|
||||||
K("M-RC-J"): K("RC-Shift-J"), # 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
|
||||||
})
|
})
|
||||||
|
|
||||||
# Open preferences in browsers
|
# Open preferences in browsers
|
||||||
|
Reference in New Issue
Block a user