Copyright | (c) 2018 L. S. Leary 2022 Tony Zorman |
---|---|
License | BSD3 |
Maintainer | Tony Zorman <soliditsallgood@mailbox.org> |
Safe Haskell | Safe-Inferred |
Language | Haskell2010 |
This module allows for having a configurable border position around windows; i.e., it can move the border to any cardinal direction.
Synopsis
- sideBorder :: SideBorderConfig -> XConfig l -> XConfig (SideBorder l)
- data SideBorderConfig = SideBorderConfig {
- sbSide :: !Direction2D
- sbActiveColor :: !String
- sbInactiveColor :: !String
- sbSize :: !Dimension
- def :: Default a => a
- data Direction2D
- sideBorderLayout :: Eq a => SideBorderConfig -> l a -> SideBorder l a
Usage
To use this module, first import it into your configuration file:
import XMonad.Layout.SideBorderDecoration
You can now add the sideBorder
combinator to your configuration:
main :: IO () main = xmonad $ … $ sideBorder mySideBorderConfig $ def { … } where mySideBorderConfig :: SideBorderConfig mySideBorderConfig = def { sbSide = D , sbActiveColor = "#ff0000" , sbInactiveColor = "#ffaaaa" , sbSize = 5 }
or, alternatively,
main :: IO () main = xmonad $ … $ sideBorder def{ sbSide = D, sbActiveColor = "#ff000", … } $ def { … }
See SideBorderConfig
for the different size and colour options.
The following is a fully-functional, minimal configuration example:
import XMonad import XMonad.Layout.SideBorderDecoration main :: IO () main = xmonad $ sideBorder def $ def
This would result in the following border being displayed:
sideBorder :: SideBorderConfig -> XConfig l -> XConfig (SideBorder l) Source #
Move the default XMonad border to any of the four cardinal directions.
Note that this function should only be applied once to your
configuration and should not be combined with sideBorderLayout
.
Border configuration
data SideBorderConfig Source #
Configuring how the border looks like.
SideBorderConfig | |
|
Instances
Default SideBorderConfig Source # | |
Defined in XMonad.Layout.SideBorderDecoration def :: SideBorderConfig # |
Re-exports
data Direction2D Source #
Two-dimensional directions:
Instances
Lower-level hooks
sideBorderLayout :: Eq a => SideBorderConfig -> l a -> SideBorder l a Source #
Layout hook to only enable the side border for some layouts. For example:
myLayout = Full ||| sideBorderLayout def tall ||| somethingElse
Note that, unlike sideBorder
, this does not disable the normal
border in XMonad, you will have to do this yourself. Remove this
function from your layout hook and use sideBorder
if you want a
side border in every layout (do not use the two functions together).