XMonad.Layout.Tabbed

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

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

XMonad.Layout.Tabbed

Contents

- Usage:

Description

A tabbed layout for the Xmonad Window Manager

Synopsis

- simpleTabbed :: ModifiedLayout (Decoration TabbedDecoration DefaultShrinker) Simplest Window
- tabbed :: (Eq a, Shrinker s) => s -> Theme -> ModifiedLayout (Decoration TabbedDecoration s) Simplest a
- addTabs :: (Eq a, LayoutClass l a, Shrinker s) => s -> Theme -> l a -> ModifiedLayout (Decoration TabbedDecoration s) l a
- simpleTabbedAlways :: ModifiedLayout (Decoration TabbedDecoration DefaultShrinker) Simplest Window
- tabbedAlways :: (Eq a, Shrinker s) => s -> Theme -> ModifiedLayout (Decoration TabbedDecoration s) Simplest a
- addTabsAlways :: (Eq a, LayoutClass l a, Shrinker s) => s -> Theme -> l a -> ModifiedLayout (Decoration TabbedDecoration s) l a
- simpleTabbedBottom :: ModifiedLayout (Decoration TabbedDecoration DefaultShrinker) Simplest Window
- tabbedBottom :: (Eq a, Shrinker s) => s -> Theme -> ModifiedLayout (Decoration TabbedDecoration s) Simplest a
- addTabsBottom :: (Eq a, LayoutClass l a, Shrinker s) => s -> Theme -> l a -> ModifiedLayout (Decoration TabbedDecoration s) l a
- simpleTabbedLeft :: ModifiedLayout (Decoration TabbedDecoration DefaultShrinker) Simplest Window
- tabbedLeft :: (Eq a, Shrinker s) => s -> Theme -> ModifiedLayout (Decoration TabbedDecoration s) Simplest a
- addTabsLeft :: (Eq a, LayoutClass l a, Shrinker s) => s -> Theme -> l a -> ModifiedLayout (Decoration TabbedDecoration s) l a
- simpleTabbedRight :: ModifiedLayout (Decoration TabbedDecoration DefaultShrinker) Simplest Window
- tabbedRight :: (Eq a, Shrinker s) => s -> Theme -> ModifiedLayout (Decoration TabbedDecoration s) Simplest a
- addTabsRight :: (Eq a, LayoutClass l a, Shrinker s) => s -> Theme -> l a -> ModifiedLayout (Decoration TabbedDecoration s) l a
- simpleTabbedBottomAlways :: ModifiedLayout (Decoration TabbedDecoration DefaultShrinker) Simplest Window
- tabbedBottomAlways :: (Eq a, Shrinker s) => s -> Theme -> ModifiedLayout (Decoration TabbedDecoration s) Simplest a
- addTabsBottomAlways :: (Eq a, LayoutClass l a, Shrinker s) => s -> Theme -> l a -> ModifiedLayout (Decoration TabbedDecoration s) l a
- simpleTabbedLeftAlways :: ModifiedLayout (Decoration TabbedDecoration DefaultShrinker) Simplest Window
- tabbedLeftAlways :: (Eq a, Shrinker s) => s -> Theme -> ModifiedLayout (Decoration TabbedDecoration s) Simplest a
- addTabsLeftAlways :: (Eq a, LayoutClass l a, Shrinker s) => s -> Theme -> l a -> ModifiedLayout (Decoration TabbedDecoration s) l a
- simpleTabbedRightAlways :: ModifiedLayout (Decoration TabbedDecoration DefaultShrinker) Simplest Window
- tabbedRightAlways :: (Eq a, Shrinker s) => s -> Theme -> ModifiedLayout (Decoration TabbedDecoration s) Simplest a
- addTabsRightAlways :: (Eq a, LayoutClass l a, Shrinker s) => s -> Theme -> l a -> ModifiedLayout (Decoration TabbedDecoration s) l a
- data Theme = Theme {
  - activeColor :: String
  - inactiveColor :: String
  - urgentColor :: String
  - activeBorderColor :: String
  - inactiveBorderColor :: String
  - urgentBorderColor :: String
  - activeBorderWidth :: Dimension
  - inactiveBorderWidth :: Dimension
  - urgentBorderWidth :: Dimension
  - activeTextColor :: String
  - inactiveTextColor :: String
  - urgentTextColor :: String
  - fontName :: String
  - decoWidth :: Dimension
  - decoHeight :: Dimension
  - windowTitleAddons :: [(String, Align)]
  - windowTitleIcons :: [([[Bool]], Placement)]
  }
