xmonad-contrib-0.11.2: Third party extensions for xmonad

Portability | unportable
Stability | unstable
Maintainer | andrea.rossato@unibz.it
Safe Haskell | None

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
- 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
- data Theme = Theme {
  - activeColor :: String
  - inactiveColor :: String
  - urgentColor :: String
  - activeBorderColor :: String
  - inactiveBorderColor :: String
  - urgentBorderColor :: String
  - activeTextColor :: String
  - inactiveTextColor :: String
  - urgentTextColor :: String
  - fontName :: String
  - decoWidth :: Dimension
  - decoHeight :: Dimension
  - windowTitleAddons :: [(String, Align)]
  - windowTitleIcons :: [([[Bool]], Placement)]
  }
- defaultTheme :: Theme
- data TabbedDecoration a = Tabbed TabbarLocation TabbarShown
- shrinkText :: DefaultShrinker
- data CustomShrink = CustomShrink
- class (Read s, Show s) => Shrinker s where
  - shrinkIt :: s -> String -> [String]
- data TabbarShown
- data TabbarLocation

# Usage:

You can use this module with the following in your `~/.xmonad/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 defaultTheme ||| Full ||| etc..

and then:

     main = xmonad defaultConfig { 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:

XMonad.Doc.Extending

You can also edit the default configuration options.

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

and

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

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

A tabbed layout with the default xmonad Theme.

This is a minimal working configuration:

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

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

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 aSource

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

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

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

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

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

A bottom-tabbed layout with the default xmonad Theme.

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

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 aSource

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

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

A bottom-tabbed layout with the default xmonad Theme.

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

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

data Theme Source

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

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

Read Theme |
Show Theme |

defaultTheme :: Theme Source

The default xmonad `Theme`.

data TabbedDecoration a Source

Constructors

Tabbed TabbarLocation TabbarShown |

Instances

Eq a => DecorationStyle TabbedDecoration a |
Read (TabbedDecoration a) |
Show (TabbedDecoration a) |

shrinkText :: DefaultShrinker Source

data CustomShrink Source

Constructors

CustomShrink |

Instances

Read CustomShrink |
Show CustomShrink |
Shrinker CustomShrink |

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

Methods

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

Instances

Shrinker DefaultShrinker |
Shrinker CustomShrink |

data TabbarShown Source

Instances

Eq TabbarShown |
Read TabbarShown |
Show TabbarShown |

data TabbarLocation Source

Instances

Read TabbarLocation |
Show TabbarLocation |