hluk / CopyQ

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

Command processing and resulting &clipboard item #242

Closed reagle closed 8 years ago

reagle commented 10 years ago

I have a command that changes the chase of a selection. As a result, it does place the transformed text as place 0 on the clipboard. However, even though it is at location 0, it is not pasted through ctrl+v or middle-click. I have to actually open the clipboard and select the item. Is there a way so that results are automatically transferred to the systems' clipboards?

[Command]
Name=Title Case
Command=bash:\n/home/reagle/bin/fe/change_case.py $(copyq selection)
Output=text/plain
InMenu=true
OutputTab=&clipboard
hluk commented 10 years ago

The first item in the first tab is not necessarily in clipboard or selection. You have to use copyq copy ... to change the clipboard content.

So the command would look like:

bash:
copyq copy "$(/home/reagle/bin/fe/change_case.py "$(copyq selection)")"
reagle commented 10 years ago

Hi Lukas,

But this doesn't include the entry in the clipboard history. Is it possible to have it be both in the clipboard history and actual clipboard?

On 06/24/2014 03:16 AM, Lukas Holecek wrote:

So the command would look like:

|bash: copyq copy "$(/home/reagle/bin/fe/change_case.py "$(copyq selection)")"

hluk commented 10 years ago

Perhaps you mean:

bash:
text="$(/home/reagle/bin/fe/change_case.py "$(copyq selection)")"
copyq copy "$text"
copyq add "$text"
reagle commented 10 years ago

Thanks!

reagle commented 9 years ago

Not sure what happened (haven't used this in a bit) but this now results in "true" being added to my clipboard. If I perform the commands manually, this is what I see:

urd:~/bin/fe (master)$ text="$(/home/reagle/bin/fe/change_case.py -f "$(copyq selection)")"
urd:~/bin/fe (master)$ echo $text
Lessons I learned on the road as a digital nomad
urd:~/bin/fe (master)$ copyq copy "$text"
true
urd:~/bin/fe (master)$ echo $text
Lessons I learned on the road as a digital nomad
urd:~/bin/fe (master)$ copyq add "$text"
hluk commented 9 years ago

You probably have "Output" field set for the command in Command dialog [F6]. If you leave the field empty it should work.