Remove outside borders from windows

Hi, [Trying this again since my first post didn't seem to go through. Apologies if you get this twice.] I just started using xmonad, and it's pretty great. One usability issue that I've run into is that the tabs in Google Chrome aren't quite at the top of the screen, i.e. I can move the mouse to the top of the screen and click on a tab. This seems to 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? Thanks, -Zach

Quoting Zach Hirsch
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: 1. make a layout modifier that creates new windows on each side of all the current windows and draws in them (similar to how tabbed layouts currently work) 2. overhaul xmonad to become a reparenting window manager and draw in the parent window Neither of them looks very simple to me. =) ~d

On Fri, Jun 15, 2012 at 12:30:52PM -0400, wagnerdm@seas.upenn.edu wrote:
Quoting Zach Hirsch
: 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... -Brent

Quoting Brent Yorgey
On Fri, Jun 15, 2012 at 12:30:52PM -0400, wagnerdm@seas.upenn.edu wrote:
Quoting Zach Hirsch
: 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: http://xmonad.org/xmonad-docs/xmonad-contrib/XMonad-Layout-ResizeScreen.html ...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! ~d

Oh, cool! This xmonad.hs works for me without any trouble, after using it for 30 minutes or so: import XMonad import XMonad.Layout.NoBorders import XMonad.Layout.ResizeScreen noOutsideBorders = resizeHorizontal n . resizeVertical n . resizeHorizontalRight n . resizeVerticalBottom n where n = -1 myLayoutHook = tiled ||| Mirror tiled ||| full where tiled = noOutsideBorders $ Tall 1 (1/2) (3/100) full = noBorders Full main = xmonad defaultConfig { layoutHook = myLayoutHook } Thanks, -Zach P.S. Gmane's online post interface is really ... interesting.
participants (3)
-
Brent Yorgey
-
wagnerdm@seas.upenn.edu
-
Zach Hirsch