- def :: Default a => a
- data TabbedDecoration a = Tabbed Direction2D TabbarShown
- shrinkText :: DefaultShrinker
- data CustomShrink = CustomShrink
- class (Read s, Show s) => Shrinker s where
  - shrinkIt :: s -> String -> [String]
- data TabbarShown
- data Direction2D
  - = U
  - | D
  - | R
  - | L

# Usage:

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

    import XMonad.Layout.Tabbed

Then edit your `layoutHook` by adding the Tabbed layout:

    myLayout = simpleTabbed ||| Full ||| etc..

or, if you want a specific theme for you tabbed layout:

    myLayout = tabbed shrinkText def ||| Full ||| etc..

and then:

    main = xmonad def { layoutHook = myLayout }

This layout has hardcoded behaviour for mouse clicks on tab decorations: Left click on the tab switches focus to that window. Middle click on the tab closes the window.

The default Tabbar behaviour is to hide it when only one window is open on the workspace. To have it always shown, use one of the layouts or modifiers ending in `Always`.

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

You can also edit the default configuration options.

    myTabConfig = def { inactiveBorderColor = "#FF0000"
                      , activeTextColor = "#00FF00"}

and

    mylayout = tabbed shrinkText myTabConfig ||| Full ||| etc..

simpleTabbed :: ModifiedLayout (Decoration TabbedDecoration DefaultShrinker) Simplest Window #

A tabbed layout with the default xmonad Theme.

This is a minimal working configuration:

    import XMonad
    import XMonad.Layout.Tabbed
    main = xmonad def { layoutHook = simpleTabbed }

tabbed :: (Eq a, Shrinker s) => s -> Theme -> ModifiedLayout (Decoration TabbedDecoration s) Simplest a #

A layout decorated with tabs and the possibility to set a custom shrinker and theme.

addTabs :: (Eq a, LayoutClass l a, Shrinker s) => s -> Theme -> l a -> ModifiedLayout (Decoration TabbedDecoration s) l a #

A layout modifier that uses the provided shrinker and theme to add tabs to any layout.

simpleTabbedAlways :: ModifiedLayout (Decoration TabbedDecoration DefaultShrinker) Simplest Window #

tabbedAlways :: (Eq a, Shrinker s) => s -> Theme -> ModifiedLayout (Decoration TabbedDecoration s) Simplest a #

addTabsAlways :: (Eq a, LayoutClass l a, Shrinker s) => s -> Theme -> l a -> ModifiedLayout (Decoration TabbedDecoration s) l a #

simpleTabbedBottom :: ModifiedLayout (Decoration TabbedDecoration DefaultShrinker) Simplest Window #

A bottom-tabbed layout with the default xmonad Theme.

tabbedBottom :: (Eq a, Shrinker s) => s -> Theme -> ModifiedLayout (Decoration TabbedDecoration s) Simplest a #

A layout decorated with tabs at the bottom and the possibility to set a custom shrinker and theme.

addTabsBottom :: (Eq a, LayoutClass l a, Shrinker s) => s -> Theme -> l a -> ModifiedLayout (Decoration TabbedDecoration s) l a #

A layout modifier that uses the provided shrinker and theme to add tabs to the bottom of any layout.

simpleTabbedLeft :: ModifiedLayout (Decoration TabbedDecoration DefaultShrinker) Simplest Window #

A side-tabbed layout with the default xmonad Theme.

tabbedLeft :: (Eq a, Shrinker s) => s -> Theme -> ModifiedLayout (Decoration TabbedDecoration s) Simplest a #

A layout decorated with tabs and the possibility to set a custom shrinker and theme.

addTabsLeft :: (Eq a, LayoutClass l a, Shrinker s) => s -> Theme -> l a -> ModifiedLayout (Decoration TabbedDecoration s) l a #

A layout modifier that uses the provided shrinker and theme to add tabs to the side of any layout.

simpleTabbedRight :: ModifiedLayout (Decoration TabbedDecoration DefaultShrinker) Simplest Window #

A side-tabbed layout with the default xmonad Theme.

tabbedRight :: (Eq a, Shrinker s) => s -> Theme -> ModifiedLayout (Decoration TabbedDecoration s) Simplest a #

A layout decorated with tabs and the possibility to set a custom shrinker and theme.

addTabsRight :: (Eq a, LayoutClass l a, Shrinker s) => s -> Theme -> l a -> ModifiedLayout (Decoration TabbedDecoration s) l a #

A layout modifier that uses the provided shrinker and theme to add tabs to the side of any layout.

simpleTabbedBottomAlways :: ModifiedLayout (Decoration TabbedDecoration DefaultShrinker) Simplest Window #

A bottom-tabbed layout with the default xmonad Theme.

tabbedBottomAlways :: (Eq a, Shrinker s) => s -> Theme -> ModifiedLayout (Decoration TabbedDecoration s) Simplest a #

addTabsBottomAlways :: (Eq a, LayoutClass l a, Shrinker s) => s -> Theme -> l a -> ModifiedLayout (Decoration TabbedDecoration s) l a #

simpleTabbedLeftAlways :: ModifiedLayout (Decoration TabbedDecoration DefaultShrinker) Simplest Window #

A side-tabbed layout with the default xmonad Theme.

tabbedLeftAlways :: (Eq a, Shrinker s) => s -> Theme -> ModifiedLayout (Decoration TabbedDecoration s) Simplest a #

A layout decorated with tabs and the possibility to set a custom shrinker and theme.

addTabsLeftAlways :: (Eq a, LayoutClass l a, Shrinker s) => s -> Theme -> l a -> ModifiedLayout (Decoration TabbedDecoration s) l a #

simpleTabbedRightAlways :: ModifiedLayout (Decoration TabbedDecoration DefaultShrinker) Simplest Window #

A side-tabbed layout with the default xmonad Theme.

tabbedRightAlways :: (Eq a, Shrinker s) => s -> Theme -> ModifiedLayout (Decoration TabbedDecoration s) Simplest a #

A layout decorated with tabs and the possibility to set a custom shrinker and theme.

addTabsRightAlways :: (Eq a, LayoutClass l a, Shrinker s) => s -> Theme -> l a -> ModifiedLayout (Decoration TabbedDecoration s) l a #

data Theme #

A `Theme` is a record of colors, font etc., to customize a `DecorationStyle`.

For a collection of `Theme`s see XMonad.Util.Themes

Constructors

Theme |
Fields activeColor :: String Color of the active window inactiveColor :: String Color of the inactive window urgentColor :: String Color of the urgent window activeBorderColor :: String Color of the border of the active window inactiveBorderColor :: String Color of the border of the inactive window urgentBorderColor :: String Color of the border of the urgent window activeBorderWidth :: Dimension Width of the border of the active window inactiveBorderWidth :: Dimension Width of the border of the inactive window urgentBorderWidth :: Dimension Width of the border of the urgent window activeTextColor :: String Color of the text of the active window inactiveTextColor :: String Color of the text of the inactive window urgentTextColor :: String Color of the text of the urgent window fontName :: String Font name decoWidth :: Dimension Maximum width of the decorations (if supported by the `DecorationStyle`) decoHeight :: Dimension Height of the decorations windowTitleAddons :: [(String, Align)] Extra text to appear in a window's title bar. Refer to for a use XMonad.Layout.ImageButtonDecoration windowTitleIcons :: [([[Bool]], Placement)] Extra icons to appear in a window's title bar. Inner `[Bool]` is a row in a icon bitmap.

#### Instances

Instances details

Default Theme # | The default xmonad `Theme`.
Instance details Defined in XMonad.Layout.Decoration Methods def :: Theme #
Read Theme # |
Instance details Defined in XMonad.Layout.Decoration Methods readsPrec :: Int -> ReadS Theme # readList :: ReadS [Theme] # readPrec :: ReadPrec Theme # readListPrec :: ReadPrec [Theme] #
Show Theme # |
Instance details Defined in XMonad.Layout.Decoration Methods showsPrec :: Int -> Theme -> ShowS # show :: Theme -> String # showList :: [Theme] -> ShowS #

def :: Default a => a #

The default value for this type.

data TabbedDecoration a #

Constructors

Tabbed Direction2D TabbarShown |

#### Instances

Instances details

Eq a => DecorationStyle TabbedDecoration a # |
Instance details Defined in XMonad.Layout.Tabbed Methods describeDeco :: TabbedDecoration a -> String # shrink :: TabbedDecoration a -> Rectangle -> Rectangle -> Rectangle # decorationEventHook :: TabbedDecoration a -> DecorationState -> Event -> X () # decorationCatchClicksHook :: TabbedDecoration a -> Window -> Int -> Int -> X Bool # decorationWhileDraggingHook :: TabbedDecoration a -> CInt -> CInt -> (Window, Rectangle) -> Position -> Position -> X () # decorationAfterDraggingHook :: TabbedDecoration a -> (Window, Rectangle) -> Window -> X () # pureDecoration :: TabbedDecoration a -> Dimension -> Dimension -> Rectangle -> Stack a -> [(a, Rectangle)] -> (a, Rectangle) -> Maybe Rectangle # decorate :: TabbedDecoration a -> Dimension -> Dimension -> Rectangle -> Stack a -> [(a, Rectangle)] -> (a, Rectangle) -> X (Maybe Rectangle) #
Read (TabbedDecoration a) # |
Instance details Defined in XMonad.Layout.Tabbed Methods readsPrec :: Int -> ReadS (TabbedDecoration a) # readList :: ReadS [TabbedDecoration a] # readPrec :: ReadPrec (TabbedDecoration a) # readListPrec :: ReadPrec [TabbedDecoration a] #
Show (TabbedDecoration a) # |
Instance details Defined in XMonad.Layout.Tabbed Methods showsPrec :: Int -> TabbedDecoration a -> ShowS # show :: TabbedDecoration a -> String # showList :: [TabbedDecoration a] -> ShowS #

