    {-# OPTIONS_GHC -fno-warn-missing-signatures #-}
    {-# LANGUAGE NoMonomorphismRestriction #-}
    -----------------------------------------------------------------------------
    -- |
    -- Module      :  XMonad.Config.Arossato
    -- Copyright   :  (c) Andrea Rossato 2007
    -- License     :  BSD3-style (see LICENSE)
    --
    -- Maintainer  :  andrea.rossato@unibz.it
    -- Stability   :  stable
    -- Portability :  portable
    --
    -- This module specifies my xmonad defaults.
    --
    ------------------------------------------------------------------------

    module XMonad.Config.Arossato
        ( -- * Usage
          -- $usage
          arossatoConfig
        ) where

    import qualified Data.Map as M

    import XMonad hiding ( (|||) )
    import qualified XMonad.StackSet as W

    import XMonad.Actions.CycleWS
    import XMonad.Hooks.DynamicLog hiding (xmobar)
    import XMonad.Hooks.ManageDocks
    import XMonad.Hooks.ServerMode
    import XMonad.Layout.Accordion
    import XMonad.Layout.LayoutCombinators
    import XMonad.Layout.Magnifier
    import XMonad.Layout.NoBorders
    import XMonad.Layout.SimpleFloat
    import XMonad.Layout.Tabbed
    import XMonad.Layout.WindowArranger
    import XMonad.Prompt.Shell
    import XMonad.Prompt.Ssh
    import XMonad.Prompt.Theme
    import XMonad.Prompt.Window
    import XMonad.Prompt.XMonad
    import XMonad.Util.Run
    import XMonad.Util.Themes

    -- $usage
    -- The simplest way to use this configuration module is to use an
    -- @~\/.xmonad\/xmonad.hs@ like this:
    --
    -- > module Main (main) where
    -- >
    -- > import XMonad
    -- > import XMonad.Config.Arossato (arossatoConfig)
    -- >
    -- > main :: IO ()
    -- > main = xmonad =<< arossatoConfig
    --
    -- NOTE: that I'm using xmobar and, if you don't have xmobar in your
    -- PATH, this configuration will produce an error and xmonad will not
    -- start. If you don't want to install xmobar get rid of this line at
    -- the beginning of 'arossatoConfig'.
    --
    -- You can use this module also as a starting point for writing your
    -- own configuration module from scratch. Save it as your
    -- @~\/.xmonad\/xmonad.hs@ and:
    --
    -- 1. Change the module name from
    --
    -- > module XMonad.Config.Arossato
    -- >     ( -- * Usage
    -- >       -- $usage
    -- >       arossatoConfig
    -- >     ) where
    --
    -- to
    --
    -- > module Main where
    --
    -- 2. Add a line like:
    --
    -- > main = xmonad =<< arossatoConfig
    --
    -- 3. Start playing with the configuration options...;)

    arossatoConfig :: m (XConfig
         (ModifiedLayout
            AvoidStruts
            (NewSelect
               (ModifiedLayout
                  (Decoration SimpleDecoration DefaultShrinker)
                  (ModifiedLayout
                     MouseResize (ModifiedLayout WindowArranger SimpleFloat)))
               (NewSelect
                  (ModifiedLayout
                     WithBorder
                     (ModifiedLayout
                        (Decoration TabbedDecoration DefaultShrinker) Simplest))
                  (ModifiedLayout
                     WindowArranger
                     (NewSelect
                        (ModifiedLayout Magnifier Tall)
                        (NewSelect
                           (ModifiedLayout WithBorder Full)
                           (NewSelect (Mirror Tall) Accordion))))))))
    arossatoConfig = do
        Handle
    xmobar <- String -> m Handle
    forall (m :: * -> *). MonadIO m => String -> m Handle
    spawnPipe "xmobar" -- REMOVE this line if you do not have xmobar installed!
        XConfig
      (ModifiedLayout
         AvoidStruts
         (NewSelect
            (ModifiedLayout
               (Decoration SimpleDecoration DefaultShrinker)
               (ModifiedLayout
                  MouseResize (ModifiedLayout WindowArranger SimpleFloat)))
            (NewSelect
               (ModifiedLayout
                  WithBorder
                  (ModifiedLayout
                     (Decoration TabbedDecoration DefaultShrinker) Simplest))
               (ModifiedLayout
                  WindowArranger
                  (NewSelect
                     (ModifiedLayout Magnifier Tall)
                     (NewSelect
                        (ModifiedLayout WithBorder Full)
                        (NewSelect (Mirror Tall) Accordion)))))))
    -> m (XConfig
            (ModifiedLayout
               AvoidStruts
               (NewSelect
                  (ModifiedLayout
                     (Decoration SimpleDecoration DefaultShrinker)
                     (ModifiedLayout
                        MouseResize (ModifiedLayout WindowArranger SimpleFloat)))
                  (NewSelect
                     (ModifiedLayout
                        WithBorder
                        (ModifiedLayout
                           (Decoration TabbedDecoration DefaultShrinker) Simplest))
                     (ModifiedLayout
                        WindowArranger
                        (NewSelect
                           (ModifiedLayout Magnifier Tall)
                           (NewSelect
                              (ModifiedLayout WithBorder Full)
                              (NewSelect (Mirror Tall) Accordion))))))))
    forall (m :: * -> *) a. Monad m => a -> m a
    return (XConfig
       (ModifiedLayout
          AvoidStruts
          (NewSelect
             (ModifiedLayout
                (Decoration SimpleDecoration DefaultShrinker)
                (ModifiedLayout
                   MouseResize (ModifiedLayout WindowArranger SimpleFloat)))
             (NewSelect
                (ModifiedLayout
                   WithBorder
                   (ModifiedLayout
                      (Decoration TabbedDecoration DefaultShrinker) Simplest))
                (ModifiedLayout
                   WindowArranger
                   (NewSelect
                      (ModifiedLayout Magnifier Tall)
                      (NewSelect
                         (ModifiedLayout WithBorder Full)
                         (NewSelect (Mirror Tall) Accordion)))))))
     -> m (XConfig
             (ModifiedLayout
                AvoidStruts
                (NewSelect
                   (ModifiedLayout
                      (Decoration SimpleDecoration DefaultShrinker)
                      (ModifiedLayout
                         MouseResize (ModifiedLayout WindowArranger SimpleFloat)))
                   (NewSelect
                      (ModifiedLayout
                         WithBorder
                         (ModifiedLayout
                            (Decoration TabbedDecoration DefaultShrinker) Simplest))
                      (ModifiedLayout
                         WindowArranger
                         (NewSelect
                            (ModifiedLayout Magnifier Tall)
                            (NewSelect
                               (ModifiedLayout WithBorder Full)
                               (NewSelect (Mirror Tall) Accordion)))))))))
    -> XConfig
         (ModifiedLayout
            AvoidStruts
            (NewSelect
               (ModifiedLayout
                  (Decoration SimpleDecoration DefaultShrinker)
                  (ModifiedLayout
                     MouseResize (ModifiedLayout WindowArranger SimpleFloat)))
               (NewSelect
                  (ModifiedLayout
                     WithBorder
                     (ModifiedLayout
                        (Decoration TabbedDecoration DefaultShrinker) Simplest))
                  (ModifiedLayout
                     WindowArranger
                     (NewSelect
                        (ModifiedLayout Magnifier Tall)
                        (NewSelect
                           (ModifiedLayout WithBorder Full)
                           (NewSelect (Mirror Tall) Accordion)))))))
    -> m (XConfig
            (ModifiedLayout
               AvoidStruts
               (NewSelect
                  (ModifiedLayout
                     (Decoration SimpleDecoration DefaultShrinker)
                     (ModifiedLayout
                        MouseResize (ModifiedLayout WindowArranger SimpleFloat)))
                  (NewSelect
                     (ModifiedLayout
                        WithBorder
                        (ModifiedLayout
                           (Decoration TabbedDecoration DefaultShrinker) Simplest))
                     (ModifiedLayout
                        WindowArranger
                        (NewSelect
                           (ModifiedLayout Magnifier Tall)
                           (NewSelect
                              (ModifiedLayout WithBorder Full)
                              (NewSelect (Mirror Tall) Accordion))))))))
    forall a b. (a -> b) -> a -> b
    $ XConfig (Choose Tall (Choose (Mirror Tall) Full))
    forall a. Default a => a
    def
             { workspaces :: [String]
    workspaces         = ["home","var","dev","mail","web","doc"] [String] -> [String] -> [String]
    forall a. [a] -> [a] -> [a]
    ++
                                    (Int -> String) -> [Int] -> [String]
    forall a b. (a -> b) -> [a] -> [b]
    map Int -> String
    forall a. Show a => a -> String
    show [7 .. 9 :: Int]
             , logHook :: X ()
    logHook            = Handle -> X ()
    myDynLog Handle
    xmobar -- REMOVE this line if you do not have xmobar installed!
             , manageHook :: ManageHook
    manageHook         = ManageHook
    forall a s l sd.
    (Ord a, Eq s) =>
    Query (Endo (StackSet String l a s sd))
    newManageHook
             , layoutHook :: ModifiedLayout
      AvoidStruts
      (NewSelect
         (ModifiedLayout
            (Decoration SimpleDecoration DefaultShrinker)
            (ModifiedLayout
               MouseResize (ModifiedLayout WindowArranger SimpleFloat)))
         (NewSelect
            (ModifiedLayout
               WithBorder
               (ModifiedLayout
                  (Decoration TabbedDecoration DefaultShrinker) Simplest))
            (ModifiedLayout
               WindowArranger
               (NewSelect
                  (ModifiedLayout Magnifier Tall)
                  (NewSelect
                     (ModifiedLayout WithBorder Full)
                     (NewSelect (Mirror Tall) Accordion))))))
      Window
    layoutHook         = NewSelect
      (ModifiedLayout
         (Decoration SimpleDecoration DefaultShrinker)
         (ModifiedLayout
            MouseResize (ModifiedLayout WindowArranger SimpleFloat)))
      (NewSelect
         (ModifiedLayout
            WithBorder
            (ModifiedLayout
               (Decoration TabbedDecoration DefaultShrinker) Simplest))
         (ModifiedLayout
            WindowArranger
            (NewSelect
               (ModifiedLayout Magnifier Tall)
               (NewSelect
                  (ModifiedLayout WithBorder Full)
                  (NewSelect (Mirror Tall) Accordion)))))
      Window
    -> ModifiedLayout
         AvoidStruts
         (NewSelect
            (ModifiedLayout
               (Decoration SimpleDecoration DefaultShrinker)
               (ModifiedLayout
                  MouseResize (ModifiedLayout WindowArranger SimpleFloat)))
            (NewSelect
               (ModifiedLayout
                  WithBorder
                  (ModifiedLayout
                     (Decoration TabbedDecoration DefaultShrinker) Simplest))
               (ModifiedLayout
                  WindowArranger
                  (NewSelect
                     (ModifiedLayout Magnifier Tall)
                     (NewSelect
                        (ModifiedLayout WithBorder Full)
                        (NewSelect (Mirror Tall) Accordion))))))
         Window
    forall (l :: * -> *) a.
    LayoutClass l a =>
    l a -> ModifiedLayout AvoidStruts l a
    avoidStruts (NewSelect
       (ModifiedLayout
          (Decoration SimpleDecoration DefaultShrinker)
          (ModifiedLayout
             MouseResize (ModifiedLayout WindowArranger SimpleFloat)))
       (NewSelect
          (ModifiedLayout
             WithBorder
             (ModifiedLayout
                (Decoration TabbedDecoration DefaultShrinker) Simplest))
          (ModifiedLayout
             WindowArranger
             (NewSelect
                (ModifiedLayout Magnifier Tall)
                (NewSelect
                   (ModifiedLayout WithBorder Full)
                   (NewSelect (Mirror Tall) Accordion)))))
       Window
     -> ModifiedLayout
          AvoidStruts
          (NewSelect
             (ModifiedLayout
                (Decoration SimpleDecoration DefaultShrinker)
                (ModifiedLayout
                   MouseResize (ModifiedLayout WindowArranger SimpleFloat)))
             (NewSelect
                (ModifiedLayout
                   WithBorder
                   (ModifiedLayout
                      (Decoration TabbedDecoration DefaultShrinker) Simplest))
                (ModifiedLayout
                   WindowArranger
                   (NewSelect
                      (ModifiedLayout Magnifier Tall)
                      (NewSelect
                         (ModifiedLayout WithBorder Full)
                         (NewSelect (Mirror Tall) Accordion))))))
          Window)
    -> NewSelect
         (ModifiedLayout
            (Decoration SimpleDecoration DefaultShrinker)
            (ModifiedLayout
               MouseResize (ModifiedLayout WindowArranger SimpleFloat)))
         (NewSelect
            (ModifiedLayout
               WithBorder
               (ModifiedLayout
                  (Decoration TabbedDecoration DefaultShrinker) Simplest))
            (ModifiedLayout
               WindowArranger
               (NewSelect
                  (ModifiedLayout Magnifier Tall)
                  (NewSelect
                     (ModifiedLayout WithBorder Full)
                     (NewSelect (Mirror Tall) Accordion)))))
         Window
    -> ModifiedLayout
         AvoidStruts
         (NewSelect
            (ModifiedLayout
               (Decoration SimpleDecoration DefaultShrinker)
               (ModifiedLayout
                  MouseResize (ModifiedLayout WindowArranger SimpleFloat)))
            (NewSelect
               (ModifiedLayout
                  WithBorder
                  (ModifiedLayout
                     (Decoration TabbedDecoration DefaultShrinker) Simplest))
               (ModifiedLayout
                  WindowArranger
                  (NewSelect
                     (ModifiedLayout Magnifier Tall)
                     (NewSelect
                        (ModifiedLayout WithBorder Full)
                        (NewSelect (Mirror Tall) Accordion))))))
         Window
    forall a b. (a -> b) -> a -> b
    $
                                    ModifiedLayout
      (Decoration SimpleDecoration DefaultShrinker)
      (ModifiedLayout
         MouseResize (ModifiedLayout WindowArranger SimpleFloat))
      Window
    forall a.
    Eq a =>
    ModifiedLayout
      (Decoration SimpleDecoration DefaultShrinker)
      (ModifiedLayout
         MouseResize (ModifiedLayout WindowArranger SimpleFloat))
      a
    decorated        ModifiedLayout
      (Decoration SimpleDecoration DefaultShrinker)
      (ModifiedLayout
         MouseResize (ModifiedLayout WindowArranger SimpleFloat))
      Window
    -> NewSelect
         (ModifiedLayout
            WithBorder
            (ModifiedLayout
               (Decoration TabbedDecoration DefaultShrinker) Simplest))
         (ModifiedLayout
            WindowArranger
            (NewSelect
               (ModifiedLayout Magnifier Tall)
               (NewSelect
                  (ModifiedLayout WithBorder Full)
                  (NewSelect (Mirror Tall) Accordion))))
         Window
    -> NewSelect
         (ModifiedLayout
            (Decoration SimpleDecoration DefaultShrinker)
            (ModifiedLayout
               MouseResize (ModifiedLayout WindowArranger SimpleFloat)))
         (NewSelect
            (ModifiedLayout
               WithBorder
               (ModifiedLayout
                  (Decoration TabbedDecoration DefaultShrinker) Simplest))
            (ModifiedLayout
               WindowArranger
               (NewSelect
                  (ModifiedLayout Magnifier Tall)
                  (NewSelect
                     (ModifiedLayout WithBorder Full)
                     (NewSelect (Mirror Tall) Accordion)))))
         Window
    forall (l1 :: * -> *) a (l2 :: * -> *).
    (LayoutClass l1 a, LayoutClass l2 a) =>
    l1 a -> l2 a -> NewSelect l1 l2 a
    |||
                                    ModifiedLayout
      (Decoration TabbedDecoration DefaultShrinker) Simplest Window
    -> ModifiedLayout
         WithBorder
         (ModifiedLayout
            (Decoration TabbedDecoration DefaultShrinker) Simplest)
         Window
    forall (l :: * -> *).
    LayoutClass l Window =>
    l Window -> ModifiedLayout WithBorder l Window
    noBorders ModifiedLayout
      (Decoration TabbedDecoration DefaultShrinker) Simplest Window
    forall a.
    Eq a =>
    ModifiedLayout
      (Decoration TabbedDecoration DefaultShrinker) Simplest a
    mytabs ModifiedLayout
      WithBorder
      (ModifiedLayout
         (Decoration TabbedDecoration DefaultShrinker) Simplest)
      Window
    -> ModifiedLayout
         WindowArranger
         (NewSelect
            (ModifiedLayout Magnifier Tall)
            (NewSelect
               (ModifiedLayout WithBorder Full)
               (NewSelect (Mirror Tall) Accordion)))
         Window
    -> NewSelect
         (ModifiedLayout
            WithBorder
            (ModifiedLayout
               (Decoration TabbedDecoration DefaultShrinker) Simplest))
         (ModifiedLayout
            WindowArranger
            (NewSelect
               (ModifiedLayout Magnifier Tall)
               (NewSelect
                  (ModifiedLayout WithBorder Full)
                  (NewSelect (Mirror Tall) Accordion))))
         Window
    forall (l1 :: * -> *) a (l2 :: * -> *).
    (LayoutClass l1 a, LayoutClass l2 a) =>
    l1 a -> l2 a -> NewSelect l1 l2 a
    |||
                                    ModifiedLayout
      WindowArranger
      (NewSelect
         (ModifiedLayout Magnifier Tall)
         (NewSelect
            (ModifiedLayout WithBorder Full)
            (NewSelect (Mirror Tall) Accordion)))
      Window
    otherLays
             , terminal :: String
    terminal           = "urxvt +sb"
             , normalBorderColor :: String
    normalBorderColor  = "white"
             , focusedBorderColor :: String
    focusedBorderColor = "black"
             , keys :: XConfig Layout -> Map (ButtonMask, Window) (X ())
    keys               = XConfig Layout -> Map (ButtonMask, Window) (X ())
    newKeys
             , handleEventHook :: Event -> X All
    handleEventHook    = Event -> X All
    serverModeEventHook
             , focusFollowsMouse :: Bool
    focusFollowsMouse  = Bool
    False
             }
        where
          -- layouts
          mytabs :: ModifiedLayout
      (Decoration TabbedDecoration DefaultShrinker) Simplest a
    mytabs    =       DefaultShrinker
    -> Theme
    -> ModifiedLayout
         (Decoration TabbedDecoration DefaultShrinker) Simplest a
    forall a s.
    (Eq a, Shrinker s) =>
    s
    -> Theme
    -> ModifiedLayout (Decoration TabbedDecoration s) Simplest a
    tabbed DefaultShrinker
    shrinkText (ThemeInfo -> Theme
    theme ThemeInfo
    smallClean)
          decorated :: ModifiedLayout
      (Decoration SimpleDecoration DefaultShrinker)
      (ModifiedLayout
         MouseResize (ModifiedLayout WindowArranger SimpleFloat))
      a
    decorated = DefaultShrinker
    -> Theme
    -> ModifiedLayout
         (Decoration SimpleDecoration DefaultShrinker)
         (ModifiedLayout
            MouseResize (ModifiedLayout WindowArranger SimpleFloat))
         a
    forall a s.
    (Eq a, Shrinker s) =>
    s
    -> Theme
    -> ModifiedLayout
         (Decoration SimpleDecoration s)
         (ModifiedLayout
            MouseResize (ModifiedLayout WindowArranger SimpleFloat))
         a
    simpleFloat' DefaultShrinker
    shrinkText (ThemeInfo -> Theme
    theme ThemeInfo
    smallClean)
          tiled :: Tall a
    tiled     = Int -> Rational -> Rational -> Tall a
    forall a. Int -> Rational -> Rational -> Tall a
    Tall 1 (3Rational -> Rational -> Rational
    forall a. Fractional a => a -> a -> a
    /100) (1Rational -> Rational -> Rational
    forall a. Fractional a => a -> a -> a
    /2)
          otherLays :: ModifiedLayout
      WindowArranger
      (NewSelect
         (ModifiedLayout Magnifier Tall)
         (NewSelect
            (ModifiedLayout WithBorder Full)
            (NewSelect (Mirror Tall) Accordion)))
      Window
    otherLays = NewSelect
      (ModifiedLayout Magnifier Tall)
      (NewSelect
         (ModifiedLayout WithBorder Full)
         (NewSelect (Mirror Tall) Accordion))
      Window
    -> ModifiedLayout
         WindowArranger
         (NewSelect
            (ModifiedLayout Magnifier Tall)
            (NewSelect
               (ModifiedLayout WithBorder Full)
               (NewSelect (Mirror Tall) Accordion)))
         Window
    forall (l :: * -> *) a. l a -> ModifiedLayout WindowArranger l a
    windowArrange   (NewSelect
       (ModifiedLayout Magnifier Tall)
       (NewSelect
          (ModifiedLayout WithBorder Full)
          (NewSelect (Mirror Tall) Accordion))
       Window
     -> ModifiedLayout
          WindowArranger
          (NewSelect
             (ModifiedLayout Magnifier Tall)
             (NewSelect
                (ModifiedLayout WithBorder Full)
                (NewSelect (Mirror Tall) Accordion)))
          Window)
    -> NewSelect
         (ModifiedLayout Magnifier Tall)
         (NewSelect
            (ModifiedLayout WithBorder Full)
            (NewSelect (Mirror Tall) Accordion))
         Window
    -> ModifiedLayout
         WindowArranger
         (NewSelect
            (ModifiedLayout Magnifier Tall)
            (NewSelect
               (ModifiedLayout WithBorder Full)
               (NewSelect (Mirror Tall) Accordion)))
         Window
    forall a b. (a -> b) -> a -> b
    $
                      Tall Window -> ModifiedLayout Magnifier Tall Window
    forall (l :: * -> *) a. l a -> ModifiedLayout Magnifier l a
    magnifier Tall Window
    forall a. Tall a
    tiled ModifiedLayout Magnifier Tall Window
    -> NewSelect
         (ModifiedLayout WithBorder Full)
         (NewSelect (Mirror Tall) Accordion)
         Window
    -> NewSelect
         (ModifiedLayout Magnifier Tall)
         (NewSelect
            (ModifiedLayout WithBorder Full)
            (NewSelect (Mirror Tall) Accordion))
         Window
    forall (l1 :: * -> *) a (l2 :: * -> *).
    (LayoutClass l1 a, LayoutClass l2 a) =>
    l1 a -> l2 a -> NewSelect l1 l2 a
    |||
                      Full Window -> ModifiedLayout WithBorder Full Window
    forall (l :: * -> *).
    LayoutClass l Window =>
    l Window -> ModifiedLayout WithBorder l Window
    noBorders Full Window
    forall a. Full a
    Full  ModifiedLayout WithBorder Full Window
    -> NewSelect (Mirror Tall) Accordion Window
    -> NewSelect
         (ModifiedLayout WithBorder Full)
         (NewSelect (Mirror Tall) Accordion)
         Window
    forall (l1 :: * -> *) a (l2 :: * -> *).
    (LayoutClass l1 a, LayoutClass l2 a) =>
    l1 a -> l2 a -> NewSelect l1 l2 a
    |||
                      Tall Window -> Mirror Tall Window
    forall (l :: * -> *) a. l a -> Mirror l a
    Mirror Tall Window
    forall a. Tall a
    tiled    Mirror Tall Window
    -> Accordion Window -> NewSelect (Mirror Tall) Accordion Window
    forall (l1 :: * -> *) a (l2 :: * -> *).
    (LayoutClass l1 a, LayoutClass l2 a) =>
    l1 a -> l2 a -> NewSelect l1 l2 a
    |||
                      Accordion Window
    forall a. Accordion a
    Accordion

          -- manageHook
          myManageHook :: Query (Endo (StackSet String l a s sd))
    myManageHook  = [Query (Endo (StackSet String l a s sd))]
    -> Query (Endo (StackSet String l a s sd))
    forall m. Monoid m => [m] -> m
    composeAll [ Query String
    resource Query String -> String -> Query Bool
    forall a. Eq a => Query a -> a -> Query Bool
    =? "win"          Query Bool
    -> Query (Endo (StackSet String l a s sd))
    -> Query (Endo (StackSet String l a s sd))
    forall (m :: * -> *) a. (Monad m, Monoid a) => m Bool -> m a -> m a
    --> (StackSet String l a s sd -> StackSet String l a s sd)
    -> Query (Endo (StackSet String l a s sd))
    forall s. (s -> s) -> Query (Endo s)
    doF (String -> StackSet String l a s sd -> StackSet String l a s sd
    forall a s i l sd.
    (Ord a, Eq s, Eq i) =>
    i -> StackSet i l a s sd -> StackSet i l a s sd
    W.shift "doc") -- xpdf
                                     , Query String
    resource Query String -> String -> Query Bool
    forall a. Eq a => Query a -> a -> Query Bool
    =? "firefox-bin"  Query Bool
    -> Query (Endo (StackSet String l a s sd))
    -> Query (Endo (StackSet String l a s sd))
    forall (m :: * -> *) a. (Monad m, Monoid a) => m Bool -> m a -> m a
    --> (StackSet String l a s sd -> StackSet String l a s sd)
    -> Query (Endo (StackSet String l a s sd))
    forall s. (s -> s) -> Query (Endo s)
    doF (String -> StackSet String l a s sd -> StackSet String l a s sd
    forall a s i l sd.
    (Ord a, Eq s, Eq i) =>
    i -> StackSet i l a s sd -> StackSet i l a s sd
    W.shift "web")
                                     ]
          newManageHook :: Query (Endo (StackSet String l a s sd))
    newManageHook = Query (Endo (StackSet String l a s sd))
    forall a s l sd.
    (Ord a, Eq s) =>
    Query (Endo (StackSet String l a s sd))
    myManageHook

          -- xmobar
          myDynLog :: Handle -> X ()
    myDynLog    h :: Handle
    h = PP -> X ()
    dynamicLogWithPP PP
    forall a. Default a => a
    def
                          { ppCurrent :: String -> String
    ppCurrent = String -> String -> String -> String
    xmobarColor "yellow" "" (String -> String) -> (String -> String) -> String -> String
    forall b c a. (b -> c) -> (a -> b) -> a -> c
    . String -> String -> String -> String
    wrap "[" "]"
                          , ppTitle :: String -> String
    ppTitle   = String -> String -> String -> String
    xmobarColor "green"  "" (String -> String) -> (String -> String) -> String -> String
    forall b c a. (b -> c) -> (a -> b) -> a -> c
    . Int -> String -> String
    shorten 40
                          , ppVisible :: String -> String
    ppVisible = String -> String -> String -> String
    wrap "(" ")"
                          , ppOutput :: String -> IO ()
    ppOutput  = Handle -> String -> IO ()
    hPutStrLn Handle
    h
                          }

          -- key bindings stuff
          defKeys :: XConfig Layout -> Map (ButtonMask, Window) (X ())
    defKeys    = XConfig (Choose Tall (Choose (Mirror Tall) Full))
    -> XConfig Layout -> Map (ButtonMask, Window) (X ())
    forall (l :: * -> *).
    XConfig l -> XConfig Layout -> Map (ButtonMask, Window) (X ())
    keys XConfig (Choose Tall (Choose (Mirror Tall) Full))
    forall a. Default a => a
    def
          delKeys :: XConfig Layout -> Map (ButtonMask, Window) (X ())
    delKeys x :: XConfig Layout
    x  = ((ButtonMask, Window)
     -> Map (ButtonMask, Window) (X ())
     -> Map (ButtonMask, Window) (X ()))
    -> Map (ButtonMask, Window) (X ())
    -> [(ButtonMask, Window)]
    -> Map (ButtonMask, Window) (X ())
    forall (t :: * -> *) a b.
    Foldable t =>
    (a -> b -> b) -> b -> t a -> b
    foldr (ButtonMask, Window)
    -> Map (ButtonMask, Window) (X ())
    -> Map (ButtonMask, Window) (X ())
    forall k a. Ord k => k -> Map k a -> Map k a
    M.delete           (XConfig Layout -> Map (ButtonMask, Window) (X ())
    defKeys XConfig Layout
    x) (XConfig Layout -> [(ButtonMask, Window)]
    forall (l :: * -> *). XConfig l -> [(ButtonMask, Window)]
    toRemove XConfig Layout
    x)
          newKeys :: XConfig Layout -> Map (ButtonMask, Window) (X ())
    newKeys x :: XConfig Layout
    x  = (((ButtonMask, Window), X ())
     -> Map (ButtonMask, Window) (X ())
     -> Map (ButtonMask, Window) (X ()))
    -> Map (ButtonMask, Window) (X ())
    -> [((ButtonMask, Window), X ())]
    -> Map (ButtonMask, Window) (X ())
    forall (t :: * -> *) a b.
    Foldable t =>
    (a -> b -> b) -> b -> t a -> b
    foldr (((ButtonMask, Window)
     -> X ()
     -> Map (ButtonMask, Window) (X ())
     -> Map (ButtonMask, Window) (X ()))
    -> ((ButtonMask, Window), X ())
    -> Map (ButtonMask, Window) (X ())
    -> Map (ButtonMask, Window) (X ())
    forall a b c. (a -> b -> c) -> (a, b) -> c
    uncurry (ButtonMask, Window)
    -> X ()
    -> Map (ButtonMask, Window) (X ())
    -> Map (ButtonMask, Window) (X ())
    forall k a. Ord k => k -> a -> Map k a -> Map k a
    M.insert) (XConfig Layout -> Map (ButtonMask, Window) (X ())
    delKeys XConfig Layout
    x) (XConfig Layout -> [((ButtonMask, Window), X ())]
    forall (l :: * -> *). XConfig l -> [((ButtonMask, Window), X ())]
    toAdd    XConfig Layout
    x)
          -- remove some of the default key bindings
          toRemove :: XConfig l -> [(ButtonMask, Window)]
    toRemove x :: XConfig l
    x =
              [ (XConfig l -> ButtonMask
    forall (l :: * -> *). XConfig l -> ButtonMask
    modMask XConfig l
    x              , Window
    xK_j)
              , (XConfig l -> ButtonMask
    forall (l :: * -> *). XConfig l -> ButtonMask
    modMask XConfig l
    x              , Window
    xK_k)
              , (XConfig l -> ButtonMask
    forall (l :: * -> *). XConfig l -> ButtonMask
    modMask XConfig l
    x              , Window
    xK_p)
              , (XConfig l -> ButtonMask
    forall (l :: * -> *). XConfig l -> ButtonMask
    modMask XConfig l
    x ButtonMask -> ButtonMask -> ButtonMask
    forall a. Bits a => a -> a -> a
    .|. ButtonMask
    shiftMask, Window
    xK_p)
              , (XConfig l -> ButtonMask
    forall (l :: * -> *). XConfig l -> ButtonMask
    modMask XConfig l
    x ButtonMask -> ButtonMask -> ButtonMask
    forall a. Bits a => a -> a -> a
    .|. ButtonMask
    shiftMask, Window
    xK_q)
              , (XConfig l -> ButtonMask
    forall (l :: * -> *). XConfig l -> ButtonMask
    modMask XConfig l
    x              , Window
    xK_q)
              ] [(ButtonMask, Window)]
    -> [(ButtonMask, Window)] -> [(ButtonMask, Window)]
    forall a. [a] -> [a] -> [a]
    ++
              -- I want modMask .|. shiftMask 1-9 to be free!
              [(ButtonMask
    shiftMask ButtonMask -> ButtonMask -> ButtonMask
    forall a. Bits a => a -> a -> a
    .|. XConfig l -> ButtonMask
    forall (l :: * -> *). XConfig l -> ButtonMask
    modMask XConfig l
    x, Window
    k) | Window
    k <- [Window
    xK_1 .. Window
    xK_9]]
          -- These are my personal key bindings
          toAdd :: XConfig l -> [((ButtonMask, Window), X ())]
    toAdd x :: XConfig l
    x   =
              [ ((XConfig l -> ButtonMask
    forall (l :: * -> *). XConfig l -> ButtonMask
    modMask XConfig l
    x              , Window
    xK_F12   ), XPConfig -> X ()
    xmonadPrompt      XPConfig
    forall a. Default a => a
    def                 )
              , ((XConfig l -> ButtonMask
    forall (l :: * -> *). XConfig l -> ButtonMask
    modMask XConfig l
    x              , Window
    xK_F3    ), XPConfig -> X ()
    shellPrompt       XPConfig
    forall a. Default a => a
    def                 )
              , ((XConfig l -> ButtonMask
    forall (l :: * -> *). XConfig l -> ButtonMask
    modMask XConfig l
    x              , Window
    xK_F4    ), XPConfig -> X ()
    sshPrompt         XPConfig
    forall a. Default a => a
    def                 )
              , ((XConfig l -> ButtonMask
    forall (l :: * -> *). XConfig l -> ButtonMask
    modMask XConfig l
    x              , Window
    xK_F5    ), XPConfig -> X ()
    themePrompt       XPConfig
    forall a. Default a => a
    def                 )
              , ((XConfig l -> ButtonMask
    forall (l :: * -> *). XConfig l -> ButtonMask
    modMask XConfig l
    x              , Window
    xK_F6    ), XPConfig -> X ()
    windowPromptGoto  XPConfig
    forall a. Default a => a
    def                 )
              , ((XConfig l -> ButtonMask
    forall (l :: * -> *). XConfig l -> ButtonMask
    modMask XConfig l
    x              , Window
    xK_F7    ), XPConfig -> X ()
    windowPromptBring XPConfig
    forall a. Default a => a
    def                 )
              , ((XConfig l -> ButtonMask
    forall (l :: * -> *). XConfig l -> ButtonMask
    modMask XConfig l
    x              , Window
    xK_comma ), X ()
    prevWS                                )
              , ((XConfig l -> ButtonMask
    forall (l :: * -> *). XConfig l -> ButtonMask
    modMask XConfig l
    x              , Window
    xK_period), X ()
    nextWS                                )
              , ((XConfig l -> ButtonMask
    forall (l :: * -> *). XConfig l -> ButtonMask
    modMask XConfig l
    x              , Window
    xK_Right ), (WindowSet -> WindowSet) -> X ()
    windows WindowSet -> WindowSet
    forall i l a s sd. StackSet i l a s sd -> StackSet i l a s sd
    W.focusDown                   )
              , ((XConfig l -> ButtonMask
    forall (l :: * -> *). XConfig l -> ButtonMask
    modMask XConfig l
    x              , Window
    xK_Left  ), (WindowSet -> WindowSet) -> X ()
    windows WindowSet -> WindowSet
    forall i l a s sd. StackSet i l a s sd -> StackSet i l a s sd
    W.focusUp                     )
              -- other stuff: launch some useful utilities
              , ((XConfig l -> ButtonMask
    forall (l :: * -> *). XConfig l -> ButtonMask
    modMask XConfig l
    x              , Window
    xK_F2    ), String -> X ()
    forall (m :: * -> *). MonadIO m => String -> m ()
    spawn "urxvt -fg white -bg black +sb" )
              , ((XConfig l -> ButtonMask
    forall (l :: * -> *). XConfig l -> ButtonMask
    modMask XConfig l
    x ButtonMask -> ButtonMask -> ButtonMask
    forall a. Bits a => a -> a -> a
    .|. ButtonMask
    shiftMask, Window
    xK_F4    ), String -> X ()
    forall (m :: * -> *). MonadIO m => String -> m ()
    spawn "~/bin/dict.sh"                 )
              , ((XConfig l -> ButtonMask
    forall (l :: * -> *). XConfig l -> ButtonMask
    modMask XConfig l
    x ButtonMask -> ButtonMask -> ButtonMask
    forall a. Bits a => a -> a -> a
    .|. ButtonMask
    shiftMask, Window
    xK_F5    ), String -> X ()
    forall (m :: * -> *). MonadIO m => String -> m ()
    spawn "~/bin/urlOpen.sh"              )
              , ((XConfig l -> ButtonMask
    forall (l :: * -> *). XConfig l -> ButtonMask
    modMask XConfig l
    x ButtonMask -> ButtonMask -> ButtonMask
    forall a. Bits a => a -> a -> a
    .|. ButtonMask
    shiftMask, Window
    xK_t     ), String -> X ()
    forall (m :: * -> *). MonadIO m => String -> m ()
    spawn "~/bin/teaTime.sh"              )
              , ((XConfig l -> ButtonMask
    forall (l :: * -> *). XConfig l -> ButtonMask
    modMask XConfig l
    x              , Window
    xK_c     ), X ()
    kill                                  )
              , ((XConfig l -> ButtonMask
    forall (l :: * -> *). XConfig l -> ButtonMask
    modMask XConfig l
    x ButtonMask -> ButtonMask -> ButtonMask
    forall a. Bits a => a -> a -> a
    .|. ButtonMask
    shiftMask, Window
    xK_comma ), IncMasterN -> X ()
    forall a. Message a => a -> X ()
    sendMessage (Int -> IncMasterN
    IncMasterN   1 )         )
              , ((XConfig l -> ButtonMask
    forall (l :: * -> *). XConfig l -> ButtonMask
    modMask XConfig l
    x ButtonMask -> ButtonMask -> ButtonMask
    forall a. Bits a => a -> a -> a
    .|. ButtonMask
    shiftMask, Window
    xK_period), IncMasterN -> X ()
    forall a. Message a => a -> X ()
    sendMessage (Int -> IncMasterN
    IncMasterN (-1))         )
              -- commands fo the Magnifier layout
              , ((XConfig l -> ButtonMask
    forall (l :: * -> *). XConfig l -> ButtonMask
    modMask XConfig l
    x ButtonMask -> ButtonMask -> ButtonMask
    forall a. Bits a => a -> a -> a
    .|. ButtonMask
    controlMask              , Window
    xK_plus ), MagnifyMsg -> X ()
    forall a. Message a => a -> X ()
    sendMessage MagnifyMsg
    MagnifyMore)
              , ((XConfig l -> ButtonMask
    forall (l :: * -> *). XConfig l -> ButtonMask
    modMask XConfig l
    x ButtonMask -> ButtonMask -> ButtonMask
    forall a. Bits a => a -> a -> a
    .|. ButtonMask
    controlMask              , Window
    xK_minus), MagnifyMsg -> X ()
    forall a. Message a => a -> X ()
    sendMessage MagnifyMsg
    MagnifyLess)
              , ((XConfig l -> ButtonMask
    forall (l :: * -> *). XConfig l -> ButtonMask
    modMask XConfig l
    x ButtonMask -> ButtonMask -> ButtonMask
    forall a. Bits a => a -> a -> a
    .|. ButtonMask
    controlMask              , Window
    xK_o    ), MagnifyMsg -> X ()
    forall a. Message a => a -> X ()
    sendMessage MagnifyMsg
    ToggleOff  )
              , ((XConfig l -> ButtonMask
    forall (l :: * -> *). XConfig l -> ButtonMask
    modMask XConfig l
    x ButtonMask -> ButtonMask -> ButtonMask
    forall a. Bits a => a -> a -> a
    .|. ButtonMask
    controlMask ButtonMask -> ButtonMask -> ButtonMask
    forall a. Bits a => a -> a -> a
    .|. ButtonMask
    shiftMask, Window
    xK_o    ), MagnifyMsg -> X ()
    forall a. Message a => a -> X ()
    sendMessage MagnifyMsg
    ToggleOn   )
              -- windowArranger
              , ((XConfig l -> ButtonMask
    forall (l :: * -> *). XConfig l -> ButtonMask
    modMask XConfig l
    x ButtonMask -> ButtonMask -> ButtonMask
    forall a. Bits a => a -> a -> a
    .|. ButtonMask
    controlMask              , Window
    xK_a    ), WindowArrangerMsg -> X ()
    forall a. Message a => a -> X ()
    sendMessage  WindowArrangerMsg
    Arrange           )
              , ((XConfig l -> ButtonMask
    forall (l :: * -> *). XConfig l -> ButtonMask
    modMask XConfig l
    x ButtonMask -> ButtonMask -> ButtonMask
    forall a. Bits a => a -> a -> a
    .|. ButtonMask
    controlMask ButtonMask -> ButtonMask -> ButtonMask
    forall a. Bits a => a -> a -> a
    .|. ButtonMask
    shiftMask, Window
    xK_a    ), WindowArrangerMsg -> X ()
    forall a. Message a => a -> X ()
    sendMessage  WindowArrangerMsg
    DeArrange         )
              , ((XConfig l -> ButtonMask
    forall (l :: * -> *). XConfig l -> ButtonMask
    modMask XConfig l
    x ButtonMask -> ButtonMask -> ButtonMask
    forall a. Bits a => a -> a -> a
    .|. ButtonMask
    controlMask              , Window
    xK_Left ), WindowArrangerMsg -> X ()
    forall a. Message a => a -> X ()
    sendMessage (Int -> WindowArrangerMsg
    DecreaseLeft   10))
              , ((XConfig l -> ButtonMask
    forall (l :: * -> *). XConfig l -> ButtonMask
    modMask XConfig l
    x ButtonMask -> ButtonMask -> ButtonMask
    forall a. Bits a => a -> a -> a
    .|. ButtonMask
    controlMask              , Window
    xK_Up   ), WindowArrangerMsg -> X ()
    forall a. Message a => a -> X ()
    sendMessage (Int -> WindowArrangerMsg
    DecreaseUp     10))
              , ((XConfig l -> ButtonMask
    forall (l :: * -> *). XConfig l -> ButtonMask
    modMask XConfig l
    x ButtonMask -> ButtonMask -> ButtonMask
    forall a. Bits a => a -> a -> a
    .|. ButtonMask
    controlMask              , Window
    xK_Right), WindowArrangerMsg -> X ()
    forall a. Message a => a -> X ()
    sendMessage (Int -> WindowArrangerMsg
    IncreaseRight  10))
              , ((XConfig l -> ButtonMask
    forall (l :: * -> *). XConfig l -> ButtonMask
    modMask XConfig l
    x ButtonMask -> ButtonMask -> ButtonMask
    forall a. Bits a => a -> a -> a
    .|. ButtonMask
    controlMask              , Window
    xK_Down ), WindowArrangerMsg -> X ()
    forall a. Message a => a -> X ()
    sendMessage (Int -> WindowArrangerMsg
    IncreaseDown   10))
              , ((XConfig l -> ButtonMask
    forall (l :: * -> *). XConfig l -> ButtonMask
    modMask XConfig l
    x ButtonMask -> ButtonMask -> ButtonMask
    forall a. Bits a => a -> a -> a
    .|. ButtonMask
    shiftMask                , Window
    xK_Left ), WindowArrangerMsg -> X ()
    forall a. Message a => a -> X ()
    sendMessage (Int -> WindowArrangerMsg
    MoveLeft       10))
              , ((XConfig l -> ButtonMask
    forall (l :: * -> *). XConfig l -> ButtonMask
    modMask XConfig l
    x ButtonMask -> ButtonMask -> ButtonMask
    forall a. Bits a => a -> a -> a
    .|. ButtonMask
    shiftMask                , Window
    xK_Right), WindowArrangerMsg -> X ()
    forall a. Message a => a -> X ()
    sendMessage (Int -> WindowArrangerMsg
    MoveRight      10))
              , ((XConfig l -> ButtonMask
    forall (l :: * -> *). XConfig l -> ButtonMask
    modMask XConfig l
    x ButtonMask -> ButtonMask -> ButtonMask
    forall a. Bits a => a -> a -> a
    .|. ButtonMask
    shiftMask                , Window
    xK_Down ), WindowArrangerMsg -> X ()
    forall a. Message a => a -> X ()
    sendMessage (Int -> WindowArrangerMsg
    MoveDown       10))
              , ((XConfig l -> ButtonMask
    forall (l :: * -> *). XConfig l -> ButtonMask
    modMask XConfig l
    x ButtonMask -> ButtonMask -> ButtonMask
    forall a. Bits a => a -> a -> a
    .|. ButtonMask
    shiftMask                , Window
    xK_Up   ), WindowArrangerMsg -> X ()
    forall a. Message a => a -> X ()
    sendMessage (Int -> WindowArrangerMsg
    MoveUp         10))
              -- gaps
              , ((XConfig l -> ButtonMask
    forall (l :: * -> *). XConfig l -> ButtonMask
    modMask XConfig l
    x                              , Window
    xK_b    ), ToggleStruts -> X ()
    forall a. Message a => a -> X ()
    sendMessage  ToggleStruts
    ToggleStruts      )

              ] [((ButtonMask, Window), X ())]
    -> [((ButtonMask, Window), X ())] -> [((ButtonMask, Window), X ())]
    forall a. [a] -> [a] -> [a]
    ++
              -- Use modMask .|. shiftMask .|. controlMask 1-9 instead
              [( (ButtonMask
    m ButtonMask -> ButtonMask -> ButtonMask
    forall a. Bits a => a -> a -> a
    .|. XConfig l -> ButtonMask
    forall (l :: * -> *). XConfig l -> ButtonMask
    modMask XConfig l
    x, Window
    k), (WindowSet -> WindowSet) -> X ()
    windows ((WindowSet -> WindowSet) -> X ())
    -> (WindowSet -> WindowSet) -> X ()
    forall a b. (a -> b) -> a -> b
    $ String -> WindowSet -> WindowSet
    f String
    i)
               | (i :: String
    i, k :: Window
    k) <- [String] -> [Window] -> [(String, Window)]
    forall a b. [a] -> [b] -> [(a, b)]
    zip (XConfig l -> [String]
    forall (l :: * -> *). XConfig l -> [String]
    workspaces XConfig l
    x) [Window
    xK_1 .. Window
    xK_9]
              ,  (f :: String -> WindowSet -> WindowSet
    f, m :: ButtonMask
    m) <- [(String -> WindowSet -> WindowSet
    forall s i l a sd.
    (Eq s, Eq i) =>
    i -> StackSet i l a s sd -> StackSet i l a s sd
    W.greedyView, 0), (String -> WindowSet -> WindowSet
    forall a s i l sd.
    (Ord a, Eq s, Eq i) =>
    i -> StackSet i l a s sd -> StackSet i l a s sd
    W.shift, ButtonMask
    shiftMask ButtonMask -> ButtonMask -> ButtonMask
    forall a. Bits a => a -> a -> a
    .|. ButtonMask
    controlMask)]
              ]