Is it possible to exclusively open a window/tab with a setting enabled/disabled?

Discussion related to "Everything" 1.5 Alpha.
Post Reply
nikov
Posts: 131
Joined: Fri Dec 24, 2021 10:31 am

Is it possible to exclusively open a window/tab with a setting enabled/disabled?

Post by nikov »

Greetings,
Is it possible to exclusively open a window/tab with a setting enabled/disabled?
Such as this command:

Code: Select all

Everything64.exe -config-value omit_results=0 -search "C:\" -select C:\file.ogg
But this command sets "omit_results=0" for subsequent windows/tabs too but I want this to happen exclusively for the window/tab that is generated by such command.

Or, is there any way to do this?

Thank you.
therube
Posts: 4979
Joined: Thu Sep 03, 2009 6:48 pm

Re: Is it possible to exclusively open a window/tab with a setting enabled/disabled?

Post by therube »

Two quick thoughts...

Use a separate -instance for your omit_results work, maybe call it, -instance OMIT.

Maybe ? a setting in Tools | Options | Home -> Search can be set to un-omit -omit_results ?
nikov
Posts: 131
Joined: Fri Dec 24, 2021 10:31 am

Re: Is it possible to exclusively open a window/tab with a setting enabled/disabled?

Post by nikov »

therube wrote: Mon Mar 11, 2024 2:58 pm
Thank you therube,
Yes, it can be done with multi-instance but it comes with problems/inconveniences. Such as, you always have to copy the whole instance every time you start a search without omit results.
If the instance is big, it will take a lot of time to copy and will take up a lot of additional memory and storage space just to disable a setting.
Then also, you will have to be careful about not to open any new window from that instance for usual search.

Otherwise, if you plan to not copy the whole instance every time and want to reuse the old multi instances, then the problem of maintaining multiple instances comes. In this case, if you want all the instances to look and behave the same, then you will always have to change the settings of all the instances whenever you make a change to any of the instances.
Suppose, you have added a column to instance 1, then you will also have to manually add that column to instance 2, instance 3, etc. to make all the instances' look and behavior same.
That's a lot of things to face just to disable a simple setting for a window/tab. This is overkill.


The solution to this problem can be very easy:
I just noticed that Everything does not follow the config settings while opening a new window, rather it follows the settings of the parent window.

Otherwise these two commands would suffice to solve this problem:

Code: Select all

Command 1: Everything64.exe -config-value omit_results=0 -search "C:\" -select C:\file.ogg
Command 2: Everything64.exe -config-value omit_results=1 -startup
The first command would set "omit_results=0" for only the newly opened "C:\" window.
And the second command would silently set "omit_results=1" for all subsequent windows.

But this would only happen if new window follows the settings of the config, instead of the parent window.
For me, I don't like this behavior of new window following the settings of the parent window, instead of the config. There can be users who may think otherwise.
Thus, an ini setting to toggle this behavior can be helpful, similar to this:
"new_window_follows_config" or "new_window_follows_config" and "new_tab_follows_config"

In short, I tried to mean, there can be an easy solution for this problem. Just my guess.

Isn't it?

Thank you.


Update:
Don't know what is happening inside Everything but the mentioned two commands work only if "home_omit_results=1" and maybe "omit_results_persist=1" is set.
You also mentioned this in your quick thoughts that a setting maybe found in "Tools-->Options-->Home". Yes, but a setting regarding this; is not found here but it is rather found in "Tools-->Options-->Advanced". Maybe will be added later in "Tools-->Options-->Home".
But only setting this setting is not sufficient, you also then have to run the

Code: Select all

Everything64.exe -config-value omit_results=1 -startup
command after the

Code: Select all

Everything64.exe -config-value omit_results=0 -search "C:\" -select C:\file.ogg
command. But it seems like, between these commands maybe a wait is needed to make it more reliable. But how much it should wait? Is 1 second sufficient?

If it works, it works for both new windows and new tabs, which is fine for me.

But this approach may just solve only this problem of "omit_results" setting. This approach does not work for all usable settings/options. Such as, another important setting in this use case can be the "preview_visible" config. And this approach of

Code: Select all

START Everything64.exe -config-value preview_visible=1 -search "C:\" -select C:\file.ogg
TIMEOUT /T 1
START Everything64.exe -config-value preview_visible=0 -startup
does not work for "preview_visible" setting.

Thank you.
nikov
Posts: 131
Joined: Fri Dec 24, 2021 10:31 am

Re: Is it possible to exclusively open a window/tab with a setting enabled/disabled?

Post by nikov »

Previous reply was updated with another example for more clarity.
NotNull
Posts: 5461
Joined: Wed May 24, 2017 9:22 pm

Re: Is it possible to exclusively open a window/tab with a setting enabled/disabled?

Post by NotNull »

Does this work for you? (untested)

Code: Select all

Everything64.exe -search-command "/enable-omit-results" -newwindow
Everything64.exe -newwindow
nikov
Posts: 131
Joined: Fri Dec 24, 2021 10:31 am

