How to maximise a window across two monitors?
This is possible by manually telling Compiz the screen output size, using the combined resolution of the two monitors. That's where the limitation kicks in: both displays need to have the same (vertical) resolution for this to make sense (else you'd end up with cut off content on the smaller screen or dead space on the bigger one).
For example, with two monitors with 1920x1080 resolution, you'd:
- Open the CompizConfig Settings Manager (if you haven't already, install the
compizconfig-settings-manager
package) and go to the General Options plugin. - On the Display Settings tab, disable the Detect Outputs checkbox, select the 640x480+0+0 entry and click on Edit,
- Now change this to 3840x1080+0+0 and hit close.
Compiz should now treat your multi-monitor setup as one big output.
Drag your window until it snaps to one edge of first monitor then resize it all the way to the other end of the secondary monitor. It is not real window maximization, but it displays window content wider or higher if monitors are positioned one above other.
You could use xdotool
and setup shortcuts/scripts.
I just did a quick test on a window and in my multi-monitor environment this made a window full screen across both monitors:
xdotool search --name "Untitled"
xdotool windowmove 96469240 -26 4
xdotool windowsize 96469240 110% 110%
I got the -26 4 starting coordinates by putting at top-left and xdotool getwindowgeometry 96469240
And not sure why 100% was not stretching to actually 100% of the monitors...