hluk / copyq-commands

Useful commands for CopyQ clipboard manager.
328 stars 72 forks source link

feature request: apply Display Commands to the tray menu items #79

Closed jkatnik closed 7 months ago

jkatnik commented 9 months ago

Hello,

is it possible to apply Display Command to items in the tray menu? I'd like to mask all items starting with some prefix. E.g. items starting with 'S$' should be displayed in the tray menu as 'Masked Password'.

The below Command works as expected in the main CopyQ window, but it doesn't in the tray menu.

copyq:
const textData = str(data(mimeText));
const passwordPrefix = 'S$';

if (textData.startsWith(passwordPrefix)) {
  setData('text/plain', 'Masked Password');
}

image

Cheers Jarek

hluk commented 7 months ago

Thanks for the suggestion. This will be possible in the next CopyQ release (#2566).