Re: Is it possible to exclusively open a window/tab with a setting enabled/disabled?

Post by nikov »

NotNull wrote: Tue Mar 12, 2024 5:10 pm
Thank you NotNull,
I didn't notice about "search-command" method and then I tried in this method:

Code: Select all

Everything64.exe -search-command "/disable-omit-results" -search "C:\" -select C:\file.ogg
But it has a side-effect, it deactivates selection in this case.
Just a guess:
This is happening due to "disable-omit-results" command is applied after Everything is started. (Can be easily seen by clicking "Index-->Enable Result Omissions".)
But this does not happen if "disable-omit-results" command is applied before Everything is started. Such as using "config-value" method, like these commands:

Code: Select all

START Everything64.exe -config-value omit_results=0 -search "C:\" -select C:\file.ogg
TIMEOUT /T 1
START Everything64.exe -config-value omit_results=1 -startup
As I mentioned earlier, although the "config-value" method works well for the "omit_results" setting, it does not work for all settings. Such as, "preview_visible".
Both the "search-command" and "config-value" method fails to exclusively open a window/tab with a preview pane enabled.
This is happening because a new window/tab follows the settings of the parent window/tab, instead of the config.
If you open a new window/tab from a window with a preview pane, Everything opens a new window/tab with the preview pane enabled. Everything does not honor/follow the config, even if you set it with:

Code: Select all

Everything64.exe -config-value preview_visible=0 -startup
, it rather follows the setting of the parent window.

Thank you.
NotNull
Posts: 5461
Joined: Wed May 24, 2017 9:22 pm

Re: Is it possible to exclusively open a window/tab with a setting enabled/disabled?

Post by NotNull »

nikov wrote: Tue Mar 12, 2024 10:06 pm As I mentioned earlier, although the "config-value" method works well for the "omit_results" setting, it does not work for all settings. Such as, "preview_visible".
config-value changes the setting in the INI file ("everything.ini"), so that is a more definitive/permanent way.
What should Everything do if it starts a new window? In my opinion: honor the settings in everything.ini.

nikov wrote: Tue Mar 12, 2024 10:06 pm -config-value preview_visible=0
Try instead with::

Code: Select all

/show-preview
nikov wrote: Tue Mar 12, 2024 10:06 pm Everything64.exe -startup
with -startup, Everything will be started *without* GUI (mainly the database and monitoring parts are loaded).

Not sure, but this command might do nothing as Everything is already loaded.
nikov
Posts: 131
Joined: Fri Dec 24, 2021 10:31 am

Re: Is it possible to exclusively open a window/tab with a setting enabled/disabled?

Post by nikov »

NotNull wrote: Tue Mar 12, 2024 10:21 pm config-value changes the setting in the INI file ("everything.ini"), so that is a more definitive/permanent way.
Yes, that is maybe the reason the setting is applied before Everything starts and also, after 1 second later you are changing it back with the following command:

Code: Select all

START Everything64.exe -config-value omit_results=1 -startup
Also, config-value does not immediately write in the INI file, it maybe first writes in the memory, then when an Everything window is closed, then Everything writes in the INI file.


NotNull wrote: Tue Mar 12, 2024 10:21 pm What should Everything do if it starts a new window? In my opinion: honor the settings in everything.ini.
Yes. It is your opinion too and my opinion too. But Everything honors the settings of the parent window.


NotNull wrote: Tue Mar 12, 2024 10:21 pm Try instead with::

Code: Select all

/show-preview
Tried with:

Code: Select all

Everything64.exe -search-command "/show-preview" -search "C:\" -select C:\file.ogg
, but just like the earlier, it enables preview pane for all the subsequent new windows/tabs because it follows the settings of the parent window instead of the config.


NotNull wrote: Tue Mar 12, 2024 10:21 pm with -startup, Everything will be started *without* GUI (mainly the database and monitoring parts are loaded).

Not sure, but this command might do nothing as Everything is already loaded.
Made some experiments with this "-startup" command and found that, it can be used to silently apply Everything commands. Another command that could do this was "-no-new-window", but it is not completely silent, it defocuses the results window. There can be other ways, but I don't know now.


Thank you.
void
Developer
Posts: 16754
Joined: Fri Oct 16, 2009 11:31 pm

Re: Is it possible to exclusively open a window/tab with a setting enabled/disabled?

Post by void »

Everything 1.5.0.1372a adds the following command line options:

-enable-result-omissions
-disable-result-omissions



Set the default result omissions state with the advanced home_omit_results setting.
nikov
Posts: 131
Joined: Fri Dec 24, 2021 10:31 am

Re: Is it possible to exclusively open a window/tab with a setting enabled/disabled?

Post by nikov »

void wrote: Fri Apr 19, 2024 6:45 am Everything 1.5.0.1372a adds the following command line options:

-enable-result-omissions
-disable-result-omissions



