I really struggled writing a command to send a copied link from Chromium to Firefox, because the links were almost always opened twice.
To Reproduce
copyq: open(str(data('text/plain'))Expected behavior
One browser tab is opened when some http url is copied.
Instead I get 2 browser tabs!
Version, OS and Environment
Additional context
The following "Command" script avoids and illustrates the issue:
copyq:
var incoming = str(data('text/plain'));
var prev = str(read(0));
if (incoming == prev)
popup("REPEATED!", incoming+'\n==\n'+prev);
else
open(incoming);
Automatic commands are run also when X11 mouse selection buffer changes. You can avoid this by checking isClipboard().
copyq:
if (isClipboard())
open(data(mimeText))
You can avoid this by checking
isClipboard().
Thanks, that works.
So is this a bug or a feature?
So is this a bug or a feature?
Feature. It's useful to run some commands when selection changes.
Most helpful comment
Automatic commands are run also when X11 mouse selection buffer changes. You can avoid this by checking
isClipboard().