Finding the right tab

Hey all,

I am wondering if there is a creative idea of how to easily differentiate between listers when hovering above the DOPUS icon in the Windows taskbar (when you see all the listers one next to each other)

I am working normally on 5-6 projects at the time so mostly have min 5 listers open. Sometimes folders repeat between listers, so it can be that 3-4 listers showing the same tab name when I hover above the taskbar to choose the right tab - so I don't know which one I need, therefore spending more time clicking all of them figuring out which is the right one.

One way I made it easier is with 7+ Taskbar Tweaker, so I can reorganize tabs so I try to keep them in the same order.

However, would be much better for example if each lister could have it's Lister Name (from the layouts) showing on top of the tab?
Or maybe colorize the listers?

I tried this script:

but the path it creates confuses more than orients for that display.

Any ideas?

Thanks in advnace
Happy new year!

Elad.

There's an option in Preferences / Display / Options to put the layout name in the titlebar.

Oh perfect! This already helps a lot.
Is it possible to add custom titles to listers (without saving them) so they appear in the tabs as well?

I checked here: https://www.gpsoft.com.au/help/opus12/index.html#!Documents/Prefs/Display_Options.htm
but couldn't find a way to get this to happen

Thanks Leo!

You can change the title of individual windows using the Set LISTERTITLE command.

https://www.gpsoft.com.au/help/opus12/index.html#!Documents/Set.htm

So cool! thank you Leo!

Hey Leo

Everything works fine with your solution, except when I restart OPUS, all the listers I haven't manually re-named are now called "(openlisters) ORIGINAL NAME"
instead of just the original name.

Is there a way to fix this?

Thanks again

Elad.

If you're using Set LISTERTITLE to explicitly give listers names, you could turn off the option in Preferences to add the layout name to the titlebar, since it's not really needed. That option is what adds "(openlisters)" to the title after restarting (since Opus must be configured to re-open any windows that were open when the program was last saved; they get saved into a special layout called "openlisters").

I am using SET LISTERTITLE to give names to listers that are not saved, but would benefit from the temporary naming.

I also want the saved lister titles to appear in the taskbar cause it's super helpful I love this feature.

Right now, with the option in pref ON, it means I'm gonna keep getting "openlisters" in the title after every restart and need to rename them manually)

and with option in pref OFF, the saved listers don't have their title in the taskbar so I have to rename them manually with SET LISTERTITLE

not a huge big deal but maybe I'm missing smth that can give me both options at the same time?

either way thank you !

One solution would be to turn off the prefs option, and then have a script add-in which adds the title to listers that come from layouts. That way all of the special titles would be set via the Set LISTERTITLE command, and they'd all be saved and restored when restarting.

This script shows an example of how to run commands when listers open, and how to look at the layout name when running them. It does some other things you wouldn't need, but would be a good starting point:

If you need more detailed help on that, please link your account.

Hey Leo, that sounds like a perfect solution!

I have not coded since 17 years so I'm a bit rusty on that.
What do you mean by linking my account?

I'm guessing I need a variable that tells the script to make the SET LISTERTITLE but to all saved listers.
Or it must be manually entered for each saved lister?

thanks again

Elad.

Look next to your name at the top of your posts, or click here.

oh my apologies I missed that...
done now!

Download this and drag it to Preferences / Toolbars / Scripts:

LayoutTitles.js.txt (1.3 KB)

(More detailed/futureproof instructions: How to use buttons and scripts from this forum)

You can open it in a text editor and edit the 2nd last line to change what the titlebars look like. Here's the code, for reference:

// This is similar to "Preferences / Display / Options / \Lister title bar: Display layout name".
// But it sets the title in a way that it will be saved if you exit and restart Opus.

function OnInit(initData)
{
	initData.name = "LayoutTitles";
	initData.version = "1.0";
	initData.copyright = "(c) 2021 Leo Davidson";
	initData.url = "https://resource.dopus.com/t/finding-the-right-tab/37515/13";
	initData.desc = "Add layout name to titlebar";
	initData.default_enable = true;
	initData.min_version = "12.0";
}

function OnOpenLister(openListerData)
{
	var layoutName = openListerData.lister.layout;

	// "openlisters" is the special layout used to save windows when Opus is exited and restarted.
	// We want to ignore that layout, so that any titles saved into its listers are left as-is.
	if (layoutName == "" || layoutName == "openlisters")
		return;

	// For all other layouts, set the window title to include their names.
	var cmd = DOpus.Create.Command();
	cmd.SetSourceTab(openListerData.lister.activetab);

	// %N means the name of the current folder.
	// See https://www.gpsoft.com.au/help/opus12/index.html#!Documents/Set.htm for other codes you can use.
	cmd.RunCommand('Set LISTERTITLE="notoggle:' + layoutName + ': %N - Directory Opus');
}

Absolutely amazing!! thanks Leo !!!

1 Like