-
Hi I sometimes have to copy logs and other long text files to my clipboard and paste them using copyq. Combined with the fact that I like to keep as many entries as possible (10k), I'm thinking that having long entries slows down searching for entries. Is there any way to filter long entries in the copyq window and delete them? Or can someone point me to a way of creating a script that could automatically delete entries longer than x lines? |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments
-
Anyone have sugggestions or ideas? |
Beta Was this translation helpful? Give feedback.
-
The following command would delete all items with more than 100 lines in the current tab - triggered with a custom shortcut or from the menu/toolbar (here is how to add the command to CopyQ): [Command]
Command="
copyq:
ItemSelection(selectedTab())
.select(/(\\n.*){100}/)
.removeAll()"
Icon=\xf51a
InMenu=true
Name=Delete Long Items
Shortcut=ctrl+shift+del |
Beta Was this translation helpful? Give feedback.
-
Thanks a lot @hluk that worked. It was not working since I had an older build from 2020, but once I updated to the latest 6.2 build it worked perfectly. |
Beta Was this translation helpful? Give feedback.
The following command would delete all items with more than 100 lines in the current tab - triggered with a custom shortcut or from the menu/toolbar (here is how to add the command to CopyQ):