xmonad-contrib-0.18.0: Community-maintained extensions for xmonad
Copyright(c) 2018 L. S. Leary
2022 Tony Zorman
LicenseBSD3
MaintainerTony Zorman <soliditsallgood@mailbox.org>
Safe HaskellSafe-Inferred
LanguageHaskell2010

XMonad.Layout.SideBorderDecoration

Description

This module allows for having a configurable border position around windows; i.e., it can move the border to any cardinal direction.

Synopsis

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.

Constructors

SideBorderConfig 

Fields

Instances

Instances details
Default SideBorderConfig Source # 
Instance details

Defined in XMonad.Layout.SideBorderDecoration

def :: Default a => a #

The default value for this type.

Re-exports

data Direction2D Source #

Two-dimensional directions:

Constructors

U

Up

D

Down

R

Right

L

Left

Instances

Instances details
Bounded Direction2D Source # 
Instance details

Defined in XMonad.Util.Types

Enum Direction2D Source # 
Instance details

Defined in XMonad.Util.Types

Read Direction2D Source # 
Instance details

Defined in XMonad.Util.Types

Show Direction2D Source # 
Instance details

Defined in XMonad.Util.Types

Eq Direction2D Source # 
Instance details

Defined in XMonad.Util.Types

Ord Direction2D Source # 
Instance details

Defined in XMonad.Util.Types

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).