hluk / copyq-commands

Useful commands for CopyQ clipboard manager.
331 stars 73 forks source link

command List all tabs? #41

Closed Clemens-Ratte-Polle closed 2 years ago

Clemens-Ratte-Polle commented 3 years ago

Hi. I do not find the option to list all tabs and jump to a certain one per click. Is there such script, command? Where could i post a wish? :) thx

hluk commented 3 years ago

List tabs: copyq tab

Show specific tab: copyq show TAB

Clemens-Ratte-Polle commented 3 years ago

ok, these are for the Command Line, but i meant commands :) I have many tabs and so many of them are "hidden", so i want to see them all and select one by a shortcut. Is there a "forum" where CQ users would help each other? :) thx

hluk commented 3 years ago

I have many tabs and so many of them are "hidden", so i want to see them all and select one by a shortcut.

Here is a command that shows a dialog with the tab list:

[Command]
Command="
    copyq:
    var tabs = tab().sort()
    var index = dialog(
        '.height', 600,
        '.list:Tab', tabs)
    if (index !== undefined)
        show(tabs[index])"
Icon=\xf022
InMenu=true
Name=Tabs
Shortcut=ctrl+shift+s

BTW, you can also use & in tab name for a shortcut (see https://copyq.readthedocs.io/en/latest/tabs-and-items.html#tabs) or Ctrl+0..9.

sl5net commented 3 years ago

Show specific tab: copyq show TAB and it creates new tabs

sl5net commented 3 years ago

Error: execve: No such file or directory using kUbuntu

Clemens-Ratte-Polle commented 3 years ago

THANKS VERY MUCH! Great command :)

And how without sorting? var tabs = tab() without: .sort() ?

sl5net commented 3 years ago

image

garulovilla commented 3 years ago

You need to add it in the command section: File > Commands.

image

And add a new command:

image

Check de FAQ section in How to load shared commands and share them?

sl5net commented 3 years ago

You need to add it in the command section: File > Commands.

image

And add a new command:

image

Check de FAQ section in How to load shared commands and share them?

F6 > Add > New command > Show Advanced (is then enabled next time) > Name it + Paste Script > Save it

works. my first copyQ-Script pasted

BTW i used ctrl+shift+t , was used for icons. may icons schould be ctrl+shift+i (but this shows no action any more)

sl5net commented 3 years ago

thanks works, but is it possible to get the search also as feature-rich as the search in the other tabs? BTW i have created a tab tabs ( https://stackoverflow.com/a/68480690/2891692 ). but of course my tab tabs don't enable me to switch fast to the tab selected. just enables to copy and find a existing tab (needs refreshed manually by sh-script)

sl5net commented 3 years ago

workaround thats help me bit in Linux:

clear; copyq tab 'tabs_META+&T' add "firstEntry" ; copyq removetab 'tabs_META+&T' ; [ -f ./tabs.sh ] && rm ./tabs.sh; copyq tab > tabs.sh ; sed -i 's/.*/copyq tab "tabs_META+\&T" add "&"/' tabs.sh ; sort -buo ./tabs.sh ./tabs.sh; chmod +x ./tabs.sh ; ./tabs.sh

BTW META+T is my global shortcut for list all tabs. i note it into the name for just remember that

Clemens-Ratte-Polle commented 3 years ago

hi. To click in the list and jump to a specific tab would be fine :) Or 2-rowed tabs?