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

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

XMonad.Layout.Groups.Examples

Contents

- Usage
- Example: Row of columns
- Example: Tiled tab groups
- Useful re-exports and utils

Description

Example layouts for XMonad.Layout.Groups.

Synopsis

- rowOfColumns :: Groups (ModifiedLayout Rename (Mirror (ZoomRow ClassEQ))) (ZoomRow GroupEQ) Window
- zoomColumnIn :: X ()
- zoomColumnOut :: X ()
- zoomColumnReset :: X ()
- toggleColumnFull :: X ()
- zoomWindowIn :: X ()
- zoomWindowOut :: X ()
- zoomWindowReset :: X ()
- toggleWindowFull :: X ()
- tallTabs :: Shrinker s => TiledTabsConfig s -> ModifiedLayout Rename (ModifiedLayout (Decoration TabbedDecoration s) (Groups (ModifiedLayout Rename Simplest) (Choose (ModifiedLayout Rename Tall) (Choose (ModifiedLayout Rename (Mirror Tall)) Full)))) Window
- mirrorTallTabs :: Shrinker s => TiledTabsConfig s -> ModifiedLayout Rename (ModifiedLayout (Decoration TabbedDecoration s) (Groups (ModifiedLayout Rename Simplest) (Choose (ModifiedLayout Rename (Mirror Tall)) (Choose Full (ModifiedLayout Rename Tall))))) Window
- fullTabs :: Shrinker s => TiledTabsConfig s -> ModifiedLayout Rename (ModifiedLayout (Decoration TabbedDecoration s) (Groups (ModifiedLayout Rename Simplest) (Choose Full (Choose (ModifiedLayout Rename Tall) (ModifiedLayout Rename (Mirror Tall)))))) Window
- data TiledTabsConfig s = TTC {
  - vNMaster :: Int
  - vRatio :: Rational
  - vIncrement :: Rational
  - hNMaster :: Int
  - hRatio :: Rational
  - hIncrement :: Rational
  - tabsShrinker :: s
  - tabsTheme :: Theme
  }
- def :: Default a => a
- increaseNMasterGroups :: X ()
- decreaseNMasterGroups :: X ()
- shrinkMasterGroups :: X ()
- expandMasterGroups :: X ()
- nextOuterLayout :: X ()
- module XMonad.Layout.Groups.Helpers
- shrinkText :: DefaultShrinker
- data GroupEQ a = GroupEQ
- zoomRowG :: forall a (l :: Type -> Type). (Eq a, Show a, Read a, Show (l a), Read (l a)) => ZoomRow GroupEQ (Group l a)

# Usage

This module contains example `Groups`-based layouts. You can either import this module directly, or look at its source for ideas of how XMonad.Layout.Groups may be used.

You can use the contents of this module by adding

    import XMonad.Layout.Groups.Examples

to the top of your `xmonad.hs`.

For more information on using any of the layouts, jump directly to its "Example" section.

Whichever layout you choose to use, you will probably want to be able to move focus and windows between groups in a consistent manner. For this, you should take a look at the functions from the XMonad.Layout.Groups.Helpers module, which are all re-exported by this module.

For more information on how to extend your layoutHook and key bindings, see the tutorial and XMonad.Doc.Extending.

# Example: Row of columns

A layout that arranges windows in a row of columns. It uses `ZoomRow`s for both, allowing you to:

- Freely change the proportion of the screen width allocated to each column
- Freely change the proportion of a column's heigth allocated to each of its windows
- Set a column to occupy the whole screen space whenever it has focus
- Set a window to occupy its whole column whenever it has focus

to use this layout, add `rowOfColumns` to your layout hook, for example:

    myLayout = rowOfColumns

To be able to change the sizes of columns and windows, you can create key bindings for the relevant actions:

    ((modMask, xK_minus), zoomWindowOut)

and so on.

rowOfColumns :: Groups (ModifiedLayout Rename (Mirror (ZoomRow ClassEQ))) (ZoomRow GroupEQ) Window #

zoomColumnIn :: X () #

Increase the width of the focused column

zoomColumnOut :: X () #

Decrease the width of the focused column

zoomColumnReset :: X () #

Reset the width of the focused column

toggleColumnFull :: X () #

Toggle whether the currently focused column should take up all available space whenever it has focus

zoomWindowIn :: X () #

