Page 1 of 1

Shift+Click on Path column to open new tab

Posted: 10 Aug 2023 06:07
by arazi89
Currently when I double-click on a path in the Path column that is displayed with the results of a Quick Search it opens that path in the same tab-- overwriting the Quick Search results.

If I hold shift and Shift+Double Click then it opens that directory in a new tab, preserving the tab with the Quick Search results. Is there any way to reverse this-- and have the default Double-Click action to be to open the path in a new tab? Overwriting the Quick Search results tab is not ideal since it takes time to reload it.

In scripting it is: tab("new", "<curitempath>"); But I don't know how to assign that to the Path column in Quick Search.

Thank you!

Re: Shift+Click on Path column to open new tab

Posted: 10 Aug 2023 08:25
by admin
What's wrong with Shift+Double Click?

Re: Shift+Click on Path column to open new tab

Posted: 10 Aug 2023 16:04
by arazi89
admin wrote: 10 Aug 2023 08:25 What's wrong with Shift+Double Click?
Nothing is "wrong" with it. That is what I am doing now.

But just as nothing is wrong with Shift+Double Click nothing is wrong with Alt+Shift+Double Click or Ctrl+Alt+Shift+Double Click or any other number of multiple key presses using both hands that are not as fast and convenient as simply double-clicking with the mouse. It's not the end of the world, but with an awesome program with 5,000 different options this is just one more potential option that I would use every day.

I do a Quick Search of: tab("new", "<get list_recentlyopenedfiles>?/silent=1"); with customized columns that is one of the default tabs that I use all of time as a hub to launch programs and other tabs. I use it constantly. And that is why the difference between one-handed double-click versus two-handed Shift+Double Click is noticeable after using it so much.

Thanks!

Re: Shift+Click on Path column to open new tab

Posted: 10 Aug 2023 16:30
by highend
Easily solvable...

Menu - Tools - Configuration...
Find and Filter
Find Files & Branch View
[ ] Search results inherit current columns

Now do your quicksearch
While that view is open, add a new custom column and place it e.g. to the right of the path column

Code: Select all

Caption: E.g. "Open"
Type: Script
Script: tab("new", <cc_path>);
Format: Text
Trigger: Click
Item type: Files and Folders
When done, save your settings.

Now whenever you do a new quicksearch you can just click the "play" button in that custom column to open the path.

A single left click, no modifiers necessary...
Quick search.png
Quick search.png (349.66 KiB) Viewed 1046 times

Re: Shift+Click on Path column to open new tab

Posted: 10 Aug 2023 16:56
by arazi89
highend wrote: 10 Aug 2023 16:30 Easily solvable...

Menu - Tools - Configuration...
Find and Filter
Find Files & Branch View
[ ] Search results inherit current columns
....

Now whenever you do a new quicksearch you can just click the "play" button in that custom column to open the path.

A single left click, no modifiers necessary...
Yes, yes, yes!

I had not yet learned to use the "Click" Trigger to stash all kinds of scripting code in a custom column and only run if/when clicked on the 'Play' button. As in this example. I implemented this and it works perfectly. As an added bonus the custom column with the 'Play' button can be widened and then positioning the mouse anywhere in that custom column -- not just directly over the 'Play' icon -- can trigger it. So, I was able to make that column fairly wide giving an ample sized target for the mouse.

You have no idea how many times I will be clicking on those little 'Play' buttons in this particular use.

Thank You!!!

Re: Shift+Click on Path column to open new tab

Posted: 11 Aug 2023 12:38
by sasumner
Nice solution, highend ; bonus points for a mod to it that auto-selects the item (from the Quick Search's Name column) when the new tab opens?

Re: Shift+Click on Path column to open new tab

Posted: 11 Aug 2023 13:18
by highend
Not really difficult...

Code: Select all

    if (<cc_isfolder>) {
        tab("new", <cc_item>);
    } else {
        $file = <cc_name>;
        tab("new", <cc_path>);
        selectitems $file;
    }

Re: Shift+Click on Path column to open new tab

Posted: 12 Aug 2023 13:42
by sasumner
Nice work to select the item; but if the containing folder has a large number of items, and the item-to-select is not near the top, the selected item isn't shown to me (unless I manually scroll down looking for it).

My solution was to add this line after the selectitems $file; line:

Code: Select all

        sel "+0"; focus;  // scroll selected item into user's view

Re: Shift+Click on Path column to open new tab

Posted: 12 Aug 2023 14:09
by admin
The next version makes it a little easier:

Code: Select all

    * SC tab("new"): Now you can pass a file path in the data argument, and the new tab 
      will open at the containing folder and the file will be focused and selected.

Re: Shift+Click on Path column to open new tab

Posted: 12 Aug 2023 14:28
by highend
It would be cool if "newb" would support that as well!

Re: Shift+Click on Path column to open new tab

Posted: 12 Aug 2023 15:12
by admin
OK, but there is a little caveat:

Code: Select all

      Works as well for tab("newb") but on selecting the tab the selected item is not 
      automatically moved into view.
Forget it, I made it work. :)

Re: Shift+Click on Path column to open new tab

Posted: 12 Aug 2023 15:54
by highend
:tup:

Re: Shift+Click on Path column to open new tab

Posted: 12 Aug 2023 18:10
by highend
I'm using this with the new beta:

Code: Select all

    $where = "newb";
    if (<get trigger callshift> == 1) { $where = "new"; }
    tab($where, <cc_item>);
I like to open tabs as background ones (don't need to leave the open search for this) and only with shift directly...