xmonad-contrib-0.18.0: Community-maintained extensions for xmonad
Copyright(c) brandon s allbery kf8nh 2022 Roman Cheplyaka 2008
LicenseBSD3-style (see LICENSE)
Maintainerbrandon s allbery kf8ng <allbery.b@gmail.com>
Stabilityunstable
Portabilityunportable
Safe HaskellSafe-Inferred
LanguageHaskell2010

XMonad.Actions.PerLayoutKeys

Contents

Description

Define key-bindings on per-layout basis.

Synopsis

Usage

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

 import XMonad.Actions.PerLayoutKeys
  ,((0, xK_F2), bindByLayout [("Tall", spawn "rxvt"), ("Mirror Tall", spawn "xeyes"), ("", spawn "xmessage hello")])

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

chooseActionByLayout :: (String -> X ()) -> X () Source #

Uses supplied function to decide which action to run depending on current layout name.

bindByLayout :: [(String, X ())] -> X () Source #

If current layout is listed, run appropriate action (only the first match counts!) If it isn't listed, then run default action (marked with empty string, ""), or do nothing if default isn't supplied.