Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Shortcut for changing tab by (fuzzy-)search #1715

Open
sl5net opened this issue Jul 16, 2021 · 2 comments
Open

Shortcut for changing tab by (fuzzy-)search #1715

sl5net opened this issue Jul 16, 2021 · 2 comments
Labels
feature New feature request

Comments

@sl5net
Copy link

sl5net commented Jul 16, 2021

Is your feature request related to a problem? Please describe.

solution i like

best

idea 1:

usa a tab called tabs that include all tab-names.

idea 2:

could change tabs by using a search-window.

default search value should the title of the window its coming from.

already working use arrow keys (left/right):

if i call copyQ with a shortcut for tab choosing

from a Tilix Terminal emulater Tilix: xy@xy: ~/symfony

value in the copyQ Tab-Search should be

Tilix: xy@xy: ~/symfony

then i manually cut off Tilix: xy@xy: ~/ and find my

symfony - Tab. helps me to enter symfony console commands.

how i was easy to understand :) ty for this great powerful tool !
BTW this solution remembers my to my git-repo github.com/sl5net/global-IntelliSense-everywhere

easiest

already working very good left/right keys

@sl5net sl5net added the feature New feature request label Jul 16, 2021
@sl5net sl5net changed the title shortCut for chaning tab shortCut for chaning tab by (fuzzy-)search Jul 16, 2021
@sl5net
Copy link
Author

sl5net commented Jul 16, 2021

idea for workaround:

doku:

  1. copyq tab > tabs.txt
  2. https://stackoverflow.com/questions/68411792/insert-sting-before-and-behind-using-sed

prototype:

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

problem of this protoype. it's produce lots double items

@hluk hluk changed the title shortCut for chaning tab by (fuzzy-)search Shortcut for changing tab by (fuzzy-)search Jul 24, 2021
@hluk
Copy link
Owner

hluk commented Jul 24, 2021

Good idea. Fuzzy-searching tabs would be nice.

I like the idea 1 with a slight modification: the tab list would open in a separate CopyQ session/app-instance.

Here is a command that opens the tab list with a shortcut (here is how to add the command to CopyQ):

[Command]
Command="
    copyq:
    function tabsSession() {
        execute(
            'copyq', '-s', 'tabs', '--start-server',
            'tab', 'Tabs', ...arguments
        )
    }

    var cmd = `
        config(
            'check_clipboard', false,
            'check_selection', false,
            'copy_clipboard', false,
            'copy_selection', false,
            'disable_tray', true,
            'hide_tabs', true,
            'hide_toolbar', true,
            'hide_main_window', true,
        );
        removeTab('Tabs')
        setCommands([{
            name: 'Show Tab',
            inMenu: true,
            hideWindow: true,
            shortcuts: ['Enter', 'Return'],
            cmd: 'copyq -s \"%SESSION%\" show %1'
        }]);
    `;
    var session = str(env('COPYQ_SESSION_NAME'));
    cmd = cmd.replace('%SESSION%', session);
    tabsSession(cmd);
    tabsSession('add', ...tab().reverse())
    tabsSession('show', 'Tabs')"
Icon=\xf022
InMenu=true
Name=Tab Switcher
Shortcut=alt+f1

For the command to work properly, you will need most recent version of CopyQ (v4.1.0).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature New feature request
Projects
None yet
Development

No branches or pull requests

2 participants