shrinkText :: DefaultShrinker #

data CustomShrink #

Constructors

CustomShrink |

#### Instances

Instances details

Read CustomShrink # |
Instance details Defined in XMonad.Layout.Decoration Methods readsPrec :: Int -> ReadS CustomShrink # readList :: ReadS [CustomShrink] # readPrec :: ReadPrec CustomShrink # readListPrec :: ReadPrec [CustomShrink] #
Show CustomShrink # |
Instance details Defined in XMonad.Layout.Decoration Methods showsPrec :: Int -> CustomShrink -> ShowS # show :: CustomShrink -> String # showList :: [CustomShrink] -> ShowS #
Shrinker CustomShrink # |
Instance details Defined in XMonad.Config.Droundy Methods shrinkIt :: CustomShrink -> String -> [String] #

class (Read s, Show s) => Shrinker s where #

Methods

shrinkIt :: s -> String -> [String] #

#### Instances

Instances details

Shrinker CustomShrink # |
Instance details Defined in XMonad.Config.Droundy Methods shrinkIt :: CustomShrink -> String -> [String] #
Shrinker DefaultShrinker # |
Instance details Defined in XMonad.Layout.Decoration Methods shrinkIt :: DefaultShrinker -> String -> [String] #

data TabbarShown #

#### Instances

Instances details

Read TabbarShown # |
Instance details Defined in XMonad.Layout.Tabbed Methods readsPrec :: Int -> ReadS TabbarShown # readList :: ReadS [TabbarShown] # readPrec :: ReadPrec TabbarShown # readListPrec :: ReadPrec [TabbarShown] #
Show TabbarShown # |
Instance details Defined in XMonad.Layout.Tabbed Methods showsPrec :: Int -> TabbarShown -> ShowS # show :: TabbarShown -> String # showList :: [TabbarShown] -> ShowS #
Eq TabbarShown # |
Instance details Defined in XMonad.Layout.Tabbed Methods (==) :: TabbarShown -> TabbarShown -> Bool # (/=) :: TabbarShown -> TabbarShown -> Bool #

data Direction2D #

Two-dimensional directions:

Constructors

U | Up
D | Down
R | Right
L | Left

#### Instances

Instances details

Bounded Direction2D # |
Instance details Defined in XMonad.Util.Types Methods minBound :: Direction2D # maxBound :: Direction2D #
Enum Direction2D # |
Instance details Defined in XMonad.Util.Types Methods succ :: Direction2D -> Direction2D # pred :: Direction2D -> Direction2D # toEnum :: Int -> Direction2D # fromEnum :: Direction2D -> Int # enumFrom :: Direction2D -> [Direction2D] # enumFromThen :: Direction2D -> Direction2D -> [Direction2D] # enumFromTo :: Direction2D -> Direction2D -> [Direction2D] # enumFromThenTo :: Direction2D -> Direction2D -> Direction2D -> [Direction2D] #
Read Direction2D # |
Instance details Defined in XMonad.Util.Types Methods readsPrec :: Int -> ReadS Direction2D # readList :: ReadS [Direction2D] # readPrec :: ReadPrec Direction2D # readListPrec :: ReadPrec [Direction2D] #
Show Direction2D # |
Instance details Defined in XMonad.Util.Types Methods showsPrec :: Int -> Direction2D -> ShowS # show :: Direction2D -> String # showList :: [Direction2D] -> ShowS #
Eq Direction2D # |
Instance details Defined in XMonad.Util.Types Methods (==) :: Direction2D -> Direction2D -> Bool # (/=) :: Direction2D -> Direction2D -> Bool #
Ord Direction2D # |
Instance details Defined in XMonad.Util.Types Methods compare :: Direction2D -> Direction2D -> Ordering # (<) :: Direction2D -> Direction2D -> Bool # (<=) :: Direction2D -> Direction2D -> Bool # (>) :: Direction2D -> Direction2D -> Bool # (>=) :: Direction2D -> Direction2D -> Bool # max :: Direction2D -> Direction2D -> Direction2D # min :: Direction2D -> Direction2D -> Direction2D #