Showing computername in label of Command

Download this and then drag it to the list of scripts in Preferences / Toolbars / Scripts:

Computer Name in Title.js.txt (606 Bytes)


You can edit the 2nd last line to change how the titlebar looks:

function OnInit(initData)
{
	initData.name = "Computer Name in Title";
	initData.version = "1.0";
	initData.copyright = "(c) 2019 Leo Davidson";
	initData.url = "https://resource.dopus.com/t/showing-computername-in-label-of-command/33733";
	initData.desc = "Adds the computer name to lister title bars";
	initData.default_enable = true;
	initData.min_version = "12.17";
}

function OnOpenLister(openListerData)
{
	var cmd = DOpus.Create.Command();
	cmd.SetSourceTab(openListerData.lister.activetab);
	cmd.RunCommand('Set LISTERTITLE "notoggle:%T - Directory Opus - %COMPUTERNAME%"');
}

The %T code turns into the current path (name only). Other codes you can use are listed here under the description of the Custom Title option.

Of course, when the script is installed it will override the Lister Title Bar settings under Preferences / Display / Options.

1 Like