aboutsummaryrefslogtreecommitdiffstats
path: root/XMonad/Doc/Extending.hs
diff options
context:
space:
mode:
authorDaniel Wagner <daniel@wagner-home.com>2013-05-28 03:39:09 +0200
committerDaniel Wagner <daniel@wagner-home.com>2013-05-28 03:39:09 +0200
commit6769de07f7e06ddf6eea728bd7072ebfe6eff017 (patch)
treef234bf0cac01538fbc1acab1a668ac61b9ab8074 /XMonad/Doc/Extending.hs
parentfe066e8e9ca5326dd146630a6d729fae51af12cf (diff)
downloadXMonadContrib-6769de07f7e06ddf6eea728bd7072ebfe6eff017.tar.gz
XMonadContrib-6769de07f7e06ddf6eea728bd7072ebfe6eff017.tar.xz
XMonadContrib-6769de07f7e06ddf6eea728bd7072ebfe6eff017.zip
use Data.Default wherever possible, and deprecate the things it replaces
Ignore-this: 898458b1d2868a70dfb09faf473dc7aa darcs-hash:20130528013909-76d51-863278165b6f149c47b08b31b34e85ddcab19f1f.gz
Diffstat (limited to '')
-rw-r--r--XMonad/Doc/Extending.hs24
1 files changed, 12 insertions, 12 deletions
diff --git a/XMonad/Doc/Extending.hs b/XMonad/Doc/Extending.hs
index f766962..432be26 100644
--- a/XMonad/Doc/Extending.hs
+++ b/XMonad/Doc/Extending.hs
@@ -937,8 +937,8 @@ example, you could write:
and provide an appropriate definition of @myKeys@, such as:
> myKeys conf@(XConfig {XMonad.modMask = modm}) = M.fromList
-> [ ((modm, xK_F12), xmonadPrompt defaultXPConfig)
-> , ((modm, xK_F3 ), shellPrompt defaultXPConfig)
+> [ ((modm, xK_F12), xmonadPrompt def)
+> , ((modm, xK_F3 ), shellPrompt def)
> ]
This particular definition also requires importing "XMonad.Prompt",
@@ -984,8 +984,8 @@ For instance, if you have defined some additional key bindings like
these:
> myKeys conf@(XConfig {XMonad.modMask = modm}) = M.fromList
-> [ ((modm, xK_F12), xmonadPrompt defaultXPConfig)
-> , ((modm, xK_F3 ), shellPrompt defaultXPConfig)
+> [ ((modm, xK_F12), xmonadPrompt def)
+> , ((modm, xK_F3 ), shellPrompt def)
> ]
then you can create a new key bindings map by joining the default one
@@ -1021,8 +1021,8 @@ All together, your @~\/.xmonad\/xmonad.hs@ would now look like this:
> main = xmonad $ def { keys = myKeys <+> keys def }
>
> myKeys conf@(XConfig {XMonad.modMask = modm}) = M.fromList
-> [ ((modm, xK_F12), xmonadPrompt defaultXPConfig)
-> , ((modm, xK_F3 ), shellPrompt defaultXPConfig)
+> [ ((modm, xK_F12), xmonadPrompt def)
+> , ((modm, xK_F3 ), shellPrompt def)
> ]
There are much simpler ways to accomplish this, however, if you are
@@ -1097,8 +1097,8 @@ for removing and adding. Here is an example from
> [(shiftMask .|. modm, k) | k <- [xK_1 .. xK_9]]
> -- These are my personal key bindings
> toAdd XConfig{modMask = modm} =
-> [ ((modm , xK_F12 ), xmonadPrompt defaultXPConfig )
-> , ((modm , xK_F3 ), shellPrompt defaultXPConfig )
+> [ ((modm , xK_F12 ), xmonadPrompt def )
+> , ((modm , xK_F3 ), shellPrompt def )
> ] ++
> -- Use modm .|. shiftMask .|. controlMask 1-9 instead
> [( (m .|. modm, k), windows $ f i)
@@ -1174,7 +1174,7 @@ Suppose we want a list with the 'XMonad.Layout.Full',
Then we create the combination of layouts we need:
-> mylayoutHook = Full ||| tabbed shrinkText defaultTheme ||| Accordion
+> mylayoutHook = Full ||| tabbed shrinkText def ||| Accordion
Now, all we need to do is change the 'XMonad.Core.layoutHook'
@@ -1188,11 +1188,11 @@ example, suppose we want to use the
'XMonad.Layout.NoBorders.noBorders' layout modifier, from the
"XMonad.Layout.NoBorders" module (which must be imported):
-> mylayoutHook = noBorders (Full ||| tabbed shrinkText defaultTheme ||| Accordion)
+> mylayoutHook = noBorders (Full ||| tabbed shrinkText def ||| Accordion)
If we want only the tabbed layout without borders, then we may write:
-> mylayoutHook = Full ||| noBorders (tabbed shrinkText defaultTheme) ||| Accordion
+> mylayoutHook = Full ||| noBorders (tabbed shrinkText def) ||| Accordion
Our @~\/.xmonad\/xmonad.hs@ will now look like this:
@@ -1202,7 +1202,7 @@ Our @~\/.xmonad\/xmonad.hs@ will now look like this:
> import XMonad.Layout.Accordion
> import XMonad.Layout.NoBorders
>
-> mylayoutHook = Full ||| noBorders (tabbed shrinkText defaultTheme) ||| Accordion
+> mylayoutHook = Full ||| noBorders (tabbed shrinkText def) ||| Accordion
>
> main = xmonad $ def { layoutHook = mylayoutHook }