[SOLVED] Commands for Menu "View" > Preview ... ON/OFF in a bookmark or filter

Discussion related to "Everything" 1.5 Alpha.
Post Reply
tuska
Posts: 1052
Joined: Thu Jul 13, 2017 9:14 am

[SOLVED] Commands for Menu "View" > Preview ... ON/OFF in a bookmark or filter

Post by tuska »

Hi,

e.g. with this bookmark and shortcut I can create my desired default view:

Code: Select all

Name:	 Default View (ALT+Y)
Search:  Custom	-> Field content empty 
Filter:  Everything
Columns: Name;Path;Extension;Size;Total Size;Date Modified;Date Created;Date Accessed;Title;Subject;Tags;Comment;Authors;File List Filename
Sort:    Name ... Ascending
View:    Details
Index:   Local database
Keyboard shortcut: ALT+Y
Search query:

Code: Select all

ext:jpg
Menu "View" > Preview

If I now press ALT+Y (bookmark), I get my desired view, but the preview remains open.

I would like to have commands in a bookmark or filter for the preview that make it possible to switch the preview on or off.
The commands could be entered in the "Search" field, e.g. preview_on: preview_off:

I can switch on the preview for a bookmark as follows: Search > Custom:

Code: Select all

/show-preview

Unfortunately, "Toggle" doesn't help me because I switch on the preview manually:

Code: Select all

/show-preview!

Please check.
Thank you.
_______________________________________________
EDIT: This is solved with nopreview: or preview: in the bookmark
EDIT2: 2x status "SOLVED" changed.
Last edited by tuska on Fri Apr 26, 2024 10:15 am, edited 2 times in total.
void
Developer
Posts: 16665
Joined: Fri Oct 16, 2009 11:31 pm

Re: [SOLVED] Commands for Menu "View" > Preview ... ON/OFF in a bookmark or filter

Post by void »

Add preview: to your search:

ext:jpg preview:



-or-



Use a multi-line bookmark search with the /show-preview search command:

/show-preview
ext:jpg

(Press Alt + Enter to add a new line)



preview:
/show-preview
/hide-preview
/toggle-preview
home_remove_layout
home_layout
home_add_layout
tuska
Posts: 1052
Joined: Thu Jul 13, 2017 9:14 am

Re: [SOLVED] Commands for Menu "View" > Preview ... ON/OFF in a bookmark or filter

Post by tuska »

2void
Thank you for this valuable information!  :)
tuska
Posts: 1052
Joined: Thu Jul 13, 2017 9:14 am

Re: Commands for Menu "View" > Preview ... ON/OFF in a bookmark or filter

Post by tuska »

2void

Unfortunately, there is still the problem that the preview is hidden after executing the shortcut
but some command remains in the search box afterwards.

no-preview: ... is saved in the bookmark: ...
no-preview: ... remains in the search bar (after hiding the preview)

no-preview: ... is saved in the filter: ...
ext:jpg ....... remains in the search bar (after hiding the preview)

Ultimately, a bookmark is required so that the search bar can be cleared after pressing the shortcut.

If the preview: or no-preview: commands have been saved in a bookmark
they should only be executed without being displayed in the search box.
Analogue e.g. to the command /show-preview.
A /no-preview command would help a lot here.

If this is not possible, I have to execute two shortcuts one after the other to restore my standard view:
- ALT+Y clears the search bar with the bookmark and restores my column views
- CTRL+Q hides the preview
(There is always a constellation in which the preview window does not close after ALT+Y).

I constantly need to restore my standard view.
void
Developer
Posts: 16665
Joined: Fri Oct 16, 2009 11:31 pm

Re: Commands for Menu "View" > Preview ... ON/OFF in a bookmark or filter

Post by void »

Please try setting your ALT+Y bookmark search to:

/hide-preview

I need to categorizes the search commands as its difficult to find at the moment:
/hide-preview
tuska
Posts: 1052
Joined: Thu Jul 13, 2017 9:14 am

Re: Commands for Menu "View" > Preview ... ON/OFF in a bookmark or filter

Post by tuska »

void wrote: Fri Apr 26, 2024 7:07 am Please try setting your ALT+Y bookmark search to:

Code: Select all

/hide-preview

Thank you very much!
This command works perfectly in the bookmark!
⸺⸺⸺⸺⸺⸺⸺⸺⸺⸺⸺⸺⸺⸺⸺⸺⸺⸺⸺⸺⸺⸺⸺⸺⸺⸺⸺
Just a note regarding automatic scrolling of the search result:
  1. Perform a search query: ext:jpg preview:
  2. Position the cursor in the search result in the first line on a .jpg file, e.g. Test.jpg
  3. Press CTRL+Q Preview ON
  4. Press ALT+Y  Preview OFF, the search box is emptied, column view/standard view is restored!
    1. Undesirable side effect:
      After pressing Alt+Y, the "Test.jpg" file is scrolled down from the first line
      to the last visible line at the bottom of the window (above the status bar).
At some point I would like the scrollbar to be moved to the top instead of somewhere, e.g. in the centre of the search result.
The scroll bar should be scrolled all the way to the top until the first line of the search result is visible (below the search box).
⸺⸺⸺⸺⸺⸺⸺⸺⸺⸺⸺⸺⸺⸺⸺⸺⸺⸺⸺⸺⸺⸺⸺⸺⸺⸺⸺
Thank you again for your efforts!
void
Developer
Posts: 16665
Joined: Fri Oct 16, 2009 11:31 pm

Re: Commands for Menu "View" > Preview ... ON/OFF in a bookmark or filter

Post by void »

Everything should be resetting the vertical scroll position on search.

Are the following settings enabled or disabled:
Tools -> Options -> Results -> Clear selection on search
Tools -> Options -> Advanced -> clear_focus_on_search (this is bugged and is currently bringing the focus into view when enabled)
Tools -> Options -> Advanced -> reset_vscroll_on_search
Tools -> Options -> Advanced -> show_focus_on_search
tuska
Posts: 1052
Joined: Thu Jul 13, 2017 9:14 am

Re: Commands for Menu "View" > Preview ... ON/OFF in a bookmark or filter

Post by tuska »

void wrote: Fri Apr 26, 2024 9:27 am Are the following settings enabled or disabled: ...
✅     Tools -> Options -> Results     -> Clear selection on search
false   Tools -> Options -> Advanced -> clear_focus_on_search (this is bugged and is currently bringing the focus into view when enabled)
true   Tools -> Options -> Advanced -> reset_vscroll_on_search
true   Tools -> Options -> Advanced -> show_focus_on_search

Wow, clear_focus_on_search = true did the trick!

Thanks again!
For me, the issue is resolved!

PS:
__________________________
This solution would also work:
clear_focus_on_search = false
reset_vscroll_on_search = true
show_focus_on_search = false
Last edited by tuska on Fri Apr 26, 2024 10:30 am, edited 1 time in total.
void
Developer
Posts: 16665
Joined: Fri Oct 16, 2009 11:31 pm

Re: [SOLVED] Commands for Menu "View" > Preview ... ON/OFF in a bookmark or filter

Post by void »

I recommend leaving clear_focus_on_search set to false and setting show_focus_on_search to false.
tuska
Posts: 1052
Joined: Thu Jul 13, 2017 9:14 am

Re: [SOLVED] Commands for Menu "View" > Preview ... ON/OFF in a bookmark or filter

Post by tuska »

void wrote: Fri Apr 26, 2024 10:26 am I recommend leaving clear_focus_on_search set to false and setting show_focus_on_search to false.
Thank you, I changed that immediately!
I have just discovered this solution as well (please see above).

____________________________________________________
Windows 11 Pro (x64) Version 23H2 (Build 22631.3527)
'Everything' 1.5.0.1373a (x64) - "Portable on system drive C:"
tuska
Posts: 1052
Joined: Thu Jul 13, 2017 9:14 am

Re: [SOLVED] Commands for Menu "View" > Preview ... ON/OFF in a bookmark or filter

Post by tuska »

SUMMARY - Create a "DEFAULT VIEW" with a bookmark (example) - Shortcut ALT+Y
  1. Bookmark (example only!)
    1. Name: Default View (ALT+Y) | viewtopic.php?t=14954 [<-- copy the link]
      Match case ... Regular expressions: Disabled
      Search: Custom -> Field content...
                                  /hide-preview    <-- command, then press ALT+ENTER to add a new line...
                                                            <-- new line (blank)
      Filter: Everything
      Columns:
      Name;Path;Extension;Size;Total Size;Date Modified;Date Created;Date Accessed;Title;Subject;Tags;Comment;Authors;File List Filename
      Sort: Name ... Ascending
      View: Details
      Index: Local database
      Macro: Field left blank
      Keyboard shortcut: ALT+Y
  2. Everything Options - 1.5.0.1373a (x64)
    1. Tools -> Options -> Results     -> ✅ Clear selection on search
    2. Tools -> Options -> Advanced -> clear_focus_on_search     false
    3. Tools -> Options -> Advanced -> reset_vscroll_on_search   true
    4. Tools -> Options -> Advanced -> show_focus_on_search     false
  3. Search Functions
    1. preview:
  4. Search Commands
    1. /show-preview
    2. /hide-preview
    3. /toggle-preview
    4. Text
  5. INI Settings
    1. home_remove_layout
    2. home_layout
    3. home_add_layout
  6. Option: Multi-line bookmark search
    1. Name:      Show preview for ext:jpg | viewtopic.php?p=66861#p66861 [<-- copy the link]
      Search:    Custom -> Field content...
                      /show-preview    <-- command, then press ALT+ENTER to add a new line...
                      ext:jpg                <-- search query in new line
 
If the shortcut ALT+Y is pressed, the DEFAULT VIEW saved in the bookmark is RESTORED.

The settings in the aforementioned bookmark correspond in principle to the settings under
Tools -> Everything Options - 1.5.0.1373a (x64) -> Home: ... Search: Custom -> Field left blank, etc.
These settings are called up automatically when Everything is started.
Post Reply