Title Bar - specify custom text

Have a suggestion for "Everything"? Please post it here.
Post Reply
meteorquake
Posts: 505
Joined: Thu Dec 15, 2016 9:44 pm

Title Bar - specify custom text

Post by meteorquake »

Often I'll have several Everything windows open on different folders. On the W10 taskbar the task title just shows the same truncated path for all, which makes it difficult to locate them.
It would be useful if a manual title could be given, using a macro type code eg ttl:pinea -- it would then persist as you adjust the search for as long as you retain it with your adjustments. (You could also have an menu item called 'Title' under View but you'd have to deal with the question of whether permanent or not for the given window.)
This (ttl: or similar) would be a great help and I suspect pretty easy to implement.
d
void
Developer
Posts: 16775
Joined: Fri Oct 16, 2009 11:31 pm

Re: Title Bar - specify custom text

Post by void »

You could do this now with the nop: search function:

nop:"my window title"

The nop: function does nothing.

nop:"my window title" - Everything would be shown in the Window title bar or taskbar tooltip.
Unfortunately, this would prefix the title with nop:

I will work on improving the title format for the next alpha update.
tuska
Posts: 1052
Joined: Thu Jul 13, 2017 9:14 am

Re: Title Bar - specify custom text

Post by tuska »

void wrote: Tue Mar 15, 2022 6:27 am I will work on improving the title format for the next alpha update.
Can you please include this topic as well? -> Everything - Version No. in header
Example:

Everything.ini

Code: Select all

window_title_format=$t $v$i?{ - ($i)}#if:<#isadmin:, - [Administrator]>
Header:
Everything 1.5.0.1304a (x64) - my window title
meteorquake
Posts: 505
Joined: Thu Dec 15, 2016 9:44 pm

Re: Title Bar - specify custom text

Post by meteorquake »

Cheers! nop: is definitely a good interim workaround, I've now set it to be launched in that way from my species database.
David
tuska
Posts: 1052
Joined: Thu Jul 13, 2017 9:14 am

Re: Title Bar - specify custom text

Post by tuska »

I would like to add the following to my suggestion above ("text behind"): --> "text in front".

nopTXTinfront:"my window title -"
nopTXTinfront:"(1)", ...

nopTXTbehind:"- my window title"

Examples - Header:
my window title - Everything 1.5.0.1304a (x64)
(1) Everything 1.5.0.1304a (x64)
(2) Everything 1.5.0.1304a (x64)
[1] Everything 1.5.0.1304a (x64)
[2] Everything 1.5.0.1304a (x64)
----------------------------------------
Everything 1.5.0.1304a (x64) - my window title
tuska
Posts: 1052
Joined: Thu Jul 13, 2017 9:14 am

Re: Title Bar - specify custom text

Post by tuska »

I have one last suggestion regarding the header in Everything:
Always after "File" - "New Search Window" <Ctrl+N> a running instance number should be added at the front automatically,
e.g. in this form: [1], [2], etc. This would make it easier to e.g. return to the first window when several windows are open.

In summary, I would like to see the following - examples of headlines:

Code: Select all

my window title - Everything 1.5.0.1304a (x64)
my window title - Everything 1.5.0.1304a (x64) - (DRIVE-C)
my window title - Everything 1.5.0.1304a (x64) - (PRIVATE)
my window title - Everything 1.5.0.1304a (x64) - [Administrator]

Everything 1.5.0.1304a (x64) - my window title
Everything 1.5.0.1304a (x64) - (DRIVE-C) - my window title
Everything 1.5.0.1304a (x64) - (PRIVATE) - my window title
Everything 1.5.0.1304a (x64) - [Administrator] - my window title

Code: Select all

Everything 1.5.0.1304a (x64)
[1] Everything 1.5.0.1304a (x64)					Ctrl+N	"New Search Window"
[2] Everything 1.5.0.1304a (x64)					Ctrl+N	"New Search Window"

my window title - Everything 1.5.0.1304a (x64)
[1] my window title - Everything 1.5.0.1304a (x64)			Ctrl+N	"New Search Window"
[2] my window title - Everything 1.5.0.1304a (x64)			Ctrl+N	"New Search Window"

Everything 1.5.0.1304a (x64) - (DRIVE-C) - my window title
[1] Everything 1.5.0.1304a (x64) - (DRIVE-C) - my window title		Ctrl+N	"New Search Window"
[2] Everything 1.5.0.1304a (x64) - (DRIVE-C) - my window title		Ctrl+N	"New Search Window"
meteorquake
Posts: 505
Joined: Thu Dec 15, 2016 9:44 pm

Re: Title Bar - specify custom text

Post by meteorquake »

If it's critical to spot quickly the instance to return to (if it's not obvious from the title) maybe the other optional option is to have subtly different icons for each new instance, such as a slightly different shade of orange. When jumping around tasks the eye is usually much better at homing in on something by colour than by text.
David
void
Developer
Posts: 16775
Joined: Fri Oct 16, 2009 11:31 pm

