XMonad.Prompt.Window

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

Copyright | Devin Mullins <me@twifkak.com> Andrea Rossato <andrea.rossato@unibz.it>
License | BSD-style (see LICENSE)
Maintainer | Devin Mullins <me@twifkak.com> Andrea Rossato <andrea.rossato@unibz.it>
Stability | unstable
Portability | unportable
Safe Haskell | None
Language | Haskell2010

XMonad.Prompt.Window

Contents

- Usage

Description

xprompt operations to bring windows to you, and bring you to windows.

Synopsis

- data WindowPrompt
  - = Goto
  - | Bring
  - | BringCopy
  - | BringToMaster
  - | WithWindow String (Window -> X ())
- windowPrompt :: XPConfig -> WindowPrompt -> XWindowMap -> X ()
- windowMultiPrompt :: XPConfig -> [(WindowPrompt, XWindowMap)] -> X ()
- allWindows :: XWindowMap
- allApplications :: XWindowMap
- wsWindows :: XWindowMap
- type XWindowMap = X (Map String Window)

# Usage

WindowPrompt brings windows to you and you to windows. That is to say, it pops up a prompt with window names, in case you forgot where you left your XChat. It also offers helpers to build the subset of windows which is used for the prompt completion.

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

    import XMonad.Prompt
    import XMonad.Prompt.Window

and in the keys definition:

    , ((modm .|. shiftMask, xK_g     ), windowPrompt def Goto wsWindows)
    , ((modm .|. shiftMask, xK_b     ), windowPrompt def Bring allWindows)

The autoComplete option is a handy complement here:

    , ((modm .|. shiftMask, xK_g     ), windowPrompt
                                           def { autoComplete = Just 500000 }
                                           Goto allWindows)

The '500000' is the number of microseconds to pause before sending you to your new window. This is useful so that you don't accidentally send some keystrokes to the selected client.

For detailed instruction on editing the key binding see the tutorial.

data WindowPrompt #

Constructors

Goto |
Bring |
BringCopy |
BringToMaster |
WithWindow String (Window -> X ()) |

#### Instances

Instances details

XPrompt WindowPrompt # |
Instance details Defined in XMonad.Prompt.Window Methods showXPrompt :: WindowPrompt -> String # nextCompletion :: WindowPrompt -> String -> [String] -> String # commandToComplete :: WindowPrompt -> String -> String # completionToCommand :: WindowPrompt -> String -> String # completionFunction :: WindowPrompt -> ComplFunction # modeAction :: WindowPrompt -> String -> String -> X () #

windowPrompt :: XPConfig -> WindowPrompt -> XWindowMap -> X () #

Pops open a prompt with window titles belonging to winmap. Choose one, and an action is applied on the selected window, according to WindowPrompt.

windowMultiPrompt :: XPConfig -> [(WindowPrompt, XWindowMap)] -> X () #

Like `windowPrompt`, but uses the multiple modes feature of `Prompt` (via `mkXPromptWithModes`).

Given a list of actions along with the windows they should work with, display the appropriate prompt with the ability to switch between them using the `changeModeKey`.

For example, to have a prompt that first shows you all windows, but allows you to narrow the list down to just the windows on the current workspace:

    windowMultiPrompt config [(Goto, allWindows), (Goto, wsWindows)]

allWindows :: XWindowMap #

A helper to get the map of all windows.

allApplications :: XWindowMap #

A helper to get the map of all applications

wsWindows :: XWindowMap #

A helper to get the map of windows of the current workspace.

type XWindowMap = X (Map String Window) #

A Map where keys are pretty printable window names and values are Xmonad windows identifier.