I want a convenient way to switch between single & dual pane modes. What I tried doing was creating a custom lister for my single pane mode. But I don't see a way to add that as a button on the toolbar next to the "Lister" drop down (it has convenient buttons for horizontal/vertical dual pane, etc.
A simple way to toggle between the two would be great. In addition, I would also like the window width to increase to make room for a second pane when I switch to dual pane mode. I dislike that it cuts the available size in half without changing the window size.
Similarly, when I toggle back to single pane, I'd like it to reduce the width of the window.
Is this possible? If so, how should I go about doing it?
Those buttons already toggle dual display on and off. If you click them when already in that mode, they'll turn it off.
The Set LISTERSIZE command can be used to adjust the window's width or height by an offset or to a fixed value.
A simple toggle that adds width when turning on the dual display might look like this:
@if:Set DUAL=On
Set DUAL=Off
Set LISTERSIZE=-{dpi|600},0
@if:else
Set DUAL=On
Set LISTERSIZE=+{dpi|600},0
(The {dpi|...} codes ensure you don't need to edit it in the future if you get a monitor with a different scaling factor.)
You could also use the OnListerUIChange scripting event to automatically adjust the window size when the dual display is turned on or off via any method.