XMonad.Layout.Groups.Helpers

xmonad-contrib-0.15: Third party extensions for xmonad

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

XMonad.Layout.Groups.Helpers

Contents

- Usage
  - Layout-generic actions
  - `Groups`-secific actions

Description

Utility functions for XMonad.Layout.Groups.

Synopsis

- swapUp :: X ()
- swapDown :: X ()
- swapMaster :: X ()
- focusUp :: X ()
- focusDown :: X ()
- focusMaster :: X ()
- toggleFocusFloat :: X ()
- swapGroupUp :: X ()
- swapGroupDown :: X ()
- swapGroupMaster :: X ()
- focusGroupUp :: X ()
- focusGroupDown :: X ()
- focusGroupMaster :: X ()
- moveToGroupUp :: Bool -> X ()
- moveToGroupDown :: Bool -> X ()
- moveToNewGroupUp :: X ()
- moveToNewGroupDown :: X ()
- splitGroup :: X ()

# Usage

This module provides helpers functions for use with XMonad.Layout.Groups-based layouts. You can use its contents by adding

    import XMonad.Layout.Groups.Helpers

to the top of your `./.xmonad/xmonad.hs`.

XMonad.Layout.Groups-based layouts do not have the same notion of window ordering as the rest of XMonad. For this reason, the usual ways of reordering windows and moving focus do not work with them. XMonad.Layout.Groups provides `Message`s that can be used to obtain the right effect.

But what if you want to use both `Groups` and other layouts? This module provides actions that try to send `GroupsMessage`s, and fall back to the classic way if the current layout doesn't hande them. They are in the section called "Layout-generic actions".

The sections "Groups-specific actions" contains actions that don't make sense for non-`Groups`-based layouts. These are simply wrappers around the equivalent `GroupsMessage`s, but are included so you don't have to write `sendMessage $ Modify $ ...` everytime.

This module exports many operations with the same names as `ModifySpec`s from XMonad.Layout.Groups, so if you want to import both, we suggest to import XMonad.Layout.Groups qualified:

    import qualified XMonad.Layout.Groups as G

For more information on how to extend your layour hook and key bindings, see XMonad.Doc.Extending.

## Layout-generic actions

swapUp :: X () #

Swap the focused window with the previous one

swapDown :: X () #

Swap the focused window with the next one

swapMaster :: X () #

Swap the focused window with the master window

focusUp :: X () #

If the focused window is floating, focus the next floating window. otherwise, focus the next non-floating one.

focusDown :: X () #

If the focused window is floating, focus the next floating window. otherwise, focus the next non-floating one.

focusMaster :: X () #

Move focus to the master window

toggleFocusFloat :: X () #

Move focus between the floating and non-floating layers

## `Groups`-secific actions

swapGroupUp :: X () #

Swap the focused group with the previous one

swapGroupDown :: X () #

Swap the focused group with the next one

swapGroupMaster :: X () #

Swap the focused group with the master group

focusGroupUp :: X () #

Move the focus to the previous group

focusGroupDown :: X () #

Move the focus to the next group

focusGroupMaster :: X () #

Move the focus to the master group

moveToGroupUp :: Bool -> X () #

Move the focused window to the previous group. The `Bool` argument determines what will be done if the focused window is in the very first group: Wrap back to the end (`True`), or create a new group before it (`False`).

moveToGroupDown :: Bool -> X () #

Move the focused window to the next group. The `Bool` argument determines what will be done if the focused window is in the very last group: Wrap back to the beginning (`True`), or create a new group after it (`False`).

moveToNewGroupUp :: X () #

Move the focused window to a new group before the current one

moveToNewGroupDown :: X () #

Move the focused window to a new group after the current one

splitGroup :: X () #

Split the focused group in two at the position of the focused window.