Re: Title Bar - specify custom text

Post by void »

Everything 1.5.0.1305a improves window title customization and adds a -define command line option.

The following might be useful:
  • In Everything, type in the following search and press ENTER:
    /window_title_format=#windowtitle:$s?{$s - }$t$i?{ ($i)} $v#if:<#isadmin:, [Administrator]>
  • Launch Everything with:
    Everything.exe -define windowtitle="My Title "
To customize your window title, please see:
Window Title Format


I have one last suggestion regarding the header in Everything:
Always after "File" - "New Search Window" <Ctrl+N> a running instance number should be added at the front automatically,
e.g. in this form: [1], [2], etc. This would make it easier to e.g. return to the first window when several windows are open.
I will consider a window number variable and a total window count variable.
Thank you for the suggestion.



Change the icon for each instance
Window Title Format
tuska
Posts: 1052
Joined: Thu Jul 13, 2017 9:14 am

Re: Title Bar - specify custom text

Post by tuska »

2void
Thank you very much for already taking care of this proposal! :)

/window_title_format=#windowtitle:$s?{$s - }$t$i?{ ($i)} $v#if:<#isadmin:, [Administrator]>
Results:
#windowtitle:Everything 1.5.0.1305a (x64)
#windowtitle:Everything 1.5.0.1305a (x64) [Administrator]
Should be:
/window_title_format=$s?{$s - }$t$i?{ ($i)} $v#if:<#isadmin:, [Administrator]>

Everything.ini
window_title_format=
The default format is: /window_title_format=
$s?{$s - }$t$i?{ ($i)} $v#if:<#isadmin:, [Administrator]>
Using a blank format will also use the default format.
Results: It is new to me, that one can leave window_title_format= blank and get these results... (default) - thank you!
Everything 1.5.0.1305a (x64)
Everything 1.5.0.1305a (x64) [Administrator]
"The default format corresponds to":
/window_title_format=$s?{$s - }$t$i?{ ($i)} $v#if:<#isadmin:, [Administrator]>
__________________________________________________________________
Everything.exe -define windowtitle="My Title "
I could not get this to work.

C:\Tools\Everything\Everything64.exe -define windowtitle="My Title - "
Result: "My Title - " missing
Everything 1.5.0.1305a (x64)

Requested:
C:\Tools\Everything\Everything64.exe -define windowtitleleft="My Title - "
My Title - Everything 1.5.0.1305a (x64)

C:\Tools\Everything\Everything64.exe -define windowtitleright="- My Title"
Everything 1.5.0.1305a (x64) - My Title
__________________________________________________________________
Could you please check this?
Thank you!
void
Developer
Posts: 16775
Joined: Fri Oct 16, 2009 11:31 pm

Re: Title Bar - specify custom text