Set the default result omissions state with the advanced home_omit_results setting.
Thank you. But this does not work properly if "Tools->Options...->General->UI->Run in background" or "Tools->Options...->General->UI->Create a new window when running Everything" is checked:

Tested, this does not work properly in those cases:

Code: Select all

Everything64.exe -disable-result-omissions -search "C:\" -select C:\file.ogg
In those cases, "-disable-result-omissions" deactivates the selection of "C:\file.ogg" after few milliseconds.

Note that, it was already mentioned in this thread that, this works properly if "home_omit_results=1" and maybe "omit_results_persist=1":

Code: Select all

START Everything64.exe -config-value omit_results=0 -search "C:\" -select C:\file.ogg
TIMEOUT /T 1
START Everything64.exe -config-value omit_results=1 -startup
Also note that, even if "-disable-result-omissions" worked properly this would not solved the issue of this thread. Because this would only solved the issue for a single setting.

The issue is about a generalized solution which is not specific to just only omit results settings. Such as, the "preview_visible" setting was also discussed here, for which Everything does not honor/follow the config. They were discussed in details in this thread.

Thank you.
void
Developer
Posts: 16754
Joined: Fri Oct 16, 2009 11:31 pm

Re: Is it possible to exclusively open a window/tab with a setting enabled/disabled?

Post by void »

Please don't use -config-value to setup your window.

New tabs/windows inherit settings from the current window.



Please use the window command line options to setup your new window.

For example:

Everything.exe -preview
Everything.exe -no-preview
Everything.exe -enable-result-omissions
Everything.exe -disable-result-omissions



Everything 1.5.0.1373a fixes an issue with -enable-result-omissions/-disable-result-omissions being applied after the new window/tab was created.
nikov
Posts: 131
Joined: Fri Dec 24, 2021 10:31 am

Re: Is it possible to exclusively open a window/tab with a setting enabled/disabled?

Post by nikov »

void wrote: Thu Apr 25, 2024 6:59 am Everything 1.5.0.1373a fixes an issue with -enable-result-omissions/-disable-result-omissions being applied after the new window/tab was created.
Thank you.
Tested. Now, both "-disable-result-omissions" and "-enable-result-omissions" are working nice.


void wrote: Thu Apr 25, 2024 6:59 am Please don't use -config-value to setup your window.
I understand, it is not the preferred way. But previously there was no better choice. Now after the "-enable-result-omissions/-disable-result-omissions" options are added, "-config-value" method is not needed for omit results. But this is only applicable for "omit results" settings.


void wrote: Thu Apr 25, 2024 6:59 am "New tabs/windows inherit settings from the current window."
Can you consider adding an option such that, new tabs/windows inherit settings from the config?
I know, default window setups can be fixed from "Tools->Options...->General->Home", but this is not complete. Such as, it has no option to fix preview pane visibility (or other options). That's why I was just asking to make it more generalized/custom by inheriting settings from the config for new tabs/windows. Or it can be any method that fixes a setting exclusively for a window/tab.


void wrote: Thu Apr 25, 2024 6:59 am Please use the window command line options to setup your new window.

For example:

