-
Notifications
You must be signed in to change notification settings - Fork 218
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- WIP Back/Forward/Close Tab Browser hotkeys for Linux. #348
- Loading branch information
Showing
3 changed files
with
45 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters