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

Copyright | (c) 2007 David Roundy <droundy@darcs.net>
License | BSD3-style (see LICENSE)
Maintainer | Devin Mullins <me@twifkak.com>
Stability | unstable
Portability | unportable
Safe Haskell | Safe-Inferred
Language | Haskell2010

XMonad.Layout.WindowNavigation

Contents

- Usage

Description

WindowNavigation is an extension to allow easy navigation of a workspace.

Synopsis

- windowNavigation :: LayoutClass l a => l a -> ModifiedLayout WindowNavigation l a
- configurableNavigation :: LayoutClass l a => WNConfig -> l a -> ModifiedLayout WindowNavigation l a
- data Navigate
  - = Go Direction2D
  - | Swap Direction2D
  - | Move Direction2D
  - | Apply (Window -> X ()) Direction2D
- data Direction2D
  - = U
  - | D
  - | R
  - | L
- data MoveWindowToWindow a = MoveWindowToWindow a a
- data WNConfig
- navigateColor :: String -> WNConfig
- navigateBrightness :: Double -> WNConfig
- noNavigateBorders :: WNConfig
- def :: Default a => a
- data WindowNavigation a

# Usage

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

    import XMonad.Layout.WindowNavigation

Then edit your `layoutHook` by adding the WindowNavigation layout modifier to some layout:

    myLayout = windowNavigation (Tall 1 (3/100) (1/2)) ||| Full ||| etc..
    main = xmonad def { layoutHook = myLayout }

For more detailed instructions on editing the `layoutHook` see:

XMonad.Doc.Extending

In keybindings:

       , ((modm,                 xK_Right), sendMessage $ Go R)
       , ((modm,                 xK_Left ), sendMessage $ Go L)
       , ((modm,                 xK_Up   ), sendMessage $ Go U)
       , ((modm,                 xK_Down ), sendMessage $ Go D)
       , ((modm .|. controlMask, xK_Right), sendMessage $ Swap R)
       , ((modm .|. controlMask, xK_Left ), sendMessage $ Swap L)
       , ((modm .|. controlMask, xK_Up   ), sendMessage $ Swap U)
       , ((modm .|. controlMask, xK_Down ), sendMessage $ Swap D)

For detailed instruction on editing the key binding see:

XMonad.Doc.Extending.

windowNavigation :: LayoutClass l a => l a -> ModifiedLayout WindowNavigation l a Source #

configurableNavigation :: LayoutClass l a => WNConfig -> l a -> ModifiedLayout WindowNavigation l a Source #

data Navigate Source #

Constructors

Go Direction2D |
Swap Direction2D |
Move Direction2D |
Apply (Window -> X ()) Direction2D | Apply action with destination window

#### Instances

Instances details

Message Navigate Source # |
Instance details Defined in XMonad.Layout.WindowNavigation

data Direction2D Source #

Two-dimensional directions:

Constructors

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

#### Instances

Instances details

Bounded Direction2D Source # |
Instance details Defined in XMonad.Util.Types Methods minBound :: Direction2D Source # maxBound :: Direction2D Source #
Enum Direction2D Source # |

Instance details

Defined in XMonad.Util.Types

Methods

succ :: Direction2D -> Direction2D Source #

pred :: Direction2D -> Direction2D Source #

toEnum :: Int -> Direction2D Source #

fromEnum :: Direction2D -> Int Source #

enumFrom :: Direction2D -> [Direction2D] Source #

enumFromThen :: Direction2D -> Direction2D -> [Direction2D] Source #

enumFromTo :: Direction2D -> Direction2D -> [Direction2D] Source #

enumFromThenTo :: Direction2D -> Direction2D -> Direction2D -> [Direction2D] Source #

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

Instance details

Defined in XMonad.Util.Types

Methods

compare :: Direction2D -> Direction2D -> Ordering Source #

(<) :: Direction2D -> Direction2D -> Bool Source #

(<=) :: Direction2D -> Direction2D -> Bool Source #

(>) :: Direction2D -> Direction2D -> Bool Source #

(>=) :: Direction2D -> Direction2D -> Bool Source #

max :: Direction2D -> Direction2D -> Direction2D Source #

min :: Direction2D -> Direction2D -> Direction2D Source #

data MoveWindowToWindow a Source #

Constructors

MoveWindowToWindow a a |

#### Instances

Instances details

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

data WNConfig Source #

Used with `configurableNavigation` to specify how to show reachable windows' borders. You cannot create `WNConfig` values directly; use `def` or one of the following three functions to create one.

`def`, and `windowNavigation`, uses the focused border color at 40% brightness, as if you had specified

    configurableNavigation (navigateBrightness 0.4)

#### Instances

Instances details

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

navigateColor :: String -> WNConfig Source #

Indicate reachable windows by drawing their borders in the specified color.

navigateBrightness :: Double -> WNConfig Source #

Indicate reachable windows by drawing their borders in the active border color, with the specified brightness.

noNavigateBorders :: WNConfig Source #

Don't use window borders for navigation.

def :: Default a => a #

data WindowNavigation a Source #

#### Instances

Instances details

LayoutModifier WindowNavigation Window Source # |

Instance details

Defined in XMonad.Layout.WindowNavigation

Methods

modifyLayout :: LayoutClass l Window => WindowNavigation Window -> Workspace WorkspaceId (l Window) Window -> Rectangle -> X ([(Window, Rectangle)], Maybe (l Window)) Source #

modifyLayoutWithUpdate :: LayoutClass l Window => WindowNavigation Window -> Workspace WorkspaceId (l Window) Window -> Rectangle -> X (([(Window, Rectangle)], Maybe (l Window)), Maybe (WindowNavigation Window)) Source #

handleMess :: WindowNavigation Window -> SomeMessage -> X (Maybe (WindowNavigation Window)) Source #

handleMessOrMaybeModifyIt :: WindowNavigation Window -> SomeMessage -> X (Maybe (Either (WindowNavigation Window) SomeMessage)) Source #

pureMess :: WindowNavigation Window -> SomeMessage -> Maybe (WindowNavigation Window) Source #

redoLayout :: WindowNavigation Window -> Rectangle -> Maybe (Stack Window) -> [(Window, Rectangle)] -> X ([(Window, Rectangle)], Maybe (WindowNavigation Window)) Source #

pureModifier :: WindowNavigation Window -> Rectangle -> Maybe (Stack Window) -> [(Window, Rectangle)] -> ([(Window, Rectangle)], Maybe (WindowNavigation Window)) Source #

hook :: WindowNavigation Window -> X () Source #

unhook :: WindowNavigation Window -> X () Source #

modifierDescription :: WindowNavigation Window -> String Source #

modifyDescription :: LayoutClass l Window => WindowNavigation Window -> l Window -> String Source #

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