Different listers on different screens


Is it possible to have different lister layouts open on different screens? I have 6 screens, 2 of them in portrait mode and the rest in landscape. I'd like to be able to double press on the portrait screens and get a lister with dual horizontal windows and on the other landscape screens get a lister with dual vertical....

yes, I know, I'm very fussy, but almost expect it from such a good folder manager.... :slight_smile:


Yes, you can.

If you want the different layouts to all be triggered by the same action, with a different layout chosen depending on which screen the mouse is on when the action is triggered (or similar), then you'll need to use a script to do that.

(If you want all the layouts to open at once, that can be done without scripting.)

:slight_smile: Hi,

Thanks for the quick reply.

Ok, so I've not played with scripts (playing with them in Domoticz and other apps, but just not in Opus), any starters for ten would be useful :slight_smile:


After looking, this isn't as easy as I thought, because VBScript/JScript have no access to information about the mouse position or monitor arrangement.

There is a way the script could work fairly easily but only if you have the listers open maximized. If they open maximized then Opus provides the script with the window size and it can be used to decided if it's portrait or landscape. Otherwise, it would have to at least temporarily maximize the lister and then restore it afterwards, which would cause a lot of flashing on the screen every time a window opened.

Hi Leo,

Thanks for looking. When you say VBScript I'm taking it that you mean the normal Windows VBScript, right?

Well (not my original work, but) would this bit of VBScript help in any way. It gives you monitor details?

strComputer = "."
 Set objWMIService = GetObject("winmgmts:" _
     & "{impersonationLevel=impersonate}!\\" & strComputer & "\root\cimv2")  

Set colItems = objWMIService.ExecQuery("Select * from Win32_DesktopMonitor")

For Each objItem in colItems
     wsh.echo "Monitor:"
     Wscript.Echo "Availability: " & objItem.Availability
     Wscript.Echo "Bandwidth: " & objItem.Bandwidth
     Wscript.Echo "Description: " & objItem.Description
     Wscript.Echo "Device ID: " & objItem.DeviceID
     Wscript.Echo "Display Type: " & objItem.DisplayType
     Wscript.Echo "Is Locked: " & objItem.IsLocked
     Wscript.Echo "Monitor Manufacturer: " & objItem.MonitorManufacturer
     Wscript.Echo "Monitor Type: " & objItem.MonitorType
     Wscript.Echo "Name: " & objItem.Name
     Wscript.Echo "Pixels Per X Logical Inch: " & objItem.PixelsPerXLogicalInch
     Wscript.Echo "Pixels Per Y Logical Inch: " & objItem.PixelsPerYLogicalInch
     Wscript.Echo "PNP Device ID: " & objItem.PNPDeviceID
     Wscript.Echo "Screen Height: " & objItem.ScreenHeight
     Wscript.Echo "Screen Width: " & objItem.ScreenWidth

If you can give me a starter for ten on how to write scripts for DOpus and where to put them, ruyn them etc., I'll have a go at building a suitable scripts.

If this doesn't work in DOpus then I'll leave it, but if I'm on the right track then I'll now look for a bit of script to get the mouse position.


Normal VBScript, yes. They run in Opus with some extra objects available, but anything you can do in a normal VBScript should work in Opus as well. Scripting in the manual is the best place to start.

That doesn't give you the monitor's coordinates (only its size), so even with the mouse position you wouldn't be able to know which monitor it was on.

Unfortunately, I don't think there is a good way to get the mouse position, either.

The script could open a window and then adjust it based on which monitor it is on, if that would work. It wouldn't be as good as opening the right window straight away, since it would mean things open, display, and then adjust, with a bit of flickering.

Hi Leo,

Ok, true, but Opus must know which screen has been double clicked to open a lister on it? Could you make this parameter available to the scripting objects - probably a new release, might make me upgrade to Opus 11 :slight_smile:

In the meantime, if I can find a script which tells me which screen the mouse is on and then I can find out if it is portrait or landscape from the above script I should be able to set change the lister view, right?


Yes, we could add the mouse and monitor information to the scripting API. This would be a good use for it. We'll consider it for the future.

The next update will allow for a script like this (which I'll upload to the forum once the required update is released) which will cover what you wanted to do:

Works for monitors as well as arbitrary areas of the screen, so you could also do different things in the left and right halves of a monitor, for example.

11.15.3 (beta) is now available, and I have put the script and instructions here: Trigger actions by the area/screen the mouse is on

Hi Leo,

Sorry for the delay in getting back to you, but just to say "Absolutely Perfect", works like a charm :smiley:

Have now upgraded to Opus 11 and ever since the Amiga daya, this is still the best Directory program - many thanks


I'm using 12.20.8 Beta.

I have 2 monitors:
In front of me 2560x1440 (nr. 1 in WIndows)
To my left 1920x1080 (nr 2 in WIndows)

I've done everything exactly as mentioned. When I now double-click on the desktop on monitor 2, the correct lister layout is opened, but on monitor 1.

How can I fix this?


Did you save the layout with the lister on the monitor you want it to open on?

I did not, but now I did. Now DOpus opens on the 1920x1080 screen with the cooresponding layout, but the left lister is different than the right lister. The left lister now defaults to folder "C:\Program Files\Directory Opus\Prefs". The columns do not match the right lister and the folder tree is as short as possible.

Opening the 1920x1080 lister setup via DOpus on the first monitor works fine. DOpus is opened on the 1920x1080 monitor with both listers as configured.

Presumably you are opening a different layout for each monitor.

You probably want to turn on Preferences / Layouts and Styles / Layouts / Ignore folder formats saved within this layout for both of the layouts you are using, so they don't override your normal columns etc.

You will also want to save the respective layout for each monitor as you want things set up for that monitor. You can't use a single layout for both monitors, if you want them to each be different sizes.

Your suggestion for the option unfortunately had no effect. The Prefs-folder is still opened at startup and the columns are the wrong sizes.
When I open the new lister from the layout menu it works fine. I can make a screenshot or video if that would help.

Nothing discussed in this thread would affect what happens at startup (other than that startup may open windows it remembered were previously open, and those windows may have been opened via the layouts/commands discussed here).

You can change what happens when something triggers the default lister opens (e.g. if something asks for a folder to open, or you click the Opus taskbar icon when it's already running but has no windows open), and when Opus launches (e.g. if it's set to run when Windows boots) under Preferences / Launching Opus, on the Default Lister and Startup pages.

I noticed something: in the post where you explain how to set it up (where the "Area Command"-script is posted), it has as example command "Go Prefs Layout="<My Layout". That explains why the Prefs-folder is opened on startup.
I changed it to the default folder I have opened in the right lister and now it starts in the correct folder.
It now says

Go "D:\Downloads" LAYOUT="1920x1080"

for Area_1_Command. Only the column widths are still not the same as the right lister.

The width of these colums are the same as the with on the lister that is set as default. Setting these column widths to Fill, Auto and Auto for my three columns, saving them and setting it as default lister has no effect.

It doesn't say that. The examples it gives are:

Go NEW (which opens a default lister)

Prefs LAYOUT="My Layout" (which opens a layout called "My Layout").

There is no Go in the second command.

Have you configured the layout to override the normal Folder Formats?

(Make sure Preferences / Layouts and Styles / Layouts / Ignore folder formats saved within this layout is turned off for the layout in question, if you want it to use its stored columns and column sizes.)

You're right, I missed something. The Go should not be in the command. I removed it and now it's working fine, thanks :slight_smile:

1 Like