Everything.exe -preview
Everything.exe -no-preview
Everything.exe -enable-result-omissions
Everything.exe -disable-result-omissions
I don't understand, why you have given the "-preview/-no-preview" command line example? This "-preview" command line option does the opposite of what I am asking for. It cannot exclusively open a window/tab with a preview pane (this does not prevent new windows/tabs from opening a preview pane). Combination of both "-preview" and "-no-preview" does not work either. Thus, it is not a solution for the issue. I don't know, did I fail to make you understand the issue? :(

Thank you.
void
Developer
Posts: 16754
Joined: Fri Oct 16, 2009 11:31 pm

Re: Is it possible to exclusively open a window/tab with a setting enabled/disabled?

Post by void »

Thank you for your feedback nikov,


Can you consider adding an option such that, new tabs/windows inherit settings from the config?
To disable inheriting settings for new windows:
  • In Everything 1.5, from the Tools menu, click Options.
  • Click the Advanced tab on the left.
  • To the right of Show settings containing, search for:
    inherit
  • Select: new_inherit
  • Set the value to: false
  • Click OK.
I am considering renaming this advanced setting to new_window_inherit and adding a new_tab_inherit option.
Implementing new_tab_inherit would be a lot of work..

Closing a window will update your config, so there's no easy way to define the default value yet..


I don't understand, why you have given the "-preview/-no-preview" command line example?
I am not sure what you want here.
It sounds like you want a once off way to show/hide the preview pane.



Including preview: or no-preview: in your search could be used as a once off way to show or hide the preview pane.



-preview/-no-preview will only work for the shown window.
Combine with -new-tab or -new-window (or -no-new-tab or -no-new-window if you have enabled Tools -> Options -> UI -> Create a new window when running Everything)



To always show the preview pane on new tabs/windows:
  • In Everything 1.5, from the Tools menu, click Options.
  • Click the Advanced tab on the left.
  • To the right of Show settings containing, search for:
    home
  • Select: home_add_layout
  • Set the value to: preview
  • Click OK.


To always hide the preview pane on new tabs/windows:
  • In Everything 1.5, from the Tools menu, click Options.
  • Click the Advanced tab on the left.
  • To the right of Show settings containing, search for:
    home
  • Select: home_remove_layout
  • Set the value to: preview
  • Click OK.


preview:
no-preview:
home_add_layout
home_layout
home_remove_layout
nikov
Posts: 131
Joined: Fri Dec 24, 2021 10:31 am

Re: Is it possible to exclusively open a window/tab with a setting enabled/disabled?

Post by nikov »

void wrote: Fri Apr 26, 2024 2:20 am
Thank you for discussing about so many options to achieve this. The "preview:" Search Function and "home_remove_layout" setting is a nice way to do this. But they are not for all config settings.
Also, "new_inherit=0" does not work for all settings, such as disabling the "Size" column still echoes in the subsequent new windows. Also, as closing a window updates config, so this is not much of a use now.

Also note that, not just "new_inherit=0", the "home_remove_layout" also does not work for new tabs.

But they are not a big problem for me for now. As I can use Search Functions and "home_.*" settings to exclusively fix the settings that I find most useful. And also, as I am not much of a tab user for now. So, I will just have to adapt to this for now.

And also thank you for considering these features for new tabs in the future.
void
Developer
Posts: 16754
Joined: Fri Oct 16, 2009 11:31 pm

Re: Is it possible to exclusively open a window/tab with a setting enabled/disabled?

Post by void »

Thank you for your feedback nikov,


Thank you for discussing about so many options to achieve this. The "preview:" Search Function and "home_remove_layout" setting is a nice way to do this. But they are not for all config settings.
There should be search functions that cover all window/view options.
If there is any missing, please let me know.

I need a window category in search functions..

You can lock any config setting with your registry.


Also, "new_inherit=0" does not work for all settings, such as disabling the "Size" column still echoes in the subsequent new windows. Also, as closing a window updates config, so this is not much of a use now.
I think what you are after is a -no-update-config command line option which flags the existing/new-tab/new-window to not update the config on close.
Another step further, there could be a -uninheritable command line option which flags the existing/new-tab/new-window as uninheritable (new-tabs/new-windows will not inherit settings from this window).
Maybe an -exclusive command line option could combine these..


Also note that, not just "new_inherit=0", the "home_remove_layout" also does not work for new tabs.
new_inherit will work for tabs in the next alpha update.
I will consider applying home_remove_layout to new tabs.
nikov
Posts: 131
Joined: Fri Dec 24, 2021 10:31 am

Re: Is it possible to exclusively open a window/tab with a setting enabled/disabled?

Post by nikov »

void wrote: Sat Apr 27, 2024 12:04 am There should be search functions that cover all window/view options.
If there is any missing, please let me know.
Such as, how to exclusively open a window/tab with a specific Theme, Fonts and Colors (this should not affect other past or future windows/tabs and should not be inherited, of course).

This is not that much important to me for now. But you have asked for all window/view options. Maybe some users will find that useful in the future. These are just some examples, still now I didn't search for all settings. That's why I was talking about a generalized simple solution that will inherit settings from a locked config for all new windows/tabs, and changing the layout/settings of one window/tab will not affect others. Otherwise, you will have to search and put all the settings manually by hand, that's I guess a lot of work. I guess, I will have to make a list about which settings are worthy to lock (this is more like a list of more temporary Search Functions or "home_.*" settings).


void wrote: Sat Apr 27, 2024 12:04 am You can lock any config setting with your registry.
Thank you for discussing another option. And this was working nice (tested with "preview_visible=1"). But then I found it cannot lock any config setting, such as "size_column_visible=1". I checked "Help -> Troubleshooting Information" and it shows:
Policy: preview_visible=1

But nothing mentioned about the "size_column_visible=1".
This also does not work for tabs, I guess this will be fixed when "new_inherit" setting will support tabs.


void wrote: Sat Apr 27, 2024 12:04 am I think what you are after is a -no-update-config command line option which flags the existing/new-tab/new-window to not update the config on close.
Another step further, there could be a -uninheritable command line option which flags the existing/new-tab/new-window as uninheritable (new-tabs/new-windows will not inherit settings from this window).
Maybe an -exclusive command line option could combine these..
I didn't find these settings "-no-update-config", "-uninheritable", "-exclusive"; I guess you were talking about hypothetical or in the future. Yes, they would be nice.

Thank you.
void
Developer
Posts: 16754
Joined: Fri Oct 16, 2009 11:31 pm

Re: Is it possible to exclusively open a window/tab with a setting enabled/disabled?

Post by void »

Temporarily setting the font color is probably overkill at this stage.

I will support any window/view options that you can change directly (without going into settings) eg: view -> thumbnails


Thank you for discussing another option. And this was working nice (tested with "preview_visible=1"). But then I found it cannot lock any config setting, such as "size_column_visible=1".
Thanks for bringing this to my attention.
I thought I had a way to lock columns.
My intentions were to only allow locking home columns.
I will look into adding support for locking columns.
nikov
Posts: 131
Joined: Fri Dec 24, 2021 10:31 am

Re: Is it possible to exclusively open a window/tab with a setting enabled/disabled?

Post by nikov »

Thank you,
Also, another thing to note, registry and group policy method is not fully portable. It does support portable Everything. But it needs to store/write settings outside of the portable directory to work. Thus, it is not fully portable method. So, a fully portable method would be nice.
void
Developer
Posts: 16754
Joined: Fri Oct 16, 2009 11:31 pm

Re: Is it possible to exclusively open a window/tab with a setting enabled/disabled?

Post by void »

The Tools -> Options -> Advanced -> new_inherit setting now applies to tabs.



You can now lock columns with the virtual columns ini setting.

For example, in the registry navigate to:
HKEY_LOCAL_MACHINE\SOFTWARE\Policies\voidtools\Everything
Create a New String Value called: columns
Set the Value Data to: [{"name":"Name","width":330},{"name":"Path","width":330},{"name":"Size","width":46},{"name":"Date Modified","width":99}]

This doesn't necessarily lock the columns, it just prevents the config from being updated.
You can still change your columns, but new windows/tabs will always revert back to these columns. (provided new_inherit is disabled)

The preferred method for locking columns is to set your home columns and lock the home column settings.



Using preview: in your search is the best option going forward.
The preview pane is shown temporarily and doesn't update your config.
-no-update-config and -uninheritable might be added in a future release.



Applying home_remove_layout to new tabs was too quirky.
Window options shouldn't be applied on new tabs.



I will consider the option to load a policy.ini from the main Everything.exe folder to also set policies.
Thank you for the suggestion.
nikov
Posts: 131
Joined: Fri Dec 24, 2021 10:31 am

Re: Is it possible to exclusively open a window/tab with a setting enabled/disabled?

Post by nikov »

void wrote: Fri May 10, 2024 6:35 am The Tools -> Options -> Advanced -> new_inherit setting now applies to tabs.
This still does not apply to tabs but applies to only windows: shown below:

file.gif
file.gif (439.25 KiB) Viewed 3374 times


void wrote: Fri May 10, 2024 6:35 am The preferred method for locking columns is to set your home columns and lock the home column settings.
Yes, but this does not support locking column width like the newly added registry and group policy method do. Does it?
So, there is currently no way to do this (locking column width) in a fully portable manner?


void wrote: Fri May 10, 2024 6:35 am Applying home_remove_layout to new tabs was too quirky.
Window options shouldn't be applied on new tabs.
Note that, window options are already applied to tabs for other settings such as column visibility, different tabs can have different column visibility and this also happens for other settings such as, Match Case, Match Diacritics, omit results, etc.
So, why not the same principle should be applied to pane visibility and all possible settings?
The issue is about exclusivity of any setting; this should not look for whether it falls under window options or not.

Also, separate "home_*layout" settings for tabs and windows can be considered, such as, home_remove_layout_tabs & home_remove_layout_windows, home_add_layout_tabs & home_add_layout_windows, home_layout_tabs & home_layout_windows.


void wrote: Fri May 10, 2024 6:35 am -no-update-config and -uninheritable might be added in a future release.
...
I will consider the option to load a policy.ini from the main Everything.exe folder to also set policies.
Thank you for a possible policy.ini, -no-update-config and -uninheritable in the future. They would be very nice.
void
Developer
Posts: 16754
Joined: Fri Oct 16, 2009 11:31 pm

Re: Is it possible to exclusively open a window/tab with a setting enabled/disabled?

Post by void »

Thanks for the gif.


The preferred method for locking columns is to set your home columns and lock the home column settings.
Yes, but this does not support locking column width like the newly added registry and group policy method do. Does it?
Correct, home columns only remembers the order and visibility.


So, there is currently no way to do this (locking column width) in a fully portable manner?
The next alpha update will support a Policy.ini


Note that, window options are already applied to tabs for other settings such as column visibility, different tabs can have different column visibility and this also happens for other settings such as, Match Case, Match Diacritics, omit results, etc.
So, why not the same principle should be applied to pane visibility and all possible settings?
The issue is about exclusivity of any setting; this should not look for whether it falls under window options or not.
A tab has its own search state and view (thumbnails/details) state.
Currently, sidebars are considered outside of the tab, or part of the main window.

Changing a window setting when changing a tab feels off.
A more extreme example would be changing a tab changes the maximized state of the window.

I am considering moving preview panes into the tab, so each tab has it's own preview pane state.
nikov
Posts: 131
Joined: Fri Dec 24, 2021 10:31 am

Re: Is it possible to exclusively open a window/tab with a setting enabled/disabled?

Post by nikov »

Thank you,
But I also want to add,
After some testing I found that registry method's column width lock is not strong as column visibility and position lock of home column settings.
Because column visibility and position lock of home column settings persists in both different tabs and windows but registry method's column width lock does not persist in different tabs.
Registry method's lock is not strong as home settings' lock (Tools->Options...->General->Home's lock). I didn't expect that.

I also want to add,
I think column's three most important settings are visibility, position and width. Thus, they all should be treated same and stay together.
I noticed in Everything there are still two places where user cannot specify/lock column width.
One is in, Tools->Options...->General->Home and another is in, column formula; in these two places user can set column visibility and position but not width.



void wrote: Mon May 13, 2024 8:52 am Changing a window setting when changing a tab feels off.
A more extreme example would be changing a tab changes the maximized state of the window.
Yes, nice point.
But still, even if it looks silly, user should have the freedom to lock/unlock any setting.
This silliness can be resolved if lock is implemented separately for windows and tabs.

Such as, to make it easy to understand, I give an easy hypothetical illustration with your "maximized state" example:
There can be mostly 4 permutations:

Permutation #1:
Policy.ini:
[lock_settings_for_windows]
maximized=1
[lock_settings_for_tabs]
maximized=1
Behavior:
Window: All new windows will be opened maximized. But after that, different windows will have different maximized state.
Tab: All new tabs will be opened maximized. But after that, different tabs will have different maximized state. (The silliness that you are talking about. But still user should have the freedom.)

Permutation #2:
Policy.ini:
[lock_settings_for_windows]
maximized=1
[lock_settings_for_tabs]
; empty
Behavior:
Window: All new windows will be opened maximized. But after that, different windows will have different maximized state.
Tab: All new tabs will be opened inheriting the window's maximized state. Different tabs will inherit window's maximized state. (The current expected behavior that you are talking about.)

Permutation #3:
Policy.ini:
[lock_settings_for_windows]
; empty
[lock_settings_for_tabs]
maximized=1
Behavior:
Window: All new windows will be opened inheriting the current/parent window's maximized state. But after that, different windows will have different maximized state.
Tab: All new tabs will be opened maximized. But after that, different tabs will have different maximized state. (The silliness that you are talking about. But still user should have the freedom.)

Permutation #4:
Policy.ini:
[lock_settings_for_windows]
; empty
[lock_settings_for_tabs]
; empty
Behavior:
Window: All new windows will be opened inheriting the current/parent window's maximized state. But after that, different windows will have different maximized state.
Tab: All new tabs will be opened inheriting the window's maximized state. Different tabs will inherit window's maximized state. (The current expected behavior that you are talking about.)


So, to resolve the silliness, all a user has to do is just not set any "maximized" key in the "lock_settings_for_tabs" section.



void wrote: Mon May 13, 2024 8:52 am I am considering moving preview panes into the tab, so each tab has it's own preview pane state.
That would be nice. But also note that, the current behavior of different tabs sharing the same pane visibility of its window is also a nice feature.
I just tried to mean, both exclusive mode and inclusive mode should be kept. Such that, in the inclusive mode, different tabs&/windows share the same settings, and in the exclusive mode, different tabs and windows uses different settings but new tabs and windows will always open with locked/default settings in the exclusive mode. More precisely, like the hypothetical illustrated example given above.

Thank you.
void
Developer
Posts: 16754
Joined: Fri Oct 16, 2009 11:31 pm

Re: Is it possible to exclusively open a window/tab with a setting enabled/disabled?

Post by void »

I will consider support for saving the column widths under Tools -> Options -> Home.

Thank you for the suggestion.


But still, even if it looks silly, user should have the freedom to lock/unlock any setting.
This silliness can be resolved if lock is implemented separately for windows and tabs.
The next alpha update will add support for the following advanced settings:

new_window_command_line
new_tab_command_line

These customizable command lines will executed when you show a new window/tab.

Example usage:

Code: Select all

new_tab_command_line=-no-preview -columns [{"name":"Name","width":330},{"name":"Path","width":330},{"name":"Size","width":46},{"name":"Date Modified","width":99}]


The above will still have the issue where creating a new tab will close the preview pane in all other tabs for the window.

Using preview: in your exclusive search is the best option for now.



There is also a new no-omit-results: search modified available in Everything 1.5.0.1376a.



Everything 1.5.0.1376a adds support for a Policy.ini
nikov
Posts: 131
Joined: Fri Dec 24, 2021 10:31 am

Re: Is it possible to exclusively open a window/tab with a setting enabled/disabled?

Post by nikov »

void wrote: Sat May 18, 2024 7:07 am I will consider support for saving the column widths under Tools -> Options -> Home.
But, other than the graphical user interface, is "Tools->Options...->General->Home" even necessary after "new_window_command_line" and "new_tab_command_line" are implemented? Because, they are supposed to contain more options than Home settings and more tunable too.


void wrote: Sat May 18, 2024 7:07 am The next alpha update will add support for the following advanced settings:

new_window_command_line
new_tab_command_line
They will be very nice. Don't know whether they support less or more settings than the INI settings but they will contain a lot of settings. I guess, they are very sufficient. Very thank you for that.

But after that, there is another column locking related issue, is that, there is no way to lock/set custom column formula's column width.
This does not go well with locked column width. Suppose, after locking column width if formula added column width cannot be locked, it does not go well.
I tried in various ways to resolve this. Such as, addcolumn:_key_:position:width, _key_-width:=width, using Custom Property columns with Policy.ini and home settings. But, none worked.


void wrote: Sat May 18, 2024 7:07 am The above will still have the issue where creating a new tab will close the preview pane in all other tabs for the window.

Using preview: in your exclusive search is the best option for now.
Yes, not a big problem for now. This feature: whether all tabs should inherit their window's settings or every tab has different settings or both can be implemented later.


void wrote: Sat May 18, 2024 7:07 am There is also a new no-omit-results: search modified available in Everything 1.5.0.1376a.
Yes, tried it, it is working fine. I thought the opposite (omit-results:) will be there but not need it for now. "no-omit-results:" is sufficient for now I guess.


void wrote: Sat May 18, 2024 7:07 am Everything 1.5.0.1376a adds support for a Policy.ini
Checked that, it is working very nice as a portable version of registry method.

Thank you.
void
Developer
Posts: 16754
Joined: Fri Oct 16, 2009 11:31 pm

Re: Is it possible to exclusively open a window/tab with a setting enabled/disabled?

Post by void »

Everything 1.5.0.1378a adds new_tab_command_line and new_window_command_line advanced settings.

These command lines will support most search, results and window options.


But, other than the graphical user interface, is "Tools->Options...->General->Home" even necessary after "new_window_command_line" and "new_tab_command_line" are implemented? Because, they are supposed to contain more options than Home settings and more tunable too.
Yes.
I would like to keep Tools -> Options -> Home simple.
new_tab_command_line/new_window_command_line offer more control.


But after that, there is another column locking related issue, is that, there is no way to lock/set custom column formula's column width.
This does not go well with locked column width. Suppose, after locking column width if formula added column width cannot be locked, it does not go well.
I tried in various ways to resolve this. Such as, addcolumn:_key_:position:width, _key_-width:=width, using Custom Property columns with Policy.ini and home settings. But, none worked.
Please try the virtual columns ini setting in your Policy.ini

Policy.ini:

Code: Select all

[Everything]
columns=[{"name":"Name","width":217},{"name":"Path","width":216},{"name":"Size","width":61},{"name":"Date Modified","width":99},{"name":"Column A","width":128},{"name":"Column 1","width":128}]
The /columns command line option and the columns: search function also now support a JSON array of column objects.


Yes, tried it, it is working fine. I thought the opposite (omit-results:) will be there but not need it for now. "no-omit-results:" is sufficient for now I guess.
omit-results: will be added in the future.
For now, the opposite is:
!result-omissions:

Thank you for the feedback.
nikov
Posts: 131
Joined: Fri Dec 24, 2021 10:31 am

Re: Is it possible to exclusively open a window/tab with a setting enabled/disabled?

Post by nikov »

void wrote: Sat May 25, 2024 7:37 am Please try the virtual columns ini setting in your Policy.ini

Policy.ini:

Code: Select all

[Everything]
columns=[{"name":"Name","width":217},{"name":"Path","width":216},{"name":"Size","width":61},{"name":"Date Modified","width":99},{"name":"Column A","width":128},{"name":"Column 1","width":128}]
The /columns command line option and the columns: search function also now support a JSON array of column objects.
This and "/columns=" are working fine. But problem is: The added columns are always visible, even when they are empty or no formula is in use. I tried to mean the column should only be shown if a formula is working on the column and the column is not empty.
Then tried with "columns:" search function but it is not working:

file.png
file.png (25.2 KiB) Viewed 2666 times


void wrote: Sat May 25, 2024 7:37 am For now, the opposite is:
!result-omissions:
Yes, this seems to work like "omit-results:". Thank you.




Till now a rough (can be wrong) summary of this thread can be (useful for quick glance):

Summary:

In short, for now, to exclusively open a window/tab with specific settings, all you have to do is:
  • Prevent Everything from changing config settings when a tab's/window's setting is changed.

Well you can do this currently in mainly 2 ways (lock and no-lock):
  1. Requires lock: It can be done in 3 ways:
    1. *_command_line setting: First you should lock the settings using *_command_line setting then open a new window/tab with specific settings via commandline.
    2. home_* setting: First you should lock the settings using home_* setting then open a new window/tab with specific settings via commandline.
    3. policy: First you should lock the settings using policy then open a new window/tab with specific settings via commandline.
  2. Requires no lock: It can be done in 1 way:
    1. Search Functions: A setting enabled/disabled with search function does not change config. Thus, you don't need to lock any setting before opening a new window/tab with specific setting via commandline.



Pros and cons of all the methods to solve this issue:

  1. *_command_line setting:
    • Pros:
      1. Locking can be done separately for windows and tabs.
    • Cons:
      1. Does not support all INI settings.
      2. Inheritance cannot be done separately for windows and tabs. Each setting's tabs and windows inheritance behavior is decided by Everything. new_tab_inherit and new_window_inherit is supposed to fix this but not implemented or correctly implemented yet.
      3. Unlike home_* setting, it does not have a GUI.
    • Remarks:
      1. When combined with policy it is supposed to be same as home_* setting but with more settings/controls and without a GUI.
  2. home_* setting:
    • Pros:
      1. Unlike policy+*_command_line setting, it also has a GUI.
    • Cons:
      1. Supports less settings compared to *_command_line setting.
      2. Unlike *_command_line setting, locking cannot be done separately for windows and tabs. Each setting is locked for both tabs and windows.
      3. Inheritance cannot be done separately for windows and tabs. Each setting's tabs and windows inheritance behavior is decided by Everything. new_tab_inherit and new_window_inherit is supposed to fix this but not implemented or correctly implemented yet.
    • Remarks:
      1. Except for the GUI, it is not needed anymore as it is supposed to be same as policy+*_command_line setting but with less settings/controls.
      2. Not all settings are found in the GUI of "Tools->Options...->General->Home", all settings can be found in the INI settings.
  3. policy:
    • Pros:
      1. Supports all INI settings*. *Next alpha update supposed to do this.
    • Cons:
      1. Locking cannot be done separately for windows and tabs. Each setting's tabs and windows locking behavior is decided by Everything. *_command_line setting fixes this but also see their pros & cons.
      2. Inheritance cannot be done separately for windows and tabs. Each setting's tabs and windows inheritance behavior is decided by Everything. new_tab_inherit and new_window_inherit is supposed to fix this but not implemented or correctly implemented yet.
    • Remarks:
      1. This can be done from registry and group policy too and this works for both portable and installed Everything. Registry and group policy variant is useful for system wide control but it also requires storing setting outside of Everything directory to work, thus, registry and group policy variant is not fully portable.
  4. Search Functions:
    • Pros:
      1. old+new tabs and old+new windows are not influenced (don't inherit). Thus, for now, if you don't want old+new tabs and old+new windows to be influenced, this method is preferable as it is currently the only way to do this for some settings. I.e. layout settings.
    • Cons:
      1. Does not support all INI settings.
      2. Inheritance cannot be done separately for windows and tabs. Each setting's tabs and windows inheritance behavior is decided by Everything. new_tab_inherit and new_window_inherit is supposed to fix this but not implemented or correctly implemented yet.
      3. Consumes spaces of search edit box. (seems like a very small or not a big issue)
    • Remarks:
      1. As mentioned above, concept of locking settings does not apply here, as it does not change config in the first place. So, you don't need to lock any setting before opening a new window/tab with specific settings via commandline.


Note: Currently, no method can set inheritance behavior separately for windows and tabs. Each setting's tabs and windows inheritance behavior is decided by Everything. new_tab_inherit and new_window_inherit is supposed to fix this but not implemented or correctly implemented yet.

Note: One just need to try combinations of these above 4 methods and one combination will most likely work, as they should cover most important settings if not all.

Note: This thread's issue does not consider creating a new instance as a method to solve this problem and this was not meant too, as this is overkill, requires too much resources and maintenance. It can have many use cases but not to solve this particular issue. But still mentioned for quick glance summary.


Another thing discussed in this thread is, some settings need to be applied before Everything is started otherwise this creates issues. Only one such setting found till now that was, "omit_results" and it is fixed. Don't know if Everything do this (applying before starting) for all other settings when opened with command-line parameter or by other means.


Thank you.
void
Developer
Posts: 16754
Joined: Fri Oct 16, 2009 11:31 pm

Re: Is it possible to exclusively open a window/tab with a setting enabled/disabled?

Post by void »

Thank you for testing 1378a nikov,

Thank you for the summary.



Everything 1.5.0.1381a adds support for a JSON array of column objects to columns:

For example:

Code: Select all

columns:[{"name":"Name","width":217},{"name":"Path","width":216},{"name":"Size","width":61},{"name":"Date Modified","width":99},{"name":"Column A","width":128},{"name":"Column 1","width":128}]
This wasn't implemented correctly in previous versions.
Thank you for bringing that to my attention.



I will consider an option to only show the formula columns when a formula is specified.

Thank you for the suggestion.

For now, please include the following in your search:

addcol:a


Inheritance cannot be done separately for windows and tabs. Each setting's tabs and windows inheritance behavior is decided by Everything. new_tab_inherit and new_window_inherit is supposed to fix this but not implemented or correctly implemented yet.
new_tab_inherit only applies to per-tab-settings. (for example: match case, columns, thumbnail view, etc...)

new_tab_command_line can be used to apply per-window-settings.
Post Reply