hluk / CopyQ

Clipboard manager with advanced features
GNU General Public License v3.0
8.35k stars 432 forks source link

Unable to copy file with copyq #1585

Open pankajsaini1234 opened 3 years ago

pankajsaini1234 commented 3 years ago

I am trying to copy file with copyq as:

'copyq -s SESSION_NAME copy < FILE_NAME'

I tried using:

'copyq -s SESSION_NAME copy - < FILE_NAME' 'copyq -s SESSION_NAME copy -- < FILE_NAME'

hoping that it might work; but when I am reading through the tabs the copied text is not there... even though after running above command I get 'true' or '^CTRUE' at the end. I tried using it with 'sudo' and without 'sudo' but got the same results.

Previously I was copying a large journal file. Thinking that may be size of the file may be an issue with copyq I tried to copy a file with just 1 line text but it also didn't worked.

I hope that either the issue will be fixed soon or if there is a work around then I will be happy to know about that.

Thanks and regards, Pankaj Kumar

hluk commented 3 years ago

copyq copy - < FILE_NAME will only change clipboard. If you copy stuff like this and need to add the copied content to CopyQ, you need to explicitly add it with copyq add - < FILE_NAME. Or to do this in single step:

copyq 'copy(input()); add(input())' < FILE_NAME

NOTE: Please don't run with CopyQ as root/admin -- that shouldn't be required at all.