xmonad-contrib-0.17.1: Community-maintained extensions for xmonad
Copyright(c) 2021 Xiaokui Shu
LicenseBSD-style (see LICENSE)
Maintainersubbyte@gmail.com
Stabilityunstable
Portabilityunportable
Safe HaskellSafe-Inferred
LanguageHaskell2010

XMonad.Hooks.BorderPerWindow

Description

Want to customize border width, for each window on all layouts? Want specific window have no border on all layouts? Try this.

Synopsis

Usage

To use this module, first import it

import XMonad.Hooks.BorderPerWindow (defineBorderWidth, actionQueue)

Then specify which window to customize the border of in your manageHook:

myManageHook :: ManageHook
myManageHook = composeAll
    [ className =? "firefox"  --> defineBorderWidth 0
    , className =? "Chromium" --> defineBorderWidth 0
    , isDialog                --> defineBorderWidth 8
    ]

Finally, add the actionQueue combinator and myManageHook to your config:

main = xmonad $ actionQueue $ def
    { ...
    , manageHook = myManageHook
    , ...
    }

Note that this module is incompatible with other ways of changing borders, like XMonad.Layout.NoBorders. This is because we are changing the border exactly once (when the window first appears) and not every time some condition is satisfied.

actionQueue :: XConfig l -> XConfig l Source #

Every time the logHook runs, execute all actions in the queue.

Design Considerations

  1. Keep it simple. Since the extension does not aim to change border setting when layout changes, only execute the border setting function once to avoid potential window flashingjumpingscaling.
  2. The ManageHook eDSL is a nice language for specifying windows. Let's build on top of it and use it to specify window to define border.