mirror of
https://github.com/rbreaves/kinto.git
synced 2025-08-05 18:38:26 +02:00
- Refined Back/Forward/Undo Text/Tabs config for Linux
This commit is contained in:
@@ -3,29 +3,39 @@
|
|||||||
action=$1
|
action=$1
|
||||||
|
|
||||||
saveClipboard=$(xclip -selection clipboard -o)
|
saveClipboard=$(xclip -selection clipboard -o)
|
||||||
echo "$saveClipboard"
|
|
||||||
echo "" | xclip -i -selection clipboard
|
echo "" | xclip -i -selection clipboard
|
||||||
# --delay 12
|
if [ "$action" == "Left" ];then
|
||||||
xdotool getactivewindow key --clearmodifiers Left Left Right Shift+Right ctrl+c Right
|
xdotool getactivewindow key --delay 40 --clearmodifiers End bar Shift+Left ctrl+x
|
||||||
|
fi
|
||||||
|
if [ "$action" == "Right" ];then
|
||||||
|
xdotool getactivewindow key --delay 40 --clearmodifiers Home bar Shift+Left ctrl+x
|
||||||
|
fi
|
||||||
|
if [ "$action" == "Undo" ];then
|
||||||
|
xdotool getactivewindow key --delay 24 --clearmodifiers bar Shift+Left ctrl+x
|
||||||
|
sleep 0.1
|
||||||
|
fi
|
||||||
|
|
||||||
newClipboard=$(xclip -selection clipboard -o)
|
newClipboard=$(xclip -selection clipboard -o)
|
||||||
|
|
||||||
|
# echo "$newClipboard"
|
||||||
|
# echo "hello"
|
||||||
|
|
||||||
if [ "$newClipboard" == "" ] && [ "$action" == "Left" ];then
|
if [ "$newClipboard" != "|" ] && [ "$action" == "Left" ];then
|
||||||
xdotool getactivewindow key --clearmodifiers alt+Left
|
xdotool getactivewindow key --clearmodifiers alt+Left
|
||||||
elif [ "$action" == "Left" ];then
|
elif [ "$action" == "Left" ];then
|
||||||
xdotool getactivewindow key --clearmodifiers Home
|
xdotool getactivewindow key --clearmodifiers Home
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ "$newClipboard" == "" ] && [ "$action" == "Right" ];then
|
if [ "$newClipboard" != "|" ] && [ "$action" == "Right" ];then
|
||||||
xdotool getactivewindow key --clearmodifiers alt+Right
|
xdotool getactivewindow key --clearmodifiers alt+Right
|
||||||
elif [ "$action" == "Right" ];then
|
elif [ "$action" == "Right" ];then
|
||||||
xdotool getactivewindow key --clearmodifiers End
|
xdotool getactivewindow key --clearmodifiers End
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ "$newClipboard" == "" ] && [ "$action" == "Undo" ];then
|
if [ "$newClipboard" != "|" ] && [ "$action" == "Undo" ];then
|
||||||
xdotool getactivewindow key --clearmodifiers ctrl+Shift+t
|
xdotool getactivewindow key ctrl+Shift+t
|
||||||
elif [ "$action" == "Undo" ];then
|
elif [ "$action" == "Undo" ];then
|
||||||
xdotool getactivewindow key --clearmodifiers ctrl+z
|
xdotool getactivewindow key --delay 24 --clearmodifiers ctrl+z ctrl+z ctrl+z
|
||||||
fi
|
fi
|
||||||
|
|
||||||
echo $saveClipboard | xclip -i -selection clipboard
|
echo $saveClipboard | xclip -i -selection clipboard
|
Reference in New Issue
Block a user