Merge pull request #2 from masterdam79/clipboard-shenannigans

Clipboard shenannigans
This commit is contained in:
Julien 2023-02-10 15:49:20 +04:00 committed by GitHub
commit ce800bc003
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

5
snippy
View File

@ -392,7 +392,7 @@ run() {
xdotool key ctrl+v sleep "$focus_wait"
move_cursor "Up" $cursor_line_position
else
xdotool key ctrl+shift+v
xdotool key ctrl+shift+v sleep "$focus_wait"
if is_vim; then
move_cursor "Up" $cursor_line_position
fi
@ -400,6 +400,9 @@ run() {
move_cursor "Left" $cursor_position
# We need a little pause to handle the time to have the content of tmpfile pasted if is_gui
sleep "$focus_wait"
# Restore current clipboard
echo -ne "$current_clipboard" | xsel --clipboard --input
fi