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

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

XMonad.Hooks.ShowWName

Contents

- Usage

Description

Flash the names of workspaces name when switching to them. This is a reimplementation of `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/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 () Source #

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

data SWNConfig Source #

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

flashName :: SWNConfig -> X () Source #

Flash the name of the currently focused workspace.