mirror of
https://github.com/rbreaves/kinto.git
synced 2025-08-05 18:38:26 +02:00
31 lines
962 B
Bash
Executable File
31 lines
962 B
Bash
Executable File
#!/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 --clearmodifiers ctrl+Shift+t
|
|
elif [ "$action" == "Undo" ];then
|
|
xdotool getactivewindow key --clearmodifiers ctrl+z
|
|
fi
|
|
|
|
echo $saveClipboard | xclip -i -selection clipboard |