
On Sun, 2008/11/02 19:56:56 -0800, Andrew Sackville-West wrote:
2. a way to get a second xmobar instance to show on a different screen without using Static
Juraj Hercek wrote a patch to support xmobar on a second screen a while ago. I can’t find the patch itself, but I’ve attached an old version of Xmobar.hs with the patch applied. Things have changed since then, but you might be able to get it up to date. However, I think the second instance would show the same info as the first instance, at the same location. You would have to tell the second xmobar to use a different config. On Mon, 2008/11/03 08:29:00 -0800, Andrew Sackville-West wrote:
So I call this a hack because I don't understand what all the coordinates mean in the case statement. I just mimicked the one for Top since that is where I put it anyway. I suspect there needs to be a little math done to a Static position so that it will work in any position. Can anybody provide insight into what those coordinates represent? Then I could possible put together a proper fix.
From http://standards.freedesktop.org/wm-spec/1.3/ar01s05.html : _NET_WM_STRUT_PARTIAL, left, right, top, bottom, left_start_y, left_end_y, right_start_y, right_end_y, top_start_x, top_end_x, bottom_start_x, bottom_end_x,CARDINAL[12]/32 Top -> [ 0 -- 0 pixels wide on the left. , 0 -- 0 pixels wide on the right. , nh -- nh pixels tall on the top. , 0 -- 0 pixels tall on the bottom. , 0 -- Not on the left. , 0 -- Not on the left. , 0 -- Not on the right. , 0 -- Not on the right. , nx -- Its left side is at nx on the top. , nw -- It is nw pixels wide on the top. , 0 -- Not on the bottom. , 0] -- Not on the bottom. As you mentioned, your fix won’t work in all positions (such as the bottom of the screen). The difficulty is how to handle screens that aren’t aligned exactly at their tops and bottoms. For example, screens of two different resolutions, or one screen above another screen, or the second screen to the right and at a vertical offset from the first screen. I would argue that a partial solution that handles the most common cases (yours is a start) would be better than nothing. I also like Juraj’s patch.