diff --git a/XMonad/Actions/Prefix.hs b/XMonad/Actions/Prefix.hs index c50f8c4c..59aa39f8 100644 --- a/XMonad/Actions/Prefix.hs +++ b/XMonad/Actions/Prefix.hs @@ -94,12 +94,12 @@ grab" and let the C-c C-u be sent to the application. The simplest way to enable this is to use 'useDefaultPrefixArgument' -> xmonad $ useDefaultPrefixArgument $ defaultConfig { .. } +> xmonad $ useDefaultPrefixArgument $ def { .. } The default prefix argument is C-u. If you want to customize the prefix argument, use the following: -> xmonad $ usePrefixArgument prefixKey $ defaultConfig { .. } +> xmonad $ usePrefixArgument prefixKey $ def { .. } where 'prefixKey' is a function which takes 'XConfig' as an argument in case you wish to extract the 'modMask'. An example diff --git a/XMonad/Hooks/UrgencyHook.hs b/XMonad/Hooks/UrgencyHook.hs index 85da4046..fa9fa62b 100644 --- a/XMonad/Hooks/UrgencyHook.hs +++ b/XMonad/Hooks/UrgencyHook.hs @@ -533,7 +533,7 @@ instance UrgencyHook StdoutUrgencyHook where -- -- Useful for scratchpad workspaces perhaps: -- --- > main = xmonad (withUrgencyHook (filterUrgencyHook ["NSP", "SP"]) defaultConfig) +-- > main = xmonad (withUrgencyHook (filterUrgencyHook ["NSP", "SP"]) def) filterUrgencyHook :: [WorkspaceId] -> Window -> X () filterUrgencyHook skips w = do ws <- gets windowset diff --git a/XMonad/Hooks/WallpaperSetter.hs b/XMonad/Hooks/WallpaperSetter.hs index 136bbcec..fc9a0b21 100644 --- a/XMonad/Hooks/WallpaperSetter.hs +++ b/XMonad/Hooks/WallpaperSetter.hs @@ -53,7 +53,7 @@ import Data.Maybe -- -- > myWorkspaces = ["1:main","2:misc","3","4"] -- > ... --- > main = xmonad $ defaultConfig { +-- > main = xmonad $ def { -- > logHook = wallpaperSetter defWallpaperConf { -- > wallpapers = defWPNames myWorkspaces -- > <> WallpaperList [("1:main",WallpaperDir "1")] diff --git a/XMonad/Layout/Fullscreen.hs b/XMonad/Layout/Fullscreen.hs index 87f06ceb..cbe64956 100644 --- a/XMonad/Layout/Fullscreen.hs +++ b/XMonad/Layout/Fullscreen.hs @@ -72,7 +72,7 @@ import Control.Arrow (second) -- -- > main = xmonad -- > $ fullscreenSupport --- > $ defaultConfig { ... } +-- > $ def { ... } fullscreenSupport :: LayoutClass l Window => XConfig l -> XConfig (ModifiedLayout FullscreenFull l) fullscreenSupport c = c { diff --git a/XMonad/Util/SpawnNamedPipe.hs b/XMonad/Util/SpawnNamedPipe.hs index fc3e3d38..1e936394 100644 --- a/XMonad/Util/SpawnNamedPipe.hs +++ b/XMonad/Util/SpawnNamedPipe.hs @@ -3,7 +3,7 @@ ----------------------------------------------------------------------------- -- | -- Module : XMonad.Util.SpawnNamedPipe --- Copyright : (c) Christian Wills 2014 +-- Copyright : (c) Christian Wills 2014 -- License : BSD3-style (see LICENSE) -- -- Maintainer : cwills.dev@gmail.com @@ -35,10 +35,10 @@ import qualified Data.Map as Map -- -- > import XMonad.Util.SpawnNamedPipe -- > import Data.Maybe --- > +-- > -- > -- StartupHook --- > startupHook' = spawnNamedPipe "dzen2" "dzenPipe" --- > +-- > startupHook' = spawnNamedPipe "dzen2" "dzenPipe" +-- > -- > -- LogHook -- > logHook' = do -- > mh <- getNamedPipeHandle "dzenPipe" @@ -46,31 +46,30 @@ import qualified Data.Map as Map -- > ppOutput = maybe (\s -> return ()) (hPutStrLn) mh} -- > -- > -- Main --- > main = xmonad $ defaultConfig { --- > startupHook = startupHook' --- > , logHook = logHook'} +-- > main = xmonad $ def { startupHook = startupHook' +-- > , logHook = logHook'} -- data NamedPipes = NamedPipes { pipeMap :: Map.Map String Handle } deriving (Show, Typeable) instance ExtensionClass NamedPipes where - initialValue = NamedPipes Map.empty + initialValue = NamedPipes Map.empty -- | When 'spawnNamedPipe' is executed with a command "String" and a name -- "String" respectively. The command string is spawned with 'spawnPipe' (as -- long as the name chosen hasn't been used already) and the "Handle" returned --- is saved in Xmonad's state associated with the name "String". +-- is saved in Xmonad's state associated with the name "String". spawnNamedPipe :: String -> String -> X () spawnNamedPipe cmd name = do - b <- XS.gets (Map.member name . pipeMap) + b <- XS.gets (Map.member name . pipeMap) unless b $ do - h <- spawnPipe cmd - XS.modify (NamedPipes . Map.insert name h . pipeMap) + h <- spawnPipe cmd + XS.modify (NamedPipes . Map.insert name h . pipeMap) -- | Attempts to retrieve a "Handle" to a pipe previously stored in Xmonad's -- state associated with the given string via a call to 'spawnNamedPipe'. If the -- given string doesn't exist in the map stored in Xmonad's state Nothing is --- returned. +-- returned. getNamedPipe :: String -> X (Maybe Handle) getNamedPipe name = XS.gets (Map.lookup name . pipeMap)