[xmonad] Remove outside borders from windows

wagnerdm at seas.upenn.edu wagnerdm at seas.upenn.edu
Sat Jun 16 02:29:35 CEST 2012

Quoting Brent Yorgey <byorgey at seas.upenn.edu>:

> On Fri, Jun 15, 2012 at 12:30:52PM -0400, wagnerdm at seas.upenn.edu wrote:
>> Quoting Zach Hirsch <zhirsch at umich.edu>:
>> >be due to the window borders; using NoBorders fixes this, but it
>> >also removes the borders _between_ windows, which I don't want.
>> >Is there some way to remove just the outside borders?
>> There currently is not. xmonad ships out to X11 for drawing borders,
>> and the borders you can ask X11 to draw are quite rudimentary. If you
>> want to implement this, you have basically two choices:
> Might there be some way to trick xmonad into thinking that the screen
> is slightly larger (e.g. two pixels taller) than it actually is?  I
> haven't actually looked into it, it just occurred to me as a (crazy?)
> possibility...

Really cool idea! It should be very easy to do as a layout modifier,  
and looking through xmonad-contrib, I spotted:


...so using something like

bigger n_ = resizeHorizontal n . resizeVertical n .  
resizeHorizontalRight n . resizeVerticalBottom n
     where n = -n_

-- change 1 to fit your borderWidth, and Full to fit whatever layouts  
you actually want
layoutHook = bigger 1 $ Full

looks like it would fit the bill perfectly. Of course, it is a bit of  
a hack, so there will probably be some odd side-effects. Off the top  
of my head, this seems like it would probably draw borders on the  
other monitor sometimes if you have more than one monitor, and  
probably other things will crop up. But it has the advantage of being  
easy to use right now.

Nice suggestion!

More information about the xmonad mailing list