Closed zyw271828 closed 3 years ago
It would be probably better to add some better support for filtering items from scripts or add a new function to remove all rows when possible and skip the pinned rows.
I've created https://github.com/hluk/CopyQ/pull/1746 which would allow among other things:
ItemSelection(tabName).selectRemovable().removeAll();
Comments are welcome.
This will make writing scripts very convenient, thank you!
Actually, I think it would be better to make "Clear all" a built-in feature instead of a script function. The clipboard of Windows 10 provides this feature, and Windows 11 puts it in a more prominent position. Microsoft may think that the usage rate of this feature is high.
In the next release, there will be also a predefined command to Clear Current Tab (it will be possible to add it from the Command dialog).
Thanks for the PR.
Couple of problems:
plugins.itempinned.isPinned()
only works if the "Pinned Items" plugins is availableapplication/x-copyq-item-pinned
) for each item separately in a loop which could be slow with many itemsIt would be probably better to add some better support for filtering items from scripts or add a new function to remove all rows when possible and skip the pinned rows.