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

Copyright | (c) David Glasser 2007
License | BSD3
Maintainer | glasser@mit.edu
Stability | stable
Portability | portable
Safe Haskell | None
Language | Haskell2010

XMonad.Actions.Commands

Contents

- Usage

Description

Allows you to run internal xmonad commands (X () actions) using a dmenu menu in addition to key bindings. Requires dmenu and the Dmenu XMonad.Actions module.

Synopsis

- commandMap :: [(String, X ())] -> Map String (X ())
- runCommand :: [(String, X ())] -> X ()
- runCommandConfig :: ([String] -> X String) -> [(String, X ())] -> X ()
- runCommand' :: String -> X ()
- workspaceCommands :: X [(String, X ())]
- screenCommands :: [(String, X ())]
- defaultCommands :: X [(String, X ())]

# Usage

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

       import XMonad.Actions.Commands

Then add a keybinding to the runCommand action:

       , ((modm .|. controlMask, xK_y), commands >>= runCommand)

and define the list of commands you want to use:

       commands :: X [(String, X ())]
       commands = defaultCommands

Whatever key you bound to will now cause a popup menu of internal xmonad commands to appear. You can change the commands by changing the contents of the list returned by `commands`. (If you like it enough, you may even want to get rid of many of your other key bindings!)

For detailed instructions on editing your key bindings, see the tutorial.

commandMap :: [(String, X ())] -> Map String (X ()) #

Create a `Map` from `String`s to xmonad actions from a list of pairs.

runCommand :: [(String, X ())] -> X () #

Given a list of command/action pairs, prompt the user to choose a command using dmenu and return the corresponding action.

runCommandConfig :: ([String] -> X String) -> [(String, X ())] -> X () #

Given a list of command/action pairs, prompt the user to choose a command using dmenu-compatible launcher and return the corresponding action. See X.U.Dmenu for compatible launchers.

runCommand' :: String -> X () #

Given the name of a command from `defaultCommands`, return the corresponding action (or the null action if the command is not found).

workspaceCommands :: X [(String, X ())] #

Generate a list of commands to switch to/send windows to workspaces.

screenCommands :: [(String, X ())] #

Generate a list of commands dealing with multiple screens.

defaultCommands :: X [(String, X ())] #

A nice pre-defined list of commands.