Don't export TConf anymore and export DeConfig instead

WARNING: this patch may be breaking your configuration. While it is
still possible to use:

tabbed shrinkText defaultTConf

updating the fields of the defaultTConf record is not possible
anymore, since the type TConf is now hidden.

WARNING: "tabSize" has been substituted by "decoHeight"

You can change your configuration this way:
myTConf :: TConf
myTConf = defaultTConf
       { tabSize = 15
       , etc....

becomes:
myTConf :: DeConfig TabbedDecoration Window
myTConf = defaultTabbedConfig
       { decoHeight = 15
       , etc....

and
tabbed shrinkText myTConf

becomes:
tabDeco shrinkText myTConf
This commit is contained in:
Andrea Rossato 2008-01-26 09:21:41 +00:00
parent baca0e98d1
commit 041eb5dc18
3 changed files with 15 additions and 14 deletions

View File

@ -76,16 +76,16 @@ import XMonad.Prompt.XMonad
-- | My configuration for the Tabbed Layout. Basically this is the -- | My configuration for the Tabbed Layout. Basically this is the
-- Ion3 clean style. -- Ion3 clean style.
arossatoTabbedConfig :: TConf arossatoTabbedConfig :: DeConfig TabbedDecoration Window
arossatoTabbedConfig = arossatoTabbedConfig = defaultTabbedConfig
defaultTConf { activeColor = "#8a999e" { activeColor = "#8a999e"
, inactiveColor = "#545d75" , inactiveColor = "#545d75"
, activeBorderColor = "white" , activeBorderColor = "white"
, inactiveBorderColor = "grey" , inactiveBorderColor = "grey"
, activeTextColor = "white" , activeTextColor = "white"
, inactiveTextColor = "grey" , inactiveTextColor = "grey"
, tabSize = 15 , decoHeight = 15
} }
arossatoConfig = defaultConfig arossatoConfig = defaultConfig
{ workspaces = ["home","var","dev","mail","web","doc"] ++ { workspaces = ["home","var","dev","mail","web","doc"] ++
@ -106,7 +106,7 @@ arossatoConfig = defaultConfig
} }
where where
-- layouts -- layouts
mytab = tabbed shrinkText arossatoTabbedConfig mytab = tabDeco shrinkText arossatoTabbedConfig
tiled = Tall 1 (3/100) (1/2) tiled = Tall 1 (3/100) (1/2)
-- manageHook -- manageHook

View File

@ -29,7 +29,7 @@ sjanssenConfig = do
, ((modm, button2), (\w -> focus w >> windows W.swapMaster)) , ((modm, button2), (\w -> focus w >> windows W.swapMaster))
, ((modm.|. shiftMask, button1), (\w -> focus w >> mouseResizeWindow w)) ] , ((modm.|. shiftMask, button1), (\w -> focus w >> mouseResizeWindow w)) ]
, keys = \c -> mykeys c `M.union` keys defaultConfig c , keys = \c -> mykeys c `M.union` keys defaultConfig c
, layoutHook = avoidStruts $ smartBorders (tiled Tall ||| tiled Wide ||| Full ||| tabbed shrinkText myTConf) , layoutHook = avoidStruts $ smartBorders (tiled Tall ||| tiled Wide ||| Full ||| tabDeco shrinkText myTConf)
, manageHook = manageHook defaultConfig <+> manageDocks , manageHook = manageHook defaultConfig <+> manageDocks
} }
where where
@ -44,7 +44,7 @@ sjanssenConfig = do
] ]
myFont = "xft:Bitstream Vera Sans Mono:pixelsize=10" myFont = "xft:Bitstream Vera Sans Mono:pixelsize=10"
myTConf = defaultTConf { fontName = myFont } myTConf = defaultTabbedConfig { fontName = myFont }
myPromptConfig = defaultXPConfig myPromptConfig = defaultXPConfig
{ position = Top { position = Top
, font = myFont , font = myFont

View File

@ -25,7 +25,8 @@ module XMonad.Layout.Tabbed
-- $usage -- $usage
tabbed tabbed
, tabDeco , tabDeco
, TConf (..), defaultTConf , defaultTConf
, DeConfig (..)
, TabbedDecoration (..), defaultTabbedConfig , TabbedDecoration (..), defaultTabbedConfig
, shrinkText, CustomShrink(CustomShrink) , shrinkText, CustomShrink(CustomShrink)
, Shrinker(..) , Shrinker(..)