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

Copyright | (c) 2007 Andrea Rossato 2023 Ilya Portnov
License | BSD-style (see xmonad/LICENSE)
Maintainer | portnov84@rambler.ru
Stability | unstable
Portability | unportable
Safe Haskell | None
Language | Haskell2010

XMonad.Layout.DecorationEx.DwmGeometry

Contents

- Usage:

Description

This defines window decorations which are shown as a bar of fixed width on top of window.

Synopsis

- data DwmGeometry a = DwmGeometry {
  - dwmShowForFocused :: !Bool
  - dwmHorizontalPosition :: !Rational
  - dwmDecoHeight :: !Dimension
  - dwmDecoWidth :: !Dimension
  }
- dwmStyleDeco :: Shrinker shrinker => shrinker -> ThemeEx StandardWidget -> l Window -> ModifiedLayout (DecorationEx TextDecoration StandardWidget DwmGeometry shrinker) l Window
- dwmStyleDecoEx :: Shrinker shrinker => shrinker -> DwmGeometry Window -> ThemeEx StandardWidget -> l Window -> ModifiedLayout (DecorationEx TextDecoration StandardWidget DwmGeometry shrinker) l Window

# Usage:

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

    import XMonad.Layout.DecorationEx.DwmStyle

Then edit your `layoutHook` by adding the DwmStyle decoration to your layout:

    myL = dwmStyleDeco shrinkText (layoutHook def)
    main = xmonad def { layoutHook = myL }

For more detailed instructions on editing the layoutHook see:

XMonad.Doc.Extending

data DwmGeometry a #

Decoration geometry data type

Constructors

DwmGeometry |
Fields dwmShowForFocused :: !Bool Whether to show decorations on focused windows dwmHorizontalPosition :: !Rational Horizontal position of decoration rectangle. 0 means place it at left corner, 1 - place it at right corner, `1%2` - place it at center. dwmDecoHeight :: !Dimension Height of decoration rectangle dwmDecoWidth :: !Dimension Width of decoration rectangle

#### Instances

Instances details

DecorationGeometry DwmGeometry Window # |
Instance details Defined in XMonad.Layout.DecorationEx.DwmGeometry Methods describeGeometry :: DwmGeometry Window -> String # shrinkWindow :: DwmGeometry Window -> Rectangle -> Rectangle -> Rectangle # pureDecoration :: DwmGeometry Window -> Rectangle -> Stack Window -> [(Window, Rectangle)] -> (Window, Rectangle) -> Maybe Rectangle # decorateWindow :: DwmGeometry Window -> Rectangle -> Stack Window -> [(Window, Rectangle)] -> (Window, Rectangle) -> X (Maybe Rectangle) #
Default (DwmGeometry a) # |
Instance details Defined in XMonad.Layout.DecorationEx.DwmGeometry Methods def :: DwmGeometry a #
Read (DwmGeometry a) # |
Instance details Defined in XMonad.Layout.DecorationEx.DwmGeometry Methods readsPrec :: Int -> ReadS (DwmGeometry a) # readList :: ReadS [DwmGeometry a] # readPrec :: ReadPrec (DwmGeometry a) # readListPrec :: ReadPrec [DwmGeometry a] #
Show (DwmGeometry a) # |
Instance details Defined in XMonad.Layout.DecorationEx.DwmGeometry Methods showsPrec :: Int -> DwmGeometry a -> ShowS # show :: DwmGeometry a -> String # showList :: [DwmGeometry a] -> ShowS #

dwmStyleDeco #

Arguments

:: Shrinker shrinker |
=> shrinker | Strings shrinker, for example `shrinkText`
-> ThemeEx StandardWidget | Decoration theme (font, colors, widgets, etc)
-> l Window | Layout to be decorated
-> ModifiedLayout (DecorationEx TextDecoration StandardWidget DwmGeometry shrinker) l Window |

Add a decoration to window layout. Widgets are indicated with text fragments using TextDecoration; decoration placement is similar to DWM.

dwmStyleDecoEx #

Arguments

:: Shrinker shrinker |
=> shrinker | Strings shrinker, for example `shrinkText`
-> DwmGeometry Window |
-> ThemeEx StandardWidget | Decoration theme (font, colors, widgets, etc)
-> l Window | Layout to be decorated
-> ModifiedLayout (DecorationEx TextDecoration StandardWidget DwmGeometry shrinker) l Window |

Add a decoration to window layout. Widgets are indicated with text fragments using TextDecoration; decoration placement can be adjusted.