Copyright | (c) Wilson Sales 2019 |
---|---|
License | BSD3-style (see LICENSE) |
Maintainer | Wilson Sales <spoonm@spoonm.org> |
Stability | unstable |
Portability | unportable |
Safe Haskell | None |
Language | Haskell2010 |
Define key-bindings on a per-window basis.
Usage
You can use this module with the following in your xmonad.hs
:
import XMonad.Actions.PerWindowKeys
,((0, xK_F2), bindFirst [(className =? "firefox", spawn "dmenu"), (isFloat, withFocused $ windows . W.sink)])
,((0, xK_F3), bindAll [(isDialog, kill), (pure True, doSomething)])
If you want an action that will always run, but also want to do something for
other queries, you can use
.bindAll
[(query1, action1), ..., (pure True,
alwaysDoThisAction)]
Similarly, if you want a default action to be run if all the others failed,
you can use
.bindFirst
[(query1, action1), ..., (pure True,
doThisIfTheOthersFail)]
For detailed instructions on editing your key bindings, see the tutorial.