Jump to content
oskamathis

[SOLVED] Option whether save the selected item with a hotkey to Clipboard History

Recommended Posts

Quote

Alfred uses the clipboard when obtaining the selected item with a hotkey.

 

I want option whether save the selected item with a hotkey to Clipboard History.

 

Share this post


Link to post
Share on other sites
Posted (edited)

@vitor

Thank you for your reply.

 

1 hour ago, vitor said:

You only need to copy as usual (⌘C) to save to the Clipboard History. If you want to have a Hotkey to copy without saving, you can make a Workflow: connect a Hotkey Trigger (Argument: Selection in macOS) to a Copy to Clipboard Output (check Mark item as transient in clipboard).

 

I made Workflow: only Hotkey Trigger (Argument: Selection in macOS), but Alfred save the selected item to the Clipboard History when I execute this WorkFlow.

 

workflow.png.65aad6a4845f6799c122ce609bf05652.png

 

I don't want save the selected item to the Clipboard History.

What should I do?

 

Pardon my broken English.

Edited by oskamathis

Share this post


Link to post
Share on other sites

That Workflow is incomplete. Also, please don’t post screenshots to Workflows, but rather upload them so we can test where they might be wrong.


Either way, I induced you in error. I forgot that to get the selection when using a Hotkey, Alfred uses the clipboard, so the item is already saved to the history by the time it reaches the Copy to Clipboard Output.


Let’s go about this a different way. Why do you want to have some items saved to the clipboard history and others not? What’s your use case?

Share this post


Link to post
Share on other sites
1 hour ago, vitor said:

That Workflow is incomplete. Also, please don’t post screenshots to Workflows, but rather upload them so we can test where they might be wrong.

 

I'm sorry. I'll be careful from now on.

 

1 hour ago, vitor said:

Why do you want to have some items saved to the clipboard history and others not? What’s your use case?

I want to translate the selected item and save it with the original text to the clipboard history.

Ideally, both the original text and the translated text are saved in one history.

I often compare both, so I don't need history of only original text.

 

I made example Workflow.

Where should I upload it?

 

Share this post


Link to post
Share on other sites
10 hours ago, oskamathis said:

Ideally, both the original text and the translated text are saved in one history.

 

So you want to combine both texts, in a way that when you ⌘V it pastes both at once? Could you be looking for the Merging feature?

Share this post


Link to post
Share on other sites
Posted (edited)

@vitor

 

I found this topic.

This is what I really wanted to do.

 

Finally I wrote shell script as below,

/usr/bin/sqlite3 ~/Library/Application\ Support/Alfred/Databases/clipboard.alfdb "DELETE FROM clipboard WHERE dataType = 0 ORDER BY ts DESC LIMIT 1;"

original=$1
translated=$1 # any translation logic

echo -n $original
echo ""
echo ""
echo -n $translated

and connected Run Script to Copy to Clipboard.

 

I'm sorry to cause so much trouble.

Thank for kindly letting me know many things.

Edited by oskamathis

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


×
×
  • Create New...