|Copyright||(c) David Roundy <firstname.lastname@example.org>|
|License||BSD3-style (see LICENSE)|
|Maintainer||Spencer Janssen <email@example.com>|
Make a given layout display without borders. This is useful for full-screen or tabbed layouts, where you don't really want to waste a couple of pixels of real estate just to inform yourself that the visible window has focus.
- noBorders :: LayoutClass l Window => l Window -> ModifiedLayout WithBorder l Window
- smartBorders :: LayoutClass l a => l a -> ModifiedLayout SmartBorder l a
- withBorder :: LayoutClass l a => Dimension -> l a -> ModifiedLayout WithBorder l a
- lessBorders :: (SetsAmbiguous p, Read p, Show p, LayoutClass l a) => p -> l a -> ModifiedLayout (ConfigurableBorder p) l a
- class SetsAmbiguous p where
- data Ambiguity
- data With
- type SmartBorder = ConfigurableBorder Ambiguity
- data WithBorder a
- data ConfigurableBorder p w
You can use this module with the following in your ~/.xmonad/xmonad.hs file:
and modify the layouts to call noBorders on the layouts you want to lack borders:
layoutHook = ... ||| noBorders Full ||| ...
For more detailed instructions on editing the layoutHook see:
Removes all window borders from the specified layout.
Removes the borders from a window under one of the following conditions:
- There is only one screen and only one window. In this case it's obvious that it has the focus, so no border is needed.
- A floating window covers the entire screen (e.g. mplayer).
SetsAmbiguous allows custom actions to generate lists of windows that
should not have borders drawn through
To add your own (though perhaps those options would better belong as an
aditional constructor to
Ambiguity), you can add the function as such:
data MyAmbiguity = MyAmbiguity deriving (Read, Show)
instance SetsAmbiguous MyAmbiguity where hiddens _ wset mst wrs = otherHiddens Screen \\ otherHiddens OnlyFloat where otherHiddens p = hiddens p wset mst wrs
The above example is redundant, because you can have the same result with:
layoutHook = lessBorders (Combine Difference Screen OnlyFloat) (Tall 1 0.5 0.03 ||| ... )
To get the same result as
layoutHook = lessBorders Never (Tall 1 0.5 0.03 ||| ...)
In order of increasing ambiguity (less borders more frequently), where
subsequent constructors add additional cases where borders are not drawn
than their predecessors. These behaviors make most sense with with multiple
screens: for single screens,
smartBorders makes more sense.
|Combine With Ambiguity Ambiguity|
This constructor is used to combine the
borderless windows provided by the
SetsAmbiguous instances from two other
Only remove borders on floating windows that cover the whole screen
Never remove borders when ambiguous: this is the same as smartBorders
Focus in an empty screens does not count as ambiguous.
No borders on full when all other screens have borders.
Borders are never drawn on singleton screens. With this one you really need another way such as a statusbar to detect focus.