Increase the heigth of the focused window

zoomWindowOut :: X () #

Decrease the height of the focused window

zoomWindowReset :: X () #

Reset the height of the focused window

toggleWindowFull :: X () #

Toggle whether the currently focused window should take up the whole column whenever it has focus

# Example: Tiled tab groups

A layout which arranges windows into tabbed groups, and the groups themselves according to XMonad's default algorithm (``Tall` ||| `Mirror` `Tall` ||| `Full``). As their names indicate, `tallTabs` starts as `Tall`, `mirrorTallTabs` starts as `Mirror` `Tall` and `fullTabs` starts as `Full`, but in any case you can freely switch between the three afterwards.

You can use any of these three layouts by including it in your layout hook. You will need to provide it with a `TiledTabsConfig` containing the size parameters for `Tall` and `Mirror` `Tall`, and the shrinker and decoration theme for the tabs. If you're happy with defaults, you can use `def`:

    myLayout = tallTabs def

To be able to increase/decrease the number of master groups and shrink/expand the master area, you can create key bindings for the relevant actions:

    ((modMask, xK_h), shrinkMasterGroups)

and so on.

tallTabs :: Shrinker s => TiledTabsConfig s -> ModifiedLayout Rename (ModifiedLayout (Decoration TabbedDecoration s) (Groups (ModifiedLayout Rename Simplest) (Choose (ModifiedLayout Rename Tall) (Choose (ModifiedLayout Rename (Mirror Tall)) Full)))) Window #

mirrorTallTabs :: Shrinker s => TiledTabsConfig s -> ModifiedLayout Rename (ModifiedLayout (Decoration TabbedDecoration s) (Groups (ModifiedLayout Rename Simplest) (Choose (ModifiedLayout Rename (Mirror Tall)) (Choose Full (ModifiedLayout Rename Tall))))) Window #

fullTabs :: Shrinker s => TiledTabsConfig s -> ModifiedLayout Rename (ModifiedLayout (Decoration TabbedDecoration s) (Groups (ModifiedLayout Rename Simplest) (Choose Full (Choose (ModifiedLayout Rename Tall) (ModifiedLayout Rename (Mirror Tall)))))) Window #

data TiledTabsConfig s #

Configuration data for the "tiled tab groups" layout

Constructors

TTC |

Fields

- vNMaster :: Int
- vRatio :: Rational
- vIncrement :: Rational
- hNMaster :: Int
- hRatio :: Rational
- hIncrement :: Rational
- tabsShrinker :: s
- tabsTheme :: Theme

#### Instances

Instances details

s ~ DefaultShrinker => Default (TiledTabsConfig s) # |
Instance details Defined in XMonad.Layout.Groups.Examples Methods def :: TiledTabsConfig s #

def :: Default a => a #

The default value for this type.

increaseNMasterGroups :: X () #

Increase the number of master groups by one

decreaseNMasterGroups :: X () #

Decrease the number of master groups by one

shrinkMasterGroups :: X () #

Shrink the master area

expandMasterGroups :: X () #

Expand the master area

nextOuterLayout :: X () #

Rotate the available outer layout algorithms

# Useful re-exports and utils

module XMonad.Layout.Groups.Helpers

shrinkText :: DefaultShrinker #

data GroupEQ a #

Compare two `Group`s by comparing the ids of their layouts.

Constructors

GroupEQ |

#### Instances

Instances details

Eq a => EQF GroupEQ (Group l a) # |
Instance details Defined in XMonad.Layout.Groups.Examples Methods eq :: GroupEQ (Group l a) -> Group l a -> Group l a -> Bool #
Read (GroupEQ a) # |
Instance details Defined in XMonad.Layout.Groups.Examples Methods readsPrec :: Int -> ReadS (GroupEQ a) # readList :: ReadS [GroupEQ a] # readPrec :: ReadPrec (GroupEQ a) # readListPrec :: ReadPrec [GroupEQ a] #
Show (GroupEQ a) # |
Instance details Defined in XMonad.Layout.Groups.Examples Methods showsPrec :: Int -> GroupEQ a -> ShowS # show :: GroupEQ a -> String # showList :: [GroupEQ a] -> ShowS #

zoomRowG :: forall a (l :: Type -> Type). (Eq a, Show a, Read a, Show (l a), Read (l a)) => ZoomRow GroupEQ (Group l a) #