Closed noctuid closed 4 years ago
I recently discovered SmartCopyPaste-2.0.lua and had the same problem. I made a minor change to correct the behavior.
Line 76 originally looks like this
local args = { 'xclip', '-o' }
Change it to this
local args = { 'xsel', '-bo' }
@noctuid thank you for clarifying, did not know how linux handles clipboard. It should be fixed now in version 2.1. @gyvess Thank you also, xsel command sure is also helpful.
Test and let me know so I close this ^ ^
xclip -o
gives the primary selection, which is the last highlighted/selected text. I think the clipboard should be used by default (i.e.xclip -selection clipboard -o
andxclip -selection clipboard -in
) maybe with an option to use the primary selection instead. Currently the script does not work if text copied to the clipboard was not not done with highlighting/selection (and most copying I do does not affect the primary selection). Also if you highlight some text,C-c
it, and then highlight some other text without copying it, the script will currently use the last highlighted text instead of what you actually copied last.