Toggle active pane

Another file manager has "toggle active pane"
"In Dual Pane mode, one pane is always the active pane, the other one the inactive pane. The inactive pane has a shaded background color (configurable). To activate it click anywhere into the inactive pane, or use the menu command "Toggle Active Pane". You can also configure the TAB key to swap the panes."

Any alternatives ?


Opus works similarly. Which specific aspect are you looking for?

Dual Display in the Basic Concepts section has an intro, but if you're having trouble finding anything specific just ask.

For example :
dropbox.com/s/vnbu2brki6hpy ... 6.MP4?dl=0

In Opus dual pane means you can see two panes side-by-side (or top and bottom) both visible and usable at once, with their own folder tabs:


Having dual panes where one pane is completely invisible and you can only see one pane at a time is not built-in.

There are various ways you could achieve something similar. The best one will depend on exactly what you're aiming for. Folder Tab Groups let you load and save sets of folder tabs, which can be used to remember and later restore or switch between different sets of tabs. Layouts let you load and save the entire window or even multiple windows. Styles are similar to Layouts but only affect one window. Scripts can be used to automate switching between things so you can still have a toggle button if desired.

It's probably best to talk about what you're aiming to do rather than re-creating the exact implementation of how another program allows you to do it, since there may be better ways to achieve your overall goal.

The problem with how DOpus currently does thing is this: You're working with two panes opened with different set of tabs for each. While working in one pane (let's say the left), you need to switch to large thumbnails and you want more workspace so you switch over to single pane temporarily. Then after you do your selections or whatever in your "left" pane (it's in single pane mode now so your left pane is now the main pane), you want to switch back to double pane to move/copy/whatever to the other pane but all the tabs you initially had opened in the other pane (the right in this case), has been reverted back to default tab set. Therefore you have to once again restore those tabs (but what if you did not save them before?) or re-browse back to whatever location you're interested in.

In that other software he/she is talking about, it basically "remembers" the "session" that the other pane had so even when toggling between single and dual pane, it still kept all the opened tabs as before for the inactive/hidden pane. That specific toggle in the screenshot basically just toggle between the tabset in pane "1" and pane "2". This is easier than opening up two separate single pane windows and going down to the taskbar to change between them every time.

Add the Remember parameter to your button for toggling dual-display on and off.

e.g. Set DUAL=Toggle,Remember

Then when you turn it back on it will restore the tabs you were working with before. It only gives you a clean slate by default.

Awesome! Thank you! :smiley:

In fact, you could use that command, run twice in a row, to do the same as shown in the video, since it can close and remember either side.

That's probably better and easier than the other methods, in terms of recreating the behavior. (Whether that behavior is the best way Opus can help you do what you're doing still depends on what you're aiming to do. There may be something even better which you can use Opus to do.)

Leo helped me with a button to do exactly this. It's a Javascript that switches between dual and single pane and (approximately) goes between half or double size as appropriate. Just repeatedly click it to switch between a double-sized single pane or two half-sized dual panes. I use it all the time.

There's commented code to affect the height, but I work with left-right panes, so I commented those out. Change as appropriate for your needs. Button's .dcf file attached for your convenience.

function OnClick(clickData)
{
	var cmd = clickData.func.command; // Get the command object

	// Grab a copy of the lister that was most recently active

	var myLister =      DOpus.Listers.LastActive()

	// Get the current geometry of the lister window

	var currentTop =    myLister.top;
	var currentBottom = myLister.bottom;
	var currentLeft =   myLister.left;
	var currentRight =  myLister.right;
	var currentWidth =  currentRight - currentLeft;
	var currentHeight = currentBottom - currentTop;
	var myNewWidth =    currentWidth;   // In case we don't want to change the width
	var myNewHeight =   currentHeight;   // In case we don't want to change the height
//	var viewMode =      "list"; // Set view mode to list
	var dualMode;

	if (myLister.dual) // Is our lister in dual mode?
	{
		// Yes - Lister is already in dual pane mode
		myNewWidth = currentWidth / 2;  // Halve the width
//		myNewHeight = currentHeight / 2;   // Halve the height
		dualMode = "Off,Right";   // Turn off dual pane mode to put it into single pane
	}
	else
	{
		// No - Lister is single pane mode
		myNewWidth = currentWidth * 2;   // Double the width
//		myNewHeight = currentHeight * 2;   // Double the height
		dualMode = "Toggle,Vert,Remember";   // Turn on dual pane mode vertical and remember the path of right pane
	}
	cmd.RunCommand("Set LISTERSIZE=" + myNewWidth + "," + myNewHeight);   // Resize the lister
	cmd.RunCommand("Set DUAL=" + dualMode);   // Set dual pane or single pane mode
//	cmd.RunCommand("Set VIEW=" + viewMode);   // Set view mode to details
}

Dual Toggler.dcf (2.9 KB)

(Updated to fix typos in comments. No code changed.)

How to use buttons and scripts from this forum - Buttons/Scripts - Directory Opus Resource Centre (dopus.com)