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

Copyright | (c) 2007 Andrea Rossato
License | BSD-style (see xmonad/LICENSE)
Maintainer | andrea.rossato@unibz.it
Stability | unstable
Portability | unportable
Safe Haskell | None
Language | Haskell2010

XMonad.Layout.TabBarDecoration

Contents

- Usage

Description

A layout modifier to add a bar of tabs to your layouts.

Synopsis

- simpleTabBar :: Eq a => l a -> ModifiedLayout (Decoration TabBarDecoration DefaultShrinker) (ModifiedLayout ResizeScreen l) a
- tabBar :: (Eq a, Shrinker s) => s -> Theme -> XPPosition -> l a -> ModifiedLayout (Decoration TabBarDecoration s) l a
- def :: Default a => a
- shrinkText :: DefaultShrinker
- newtype TabBarDecoration a = TabBar XPPosition
- data XPPosition
  - = Top
  - | Bottom
  - | CenteredAt {
    - xpCenterY :: Rational
    - xpWidth :: Rational
    }
- module XMonad.Layout.ResizeScreen

# Usage

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

    import XMonad.Layout.TabBarDecoration

Then edit your `layoutHook` by adding the layout you want:

    main = xmonad def { layoutHook = simpleTabBar $ layoutHook def}

For more detailed instructions on editing the layoutHook see the tutorial and XMonad.Doc.Extending.

`tabBar` will give you the possibility of setting a custom shrinker and a custom theme.

The default theme can be dynamically changed with the xmonad theme selector. See XMonad.Prompt.Theme. For more themes, look at XMonad.Util.Themes

simpleTabBar :: Eq a => l a -> ModifiedLayout (Decoration TabBarDecoration DefaultShrinker) (ModifiedLayout ResizeScreen l) a Source #

Add, on the top of the screen, a simple bar of tabs to a given | layout, with the default theme and the default shrinker.

tabBar :: (Eq a, Shrinker s) => s -> Theme -> XPPosition -> l a -> ModifiedLayout (Decoration TabBarDecoration s) l a Source #

Same of `simpleTabBar`, but with the possibility of setting a custom shrinker, a custom theme and the position: `Top` or `Bottom`.

def :: Default a => a #

shrinkText :: DefaultShrinker Source #

newtype TabBarDecoration a Source #

Constructors

TabBar XPPosition |

#### Instances

Instances details

Eq a => DecorationStyle TabBarDecoration a Source # |

Instance details

Defined in XMonad.Layout.TabBarDecoration

Methods

describeDeco :: TabBarDecoration a -> String Source #

shrink :: TabBarDecoration a -> Rectangle -> Rectangle -> Rectangle Source #

decorationEventHook :: TabBarDecoration a -> DecorationState -> Event -> X () Source #

decorationCatchClicksHook :: TabBarDecoration a -> Window -> Int -> Int -> X Bool Source #

decorationWhileDraggingHook :: TabBarDecoration a -> CInt -> CInt -> (Window, Rectangle) -> Position -> Position -> X () Source #

decorationAfterDraggingHook :: TabBarDecoration a -> (Window, Rectangle) -> Window -> X () Source #

pureDecoration :: TabBarDecoration a -> Dimension -> Dimension -> Rectangle -> Stack a -> [(a, Rectangle)] -> (a, Rectangle) -> Maybe Rectangle Source #

decorate :: TabBarDecoration a -> Dimension -> Dimension -> Rectangle -> Stack a -> [(a, Rectangle)] -> (a, Rectangle) -> X (Maybe Rectangle) Source #

Read (TabBarDecoration a) Source # |
Instance details Defined in XMonad.Layout.TabBarDecoration Methods readsPrec :: Int -> ReadS (TabBarDecoration a) Source # readList :: ReadS [TabBarDecoration a] Source # readPrec :: ReadPrec (TabBarDecoration a) Source # readListPrec :: ReadPrec [TabBarDecoration a] Source #
Show (TabBarDecoration a) Source # |
Instance details Defined in XMonad.Layout.TabBarDecoration Methods showsPrec :: Int -> TabBarDecoration a -> ShowS Source # show :: TabBarDecoration a -> String Source # showList :: [TabBarDecoration a] -> ShowS Source #

data XPPosition Source #

Constructors

Top |
Bottom |
CenteredAt | Prompt will be placed in the center horizontally and in the certain place of screen vertically. If it's in the upper part of the screen, completion window will be placed below (like in `Top`) and otherwise above (like in `Bottom`)

Fields

- xpCenterY :: Rational

  Rational between 0 and 1, giving y coordinate of center of the prompt relative to the screen height.

- xpWidth :: Rational

  Rational between 0 and 1, giving width of the prompt relative to the screen width.

#### Instances

Instances details

Read XPPosition Source # |
Instance details Defined in XMonad.Prompt Methods readsPrec :: Int -> ReadS XPPosition Source # readList :: ReadS [XPPosition] Source # readPrec :: ReadPrec XPPosition Source # readListPrec :: ReadPrec [XPPosition] Source #
Show XPPosition Source # |
Instance details Defined in XMonad.Prompt Methods showsPrec :: Int -> XPPosition -> ShowS Source # show :: XPPosition -> String Source # showList :: [XPPosition] -> ShowS Source #

module XMonad.Layout.ResizeScreen