Post by void »

Thanks for the feedback tuska,

Ah, I see #windowtitle: is showing up when it is undefined.

I will add a #ifdef: (if defined) preprocessor function.
(eg: #ifdef:<windowtitle,#windowtitle:>)

For now, keep the #windowtitle: in your window title format:

/window_title_format=#windowtitle:$s?{$s - }$t$i?{ ($i)} $v#if:<#isadmin:, [Administrator]>

and make sure you call Everything with
Everything.exe -define windowtitle="My Title - "

(If you dont launch Everything with -define, you'll see #windowtitle: in the title bar)


Hopefully when this is up and running you won't need windowtitleleft/windowtitleright as you can just position #windowtitle: anywhere in your format.
tuska
Posts: 1052
Joined: Thu Jul 13, 2017 9:14 am

Re: Title Bar - specify custom text

Post by tuska »

void wrote: Fri Mar 18, 2022 11:28 am For now, keep the #windowtitle: in your window title format:
/window_title_format=#windowtitle:$s?{$s - }$t$i?{ ($i)} $v#if:<#isadmin:, [Administrator]>

and make sure you call Everything with
Everything.exe -define windowtitle="My Title - "
Yes, this works - I get:
My Title - Everything 1.5.0.1305a (x64)

Thank you for your endeavours!
______________________________________
See also: Everything - Version No. in header
void
Developer
Posts: 16775
Joined: Fri Oct 16, 2009 11:31 pm

Re: Title Bar - specify custom text

Post by void »

Everything 1.5.0.1306 adds a #ifdef: preprocessor function and adds support for [function:parameter] syntax.

Please try the following window title format:

/window_title_format=[ifdef:windowtitle,windowtitle:,]$s?{$s - }$t$i?{ ($i)} $v[if:isadmin:," [Administrator]"]

Everything will now omit the custom window title if it is not specified with -define windowtitle="My Title - "
tuska
Posts: 1052
Joined: Thu Jul 13, 2017 9:14 am

Re: Title Bar - specify custom text

Post by tuska »

Thank you for your efforts!
void wrote: Fri Mar 18, 2022 11:28 am Hopefully when this is up and running you won't need windowtitleleft/windowtitleright
as you can just position #windowtitle: anywhere in your format.
void wrote: Fri Apr 08, 2022 7:45 am Please try the following window title format:
/window_title_format=[ifdef:windowtitle,windowtitle:,]$s?{$s - }$t$i?{ ($i)} $v[if:isadmin:," [Administrator]"]
Everything will now omit the custom window title if it is not specified with -define windowtitle="My Title - "
This is what I get...
In my opinion, what is searched for should only be displayed in the search box and not again in the header.
⸺⸺⸺⸺⸺⸺⸺⸺⸺⸺⸺⸺⸺⸺⸺⸺⸺⸺⸺⸺⸺⸺⸺⸺⸺
Everything 1.5.0.1307a (x64)
/window_title_format=[ifdef:windowtitle,windowtitle:,]$s?{$s - }$t$i?{ ($i)} $v[if:isadmin:," [Administrator]"]

Everything.ini
window_title_format=[ifdef:windowtitle,windowtitle:,]$s?{$s - }$t$i?{ ($i)} $v[if:isadmin:," [Administrator]"]
-OR-
window_title_format=
windowtitle= --> NOT present!

Search for: Test.txt
Header ...: Test.txt - Everything 1.5.0.1307a (x64)
⸺⸺⸺⸺⸺⸺⸺⸺⸺⸺⸺⸺⸺⸺⸺⸺⸺⸺⸺⸺⸺⸺⸺⸺⸺
Everything 1.5.0.1307a (x64)
/window_title_format=[ifdef:windowtitle,windowtitle:,]$s?{$s - }$t$i?{ ($i)} $v[if:isadmin:," [Administrator]"]

C:\Tools\Everything\Everything64.exe -define windowtitle="My Title - "

Everything.ini
window_title_format=[ifdef:windowtitle,windowtitle:,]$s?{$s - }$t$i?{ ($i)} $v[if:isadmin:," [Administrator]"]
windowtitle= --> NOT present!

Header ...: My Title - Everything 1.5.0.1307a (x64)

Search for: Test.txt
Header ...: My Title - Test.txt - Everything 1.5.0.1307a (x64)
⸺⸺⸺⸺⸺⸺⸺⸺⸺⸺⸺⸺⸺⸺⸺⸺⸺⸺⸺⸺⸺⸺⸺⸺⸺

This ist what I want...
In my opinion, what is searched for should only be displayed in the search box and not again in the header.
  1. Header ...: Everything 1.5.0.1307a (x64) ***)
    (I think this should be the default setting).
  2. Header ...: My Title - Everything 1.5.0.1307a (x64)
  3. Header ...: Everything 1.5.0.1307a (x64) - My Title
⸺⸺⸺⸺⸺⸺⸺⸺⸺⸺⸺⸺⸺⸺⸺⸺⸺⸺⸺⸺⸺⸺⸺⸺⸺
***)
Everything 1.5.0.1307a (x64)
/window_title_format=$t $v$i?{ - ($i)}#if:<#isadmin:, - [Administrator]>

