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/Prompt/AppLauncher.hs | 4 ++-- XMonad/Prompt/AppendFile.hs | 4 ++-- XMonad/Prompt/DirExec.hs | 6 +++--- XMonad/Prompt/Email.hs | 2 +- XMonad/Prompt/Layout.hs | 2 +- XMonad/Prompt/Man.hs | 2 +- XMonad/Prompt/RunOrRaise.hs | 2 +- XMonad/Prompt/Shell.hs | 2 +- XMonad/Prompt/Ssh.hs | 2 +- XMonad/Prompt/Theme.hs | 4 ++-- XMonad/Prompt/Window.hs | 6 +++--- XMonad/Prompt/Workspace.hs | 2 +- XMonad/Prompt/XMonad.hs | 2 +- 13 files changed, 20 insertions(+), 20 deletions(-) (limited to 'XMonad/Prompt') diff --git a/XMonad/Prompt/AppLauncher.hs b/XMonad/Prompt/AppLauncher.hs index 167c798..ebcf035 100644 --- a/XMonad/Prompt/AppLauncher.hs +++ b/XMonad/Prompt/AppLauncher.hs @@ -50,8 +50,8 @@ configuration and the AppLauncher module itself. Then you can add the bindings to the applications. > ... -> , ((modm, xK_g), AL.launchApp defaultXPConfig "gimp" ) -> , ((modm, xK_g), AL.launchApp defaultXPConfig "evince" ) +> , ((modm, xK_g), AL.launchApp def "gimp" ) +> , ((modm, xK_g), AL.launchApp def "evince" ) > ... -} diff --git a/XMonad/Prompt/AppendFile.hs b/XMonad/Prompt/AppendFile.hs index 17d4763..4a0ce3f 100644 --- a/XMonad/Prompt/AppendFile.hs +++ b/XMonad/Prompt/AppendFile.hs @@ -42,7 +42,7 @@ import Control.Exception.Extensible (bracket) -- -- and adding an appropriate keybinding, for example: -- --- > , ((modm .|. controlMask, xK_n), appendFilePrompt defaultXPConfig "/home/me/NOTES") +-- > , ((modm .|. controlMask, xK_n), appendFilePrompt def "/home/me/NOTES") -- -- Additional notes can be added via regular Haskell or XMonad functions; for -- example, to preface notes with the time they were made, one could write a @@ -50,7 +50,7 @@ import Control.Exception.Extensible (bracket) -- -- > , ((modm .|. controlMask, xK_n), do -- > spawn ("date>>"++"/home/me/NOTES") --- > appendFilePrompt defaultXPConfig "/home/me/NOTES" +-- > appendFilePrompt def "/home/me/NOTES" -- > ) -- -- (Put the spawn on the line after the prompt to append the time instead.) diff --git a/XMonad/Prompt/DirExec.hs b/XMonad/Prompt/DirExec.hs index ef37a9a..4919049 100644 --- a/XMonad/Prompt/DirExec.hs +++ b/XMonad/Prompt/DirExec.hs @@ -41,17 +41,17 @@ econst = const . return -- -- 2. In your keybindings add something like: -- --- > , ("M-C-x", dirExecPrompt defaultXPConfig spawn "/home/joe/.scipts") +-- > , ("M-C-x", dirExecPrompt def spawn "/home/joe/.scipts") -- -- or -- --- > , ("M-C-x", dirExecPromptNamed defaultXPConfig spawn +-- > , ("M-C-x", dirExecPromptNamed def spawn -- > "/home/joe/.scripts" "My Scripts: ") -- -- or add this after your default bindings: -- -- > ++ --- > [ ("M-x " ++ key, dirExecPrompt defaultXPConfig fn "/home/joe/.scripts") +-- > [ ("M-x " ++ key, dirExecPrompt def fn "/home/joe/.scripts") -- > | (key, fn) <- [ ("x", spawn), ("M-x", runInTerm "-hold") ] -- > ] -- > ++ diff --git a/XMonad/Prompt/Email.hs b/XMonad/Prompt/Email.hs index a0eb72e..7a746df 100644 --- a/XMonad/Prompt/Email.hs +++ b/XMonad/Prompt/Email.hs @@ -36,7 +36,7 @@ import XMonad.Prompt.Input -- -- and adding an appropriate keybinding, for example: -- --- > , ((modm .|. controlMask, xK_e), emailPrompt defaultXPConfig addresses) +-- > , ((modm .|. controlMask, xK_e), emailPrompt def addresses) -- -- where @addresses@ is a list of email addresses that should -- autocomplete, for example: diff --git a/XMonad/Prompt/Layout.hs b/XMonad/Prompt/Layout.hs index d9c59e1..76aa938 100644 --- a/XMonad/Prompt/Layout.hs +++ b/XMonad/Prompt/Layout.hs @@ -31,7 +31,7 @@ import XMonad.Layout.LayoutCombinators ( JumpToLayout(..) ) -- > import XMonad.Prompt -- > import XMonad.Prompt.Layout -- --- > , ((modm .|. shiftMask, xK_m ), layoutPrompt defaultXPConfig) +-- > , ((modm .|. shiftMask, xK_m ), layoutPrompt def) -- -- For detailed instruction on editing the key binding see -- "XMonad.Doc.Extending#Editing_key_bindings". diff --git a/XMonad/Prompt/Man.hs b/XMonad/Prompt/Man.hs index c5bd8d5..6cdaa66 100644 --- a/XMonad/Prompt/Man.hs +++ b/XMonad/Prompt/Man.hs @@ -46,7 +46,7 @@ import Data.Maybe -- -- 2. In your keybindings add something like: -- --- > , ((modm, xK_F1), manPrompt defaultXPConfig) +-- > , ((modm, xK_F1), manPrompt def) -- -- For detailed instruction on editing the key binding see -- "XMonad.Doc.Extending#Editing_key_bindings". diff --git a/XMonad/Prompt/RunOrRaise.hs b/XMonad/Prompt/RunOrRaise.hs index ce93de9..31ed027 100644 --- a/XMonad/Prompt/RunOrRaise.hs +++ b/XMonad/Prompt/RunOrRaise.hs @@ -41,7 +41,7 @@ econst = const . return 2. In your keybindings add something like: -> , ((modm .|. controlMask, xK_x), runOrRaisePrompt defaultXPConfig) +> , ((modm .|. controlMask, xK_x), runOrRaisePrompt def) For detailed instruction on editing the key binding see "XMonad.Doc.Extending#Editing_key_bindings". -} diff --git a/XMonad/Prompt/Shell.hs b/XMonad/Prompt/Shell.hs index 93308bc..5c8f687 100644 --- a/XMonad/Prompt/Shell.hs +++ b/XMonad/Prompt/Shell.hs @@ -52,7 +52,7 @@ econst = const . return 2. In your keybindings add something like: -> , ((modm .|. controlMask, xK_x), shellPrompt defaultXPConfig) +> , ((modm .|. controlMask, xK_x), shellPrompt def) For detailed instruction on editing the key binding see "XMonad.Doc.Extending#Editing_key_bindings". -} diff --git a/XMonad/Prompt/Ssh.hs b/XMonad/Prompt/Ssh.hs index e9e7ec8..aa1b9fd 100644 --- a/XMonad/Prompt/Ssh.hs +++ b/XMonad/Prompt/Ssh.hs @@ -41,7 +41,7 @@ econst = const . return -- -- 2. In your keybindings add something like: -- --- > , ((modm .|. controlMask, xK_s), sshPrompt defaultXPConfig) +-- > , ((modm .|. controlMask, xK_s), sshPrompt def) -- -- Keep in mind, that if you want to use the completion you have to -- disable the "HashKnownHosts" option in your ssh_config diff --git a/XMonad/Prompt/Theme.hs b/XMonad/Prompt/Theme.hs index d34dd87..1349bd1 100644 --- a/XMonad/Prompt/Theme.hs +++ b/XMonad/Prompt/Theme.hs @@ -35,7 +35,7 @@ import XMonad.Util.Themes -- -- in your keybindings add: -- --- > , ((modm .|. controlMask, xK_t), themePrompt defaultXPConfig) +-- > , ((modm .|. controlMask, xK_t), themePrompt def) -- -- For detailed instruction on editing the key binding see -- "XMonad.Doc.Extending#Editing_key_bindings". @@ -49,7 +49,7 @@ instance XPrompt ThemePrompt where themePrompt :: XPConfig -> X () themePrompt c = mkXPrompt ThemePrompt c (mkComplFunFromList' . map ppThemeInfo $ listOfThemes) changeTheme - where changeTheme t = sendMessage . SetTheme . fromMaybe defaultTheme $ M.lookup t mapOfThemes + where changeTheme t = sendMessage . SetTheme . fromMaybe def $ M.lookup t mapOfThemes mapOfThemes :: M.Map String Theme mapOfThemes = M.fromList . uncurry zip . (map ppThemeInfo &&& map theme) $ listOfThemes diff --git a/XMonad/Prompt/Window.hs b/XMonad/Prompt/Window.hs index a6aa53f..974e986 100644 --- a/XMonad/Prompt/Window.hs +++ b/XMonad/Prompt/Window.hs @@ -44,13 +44,13 @@ import XMonad.Actions.WindowBringer -- -- and in the keys definition: -- --- > , ((modm .|. shiftMask, xK_g ), windowPromptGoto defaultXPConfig) --- > , ((modm .|. shiftMask, xK_b ), windowPromptBring defaultXPConfig) +-- > , ((modm .|. shiftMask, xK_g ), windowPromptGoto def) +-- > , ((modm .|. shiftMask, xK_b ), windowPromptBring def) -- -- The autoComplete option is a handy complement here: -- -- > , ((modm .|. shiftMask, xK_g ), windowPromptGoto --- > defaultXPConfig { autoComplete = Just 500000 } ) +-- > def { autoComplete = Just 500000 } ) -- -- The \'500000\' is the number of microseconds to pause before sending you to -- your new window. This is useful so that you don't accidentally send some diff --git a/XMonad/Prompt/Workspace.hs b/XMonad/Prompt/Workspace.hs index 749ca9d..b324762 100644 --- a/XMonad/Prompt/Workspace.hs +++ b/XMonad/Prompt/Workspace.hs @@ -32,7 +32,7 @@ import XMonad.Util.WorkspaceCompare ( getSortByIndex ) -- > import XMonad.Prompt -- > import XMonad.Prompt.Workspace -- --- > , ((modm .|. shiftMask, xK_m ), workspacePrompt defaultXPConfig (windows . W.shift)) +-- > , ((modm .|. shiftMask, xK_m ), workspacePrompt def (windows . W.shift)) -- -- For detailed instruction on editing the key binding see -- "XMonad.Doc.Extending#Editing_key_bindings". diff --git a/XMonad/Prompt/XMonad.hs b/XMonad/Prompt/XMonad.hs index 86f5369..ce075be 100644 --- a/XMonad/Prompt/XMonad.hs +++ b/XMonad/Prompt/XMonad.hs @@ -33,7 +33,7 @@ import Data.Maybe (fromMaybe) -- -- in your keybindings add: -- --- > , ((modm .|. controlMask, xK_x), xmonadPrompt defaultXPConfig) +-- > , ((modm .|. controlMask, xK_x), xmonadPrompt def) -- -- For detailed instruction on editing the key binding see -- "XMonad.Doc.Extending#Editing_key_bindings". -- cgit v1.2.3