xmonad-contrib-0.18.0: Community-maintained extensions for xmonad

Copyright | (c) 2022 Tony Zorman
License | BSD3-style (see LICENSE)
Maintainer | Tony Zorman <soliditsallgood@mailbox.org>
Safe Haskell | None
Language | Haskell2010

XMonad.Hooks.ShowWName

Contents

- Usage

Description

Flash the names of workspaces name when switching to them. This is a reimplementation of XMonad.Layout.ShowWName as a logHook.

Synopsis

- showWNameLogHook :: SWNConfig -> X ()
- data SWNConfig = SWNC {
  - swn_font :: String
  - swn_bgcolor :: String
  - swn_color :: String
  - swn_fade :: Rational
  }
- flashName :: SWNConfig -> X ()

# Usage

You can use this module with the following in your `xmonad.hs`:

    import XMonad.Hooks.ShowWName

    main :: IO ()
    main = xmonad $ def
      { logHook = showWNameLogHook def
      }

Whenever a workspace gains focus, the above logHook will flash its name. You can customise the duration of the flash, as well as colours by customising the `SWNConfig` argument that `showWNameLogHook` takes.

Alternatively, you can also bind `flashName` to a key and manually invoke it when you want to know which workspace you are on.

showWNameLogHook :: SWNConfig -> X () #

LogHook for flashing the name of a workspace upon entering it.

data SWNConfig #

Constructors

SWNC |
Fields swn_font :: String Font name swn_bgcolor :: String Background color swn_color :: String String color swn_fade :: Rational Time in seconds of the name visibility

#### Instances

Instances details

Read SWNConfig # |
Instance details Defined in XMonad.Layout.ShowWName Methods readsPrec :: Int -> ReadS SWNConfig # readList :: ReadS [SWNConfig] # readPrec :: ReadPrec SWNConfig # readListPrec :: ReadPrec [SWNConfig] #
Show SWNConfig # |
Instance details Defined in XMonad.Layout.ShowWName Methods showsPrec :: Int -> SWNConfig -> ShowS # show :: SWNConfig -> String # showList :: [SWNConfig] -> ShowS #
Default SWNConfig # |
Instance details Defined in XMonad.Layout.ShowWName Methods def :: SWNConfig #

flashName :: SWNConfig -> X () #

Flash the name of the currently focused workspace.