Everything.ini
window_title_format=$t $v$i?{ - ($i)}#if:<#isadmin:, - [Administrator]>

Search for: Test.txt
Header ...: Everything 1.5.0.1307a (x64)
⸺⸺⸺⸺⸺⸺⸺⸺⸺⸺⸺⸺⸺⸺⸺⸺⸺⸺⸺⸺⸺⸺⸺⸺⸺
"Administrator" not tested.
⸺⸺⸺⸺⸺⸺⸺⸺⸺⸺⸺⸺⸺⸺⸺⸺⸺⸺⸺⸺⸺⸺⸺⸺⸺

Please check again.
tuska
Posts: 1052
Joined: Thu Jul 13, 2017 9:14 am

Re: Title Bar - specify custom text

Post by tuska »

void - Email from 9.4.2022 wrote: > windowtitle= --> NOT present!
There is no windowtitle ini setting.

This is a preprocessor define, it doesn't have to be called windowtitle, you can name it anything you like.
You can also have as many preprocessor defines as you like, so you might want to do something like:

window_title_format=[ifdef:windowtitlebefore,windowtitlebefore:,]$s?{$s - }$t$i?{ ($i)} $v[if:isadmin:," [Administrator]"][ifdef:windowtitleafter,windowtitleafter:,]    <-- tuska: no line break - see below...!

Then call:
Everything.exe -define windowtitlebefore="My Before Title - "
or
Everything.exe -define windowtitleafter=" - My After Title"
_________________
tuska: More codes and instructions from @void can be found below in the test examples.
void - Email from 10.4.2022 wrote:The old preprocessor syntax will still work, eg: #if:<#isadmin:, - [Administrator]>
The new syntax should be easier to follow and easier to type from a command prompt: [if:isadmin:," [Administrator]"]
The following might be useful:
- In Everything, type in the code below in the search box and press ENTER - example:
  /window_title_format=$t$i?{ ($i)} $v[if:isadmin:," [Administrator]"][ifdef:mywindowtitle,mywindowtitle:,]
  --> If successful, you should see "window_title_format= ..." in the status bar for a few seconds. <--
- Launch Everything with, e.g.
  C:\Tools\Everything\Everything64.exe -define mywindowtitle=" - My Window Title"   <-- ADJUST PATH if necessary! <--

Here are my test results:
---------------------------------------------------------------------------------------------------------------------------------
Everything [USER]:

==========================================================================================
Test: My Before Title - ... - My After Title

Code: Select all

