[wmii] Dual-monitor setup

From: Jakob <jakob_AT_pipefour.org>
Date: Sun, 7 Oct 2007 14:35:48 -0700

I've had more than one request for my dual-monitor wmii configuration,
so I thought I'd send it out to the list.

Instead of using Xinerama or two completely different X sessions, I use
a single X session with two screens. This allows you to natively move
the cursor from monitor to monitor and share the clipboard between the
two without having to use additional software like Synergy. I use a
dual-output nVidia video card, though this method might/should work if
you have two separate cards.

Relevant xorg.conf sections:


This will allow you to start a single X session with two screens, :x.0
and :x.1. So, if this is the first X session on the box, you can start
programs on both :0.0 (the left monitor) and :0.1 (the right one).

Then, to start two instances of wmii, I have this in my .xinitrc (or
.xsession, depending on your system):

  DISPLAY=:0.0 wmii &
  DISPLAY=:0.1 exec wmii

This can probably be made better so the :0 isn't hardcoded, and so the
second instance isn't just exec'd. This means that if you exit the
first session, the second wmii will still keep going. If you exit the
second one, your entire X session dies regardless of the other wmii

I also have a slightly modified version of swarp to allow me to easily
switch back and forth between my two monitors using hotkeys. In its
current form, it only uses the current display, so I changed it to allow
you to use -d to specify the display (again, this could be cleaned up):


And then in my wmiirc:

  Key $MODKEY-Control-Shift-$RIGHT
      swarp -d :0.1 840 525
  Key $MODKEY-Control-Shift-$LEFT
      swarp -d :0.0 640 515

Yes, those are the hard-coded coordinates of the center of each of my
screens. If you find a better solution, please tell me :).

As my original email said, there's a bug in the current wmii snap with
focus after closing a window, so the focus consistently goes to the
wrong monitor with my setup. If you find this to be too annoying, the
previous snap (20070516) worked fine.

Hope this helps,
Received on Sun Oct 07 2007 - 23:38:05 UTC

This archive was generated by hypermail 2.2.0 : Sun Jul 13 2008 - 16:29:07 UTC