Open maxclac opened 1 year ago
Try it with the following command (here is how to add the command to CopyQ):
[Command]
Command="
copyq:
const tabName = 'Secret';
copy();
const item = {}
item[mimeText] = clipboard(mimeText);
const encrypted = plugins.itemencrypted.encrypt(pack(item));
tab(tabName);
write('application/x-copyq-encrypted', encrypted);
"
GlobalShortcut=meta+ctrl+c
Icon=\xf21b
IsGlobalShortcut=true
Name=Copy Secret
Thank you for your answer. The problem with this solution is that the copied text also appears in the normal tab, not just in the encrypted tab.
The problem with this solution is that the copied text also appears in the normal tab, not just in the encrypted tab.
Ah, I think it requires disabling the clipboard storing momentarily (similarly to Copy a Secret command):
[Command]
Command="
copyq:
const tabName = 'Secret';
const wasMonitoring = monitoring();
if (wasMonitoring) disable();
try {
copy();
} finally {
if (wasMonitoring) enable();
}
const item = {}
item[mimeText] = clipboard(mimeText);
const encrypted = plugins.itemencrypted.encrypt(pack(item));
tab(tabName);
write('application/x-copyq-encrypted', encrypted);
"
GlobalShortcut=meta+ctrl+c
Icon=\xf21b
IsGlobalShortcut=true
Name=Copy Secret
Hi!
I have created a new tab for encrypted items. What I would like is to be able to copy content from anywhere, encrypt it, and put it directly to this dedicated tab with one shortcut. I could not figure this out by reading the documentation. How can it be achieved?
Best regards