/window_title_format=[ifdef:windowtitlebefore,windowtitlebefore:,]$s?{$s - }$t$i?{ ($i)} $v[if:isadmin:," [Administrator]"][ifdef:windowtitleafter,windowtitleafter:,]
Start...
C:\Tools\Everything\Everything64.exe -define windowtitlebefore="My Before Title - "
Header: My Before Title - Everything 1.5.0.1308a (x64)
Search: Test.txt
Header: My Before Title - Test.txt - Everything 1.5.0.1308a (x64)

-AND-  (as option)

Start...
C:\Tools\Everything\Everything64.exe -define windowtitleafter=" - My After Title"
Header: My Before Title - Test.txt - Everything 1.5.0.1308a (x64) - My After Title
==========================================================================================
0) Everything.ini - DEFAULT setting

Code: Select all

/window_title_format=
Header: Everything 1.5.0.1308a (x64)
Search: Test.txt
Header: Test.txt - Everything 1.5.0.1308a (x64)     … (Search query in header)
==========================================================================================
1) Header ...: Everything 1.5.0.1308a (x64)

Code: Select all

/window_title_format=$t$i?{ ($i)} $v[if:isadmin:," [Administrator]"]
Header: Everything 1.5.0.1308a (x64)
Search: Test.txt
Header: Everything 1.5.0.1308a (x64)
==========================================================================================
2) Header ...: My Title - Everything 1.5.0.1308a (x64)

Code: Select all

/window_title_format=[ifdef:mywindowtitle,mywindowtitle:,]$t$i?{ ($i)} $v[if:isadmin:," [Administrator]"]
void: Define your custom title from the command line with:
Everything.exe -define mywindowtitle="My Window Title - "
---------------------------------------------------------------------------------------------------------------------------------
Test:
C:\Tools\Everything\Everything64.exe -define mywindowtitle="My Window Title - "
Header: My Window Title - Everything 1.5.0.1308a (x64)
Search: Test.txt
Header: My Window Title - Everything 1.5.0.1308a (x64)
==========================================================================================
3) Header ...: Everything 1.5.0.1308a (x64) - My Title

Code: Select all

/window_title_format=$t$i?{ ($i)} $v[if:isadmin:," [Administrator]"][ifdef:mywindowtitle,mywindowtitle:,]
void: Define your custom title from the command line with:
Everything.exe -define mywindowtitle=" - My Window Title"
---------------------------------------------------------------------------------------------------------------------------------
Test:
C:\Tools\Everything\Everything64.exe -define mywindowtitle=" - My Window Title"
Header: Everything 1.5.0.1308a (x64) - My Window Title
Search: Test.txt
Header: Everything 1.5.0.1308a (x64) - My Window Title
==========================================================================================

Everything [Administrator]: (NOT recommended)
In principle, you get the same test results when you run Everything as an administrator (all examples tested!).

3) Header ...: Everything 1.5.0.1308a (x64) - My Title

Code: Select all

/window_title_format=$t$i?{ ($i)} $v[if:isadmin:," [Administrator]"][ifdef:mywindowtitle,mywindowtitle:,]
void/tuska: Define your custom title from the command line *as Administrator* with:
Everything.exe -define mywindowtitle=" - My Window Title"
---------------------------------------------------------------------------------------------------------------------------------
Test:
C:\Tools\Everything\Everything64.exe -define mywindowtitle=" - My Window Title"     ... as Administrator
Header: Everything 1.5.0.1308a (x64) [Administrator] - My Window Title
Search: Test.txt
Header: Everything 1.5.0.1308a (x64) [Administrator] - My Window Title
==========================================================================================

2void
Thus, all my wishes listed above were fulfilled and even an additional variant was offered. :)

Thank you very much for your efforts!

_________________________________________________
Windows 10 Pro (x64) Version 21H2 (OS build 19044.1620)
'Everything' 1.5.0.1309a (x64) | Window Title Format | Window Caption
Post Reply