XMonad.Layout.Renamed

xmonad-contrib-0.12: Third party extensions for xmonad

Copyright | Quentin Moser <moserq@gmail.com>
License | BSD-style (see LICENSE)
Maintainer | orphaned
Stability | unstable
Portability | unportable
Safe Haskell | None
Language | Haskell98

XMonad.Layout.Renamed

Contents

- Usage

Description

Layout modifier that can modify the description of its underlying layout on a (hopefully) flexible way.

Synopsis

- renamed :: [Rename a] -> l a -> ModifiedLayout Rename l a
- data Rename a
  - = CutLeft Int
  - | CutRight Int
  - | Append String
  - | Prepend String
  - | CutWordsLeft Int
  - | CutWordsRight Int
  - | AppendWords String
  - | PrependWords String
  - | Replace String
  - | Chain [Rename a]

# Usage

You can use this module by adding

    import XMonad.Layout.Renamed

to your `~/.xmonad/xmonad.hs`.

You can then use `renamed` to modify the description of your layouts. For example:

    myLayout = renamed [PrependWords "Awesome"] $ tiled ||| Mirror tiled ||| Full

renamed :: [Rename a] -> l a -> ModifiedLayout Rename l a #

Apply a list of `Rename` values to a layout, from left to right.

data Rename a #

The available renaming operations

Constructors

CutLeft Int | Remove a number of characters from the left
CutRight Int | Remove a number of characters from the right
Append String | Add a string on the right
Prepend String | Add a string on the left
CutWordsLeft Int | Remove a number of words from the left
CutWordsRight Int | Remove a number of words from the right
AppendWords String | Add a string to the right, prepending a space to it if necessary
PrependWords String | Add a string to the left, appending a space to it if necessary
Replace String | Repace with another wtring
Chain [Rename a] | Apply a list of modifications in left-to-right order

Instances

LayoutModifier Rename a # |
Methods modifyLayout :: LayoutClass l a => Rename a -> Workspace WorkspaceId (l a) a -> Rectangle -> X ([(a, Rectangle)], Maybe (l a)) # modifyLayoutWithUpdate :: LayoutClass l a => Rename a -> Workspace WorkspaceId (l a) a -> Rectangle -> X (([(a, Rectangle)], Maybe (l a)), Maybe (Rename a)) # handleMess :: Rename a -> SomeMessage -> X (Maybe (Rename a)) # handleMessOrMaybeModifyIt :: Rename a -> SomeMessage -> X (Maybe (Either (Rename a) SomeMessage)) # pureMess :: Rename a -> SomeMessage -> Maybe (Rename a) # redoLayout :: Rename a -> Rectangle -> Maybe (Stack a) -> [(a, Rectangle)] -> X ([(a, Rectangle)], Maybe (Rename a)) # pureModifier :: Rename a -> Rectangle -> Maybe (Stack a) -> [(a, Rectangle)] -> ([(a, Rectangle)], Maybe (Rename a)) # hook :: Rename a -> X () # unhook :: Rename a -> X () # modifierDescription :: Rename a -> String # modifyDescription :: LayoutClass l a => Rename a -> l a -> String #
Eq (Rename a) # |
Methods (==) :: Rename a -> Rename a -> Bool # (/=) :: Rename a -> Rename a -> Bool #
Read (Rename a) # |
Methods readsPrec :: Int -> ReadS (Rename a) # readList :: ReadS [Rename a] # readPrec :: ReadPrec (Rename a) # readListPrec :: ReadPrec [Rename a] #
Show (Rename a) # |
Methods showsPrec :: Int -> Rename a -> ShowS # show :: Rename a -> String # showList :: [Rename a] -> ShowS #