aboutsummaryrefslogtreecommitdiffstats
path: root/XMonad/Layout/Groups/Examples.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/Layout/Groups/Examples.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 'XMonad/Layout/Groups/Examples.hs')
-rw-r--r--XMonad/Layout/Groups/Examples.hs13
1 files changed, 9 insertions, 4 deletions
diff --git a/XMonad/Layout/Groups/Examples.hs b/XMonad/Layout/Groups/Examples.hs
index 9407c9b..937d58f 100644
--- a/XMonad/Layout/Groups/Examples.hs
+++ b/XMonad/Layout/Groups/Examples.hs
@@ -1,5 +1,5 @@
{-# OPTIONS_GHC -fno-warn-missing-signatures #-}
-{-# LANGUAGE MultiParamTypeClasses, Rank2Types #-}
+{-# LANGUAGE MultiParamTypeClasses, Rank2Types, TypeFamilies #-}
-----------------------------------------------------------------------------
-- |
@@ -36,6 +36,7 @@ module XMonad.Layout.Groups.Examples ( -- * Usage
, mirrorTallTabs
, fullTabs
, TiledTabsConfig(..)
+ , def
, defaultTiledTabsConfig
, increaseNMasterGroups
, decreaseNMasterGroups
@@ -180,9 +181,9 @@ toggleWindowFull = sendMessage ZoomFullToggle
-- You can use any of these three layouts by including it in your layout hook.
-- You will need to provide it with a 'TiledTabsConfig' containing the size
-- parameters for 'Tall' and 'Mirror' 'Tall', and the shrinker and decoration theme
--- for the tabs. If you're happy with defaults, you can use 'defaultTiledTabsConfig':
+-- for the tabs. If you're happy with defaults, you can use 'def':
--
--- > myLayout = tallTabs defaultTiledTabsConfig
+-- > myLayout = tallTabs def
--
-- To be able to increase\/decrease the number of master groups and shrink\/expand
-- the master area, you can create key bindings for the relevant actions:
@@ -201,8 +202,12 @@ data TiledTabsConfig s = TTC { vNMaster :: Int
, tabsShrinker :: s
, tabsTheme :: Theme }
+instance s ~ DefaultShrinker => Default (TiledTabsConfig s) where
+ def = TTC 1 0.5 (3/100) 1 0.5 (3/100) shrinkText def
+
+{-# DEPRECATED defaultTiledTabsConfig "Use def (from Data.Default, and re-exported by XMonad.Layout.Groups) instead." #-}
defaultTiledTabsConfig :: TiledTabsConfig DefaultShrinker
-defaultTiledTabsConfig = TTC 1 0.5 (3/100) 1 0.5 (3/100) shrinkText defaultTheme
+defaultTiledTabsConfig = def
fullTabs c = _tab c $ G.group _tabs $ Full ||| _vert c ||| _horiz c