linuxbashcopyq

copy all copyQ tab names to a tab name tabs


i want to copy all existing tab names inside copyQ as items in a tab named tabs.

my prototype producing duplicates:

./tabs.sh ; copyq tab > tabs.sh ; sed -i 's/.*/copyq tab tabs add "&"/' tabs.sh ; ./tabs.sh

i read:

https://copyq.readthedocs.io/en/latest/scripting.html#working-with-tabs


Solution

  • the copyq removetab tabName removes the tab ( means also all items of the tab).

    If the tab is empty at first, fewer duplicates are created.

    copyq show tabs; ./tabs.sh ; copyq tab > tabs.sh ; sed -i 's/.*/copyq tab tabs add "&"/' tabs.sh ; copyq removetab tabs; ./tabs.sh

    found by consolne command: copyq --help and here: https://gist.github.com/hluk/95889230aeea2388dea5

    works here in CopyQ Clipboard Manager v4.1.0~focal