From 6769de07f7e06ddf6eea728bd7072ebfe6eff017 Mon Sep 17 00:00:00 2001 From: Daniel Wagner Date: Tue, 28 May 2013 03:39:09 +0200 Subject: use Data.Default wherever possible, and deprecate the things it replaces Ignore-this: 898458b1d2868a70dfb09faf473dc7aa darcs-hash:20130528013909-76d51-863278165b6f149c47b08b31b34e85ddcab19f1f.gz --- XMonad/Actions/ShowText.hs | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) (limited to 'XMonad/Actions/ShowText.hs') diff --git a/XMonad/Actions/ShowText.hs b/XMonad/Actions/ShowText.hs index e0a64cb..77d7244 100644 --- a/XMonad/Actions/ShowText.hs +++ b/XMonad/Actions/ShowText.hs @@ -16,7 +16,8 @@ module XMonad.Actions.ShowText ( -- * Usage -- $usage - defaultSTConfig + def + , defaultSTConfig , handleTimerEvent , flashText , ShowTextConfig(..) @@ -52,7 +53,7 @@ import qualified XMonad.Util.ExtensibleState as ES -- -- You can then use flashText in your keybindings: -- --- > ((modMask, xK_Right), flashText defaultSTConfig 1 "->" >> nextWS) +-- > ((modMask, xK_Right), flashText def 1 "->" >> nextWS) -- -- | ShowText contains the map with timers as keys and created windows as values @@ -72,13 +73,17 @@ data ShowTextConfig = , st_fg :: String -- ^ Foreground color } -defaultSTConfig :: ShowTextConfig -defaultSTConfig = +instance Default ShowTextConfig where + def = STC { st_font = "-misc-fixed-*-*-*-*-20-*-*-*-*-*-*-*" , st_bg = "black" , st_fg = "white" } +{-# DEPRECATED defaultSTConfig "Use def (from Data.Default, and re-exported by XMonad.Actions.ShowText) instead." #-} +defaultSTConfig :: ShowTextConfig +defaultSTConfig = def + -- | Handles timer events that notify when a window should be removed handleTimerEvent :: Event -> X All handleTimerEvent (ClientMessageEvent _ _ _ dis _ mtyp d) = do -- cgit v1.2.3