-- for className use xprop
myManageHook = manageDocks <+> composeOne
    [ isDialog                      -?> doFloat
    , className =? "owncloud"       -?> unfloat
    , className =? "XClock"         -?> doFloat
    , className =? "Xmessage"       -?> doFloat
    , className =? "Gxmessage"      -?> doFloat
    , className =? "Ncview"         -?> doCenterFloat
    , workspace =? "1"              -?> doShift "1"
    , workspace =? "2"              -?> doShift "2"
    , workspace =? "3"              -?> doShift "3"
    , workspace =? "4"              -?> doShift "4"
    , workspace =? "5"              -?> doShift "5"
    , workspace =? "6"              -?> doShift "6"
    , workspace =? "7"              -?> doShift "7"
    , workspace =? "8"              -?> doShift "8"
    , workspace =? "9"              -?> doShift "9"
    , className =? "panel"          -?> doIgnore
    , resource  =? "desktop_window" -?> doIgnore
    , role      =? "pop-up"         -?> doCenterFloat
    --, transience -- if window is transient move it to its parent
    ]
    <+> (doF W.swapDown)
    <+> namedScratchpadManageHook myScratchPads
  where role = stringProperty "WM_WINDOW_ROLE"
        workspace = stringProperty "XMONAD_WORKSPACE"
        unfloat = ask >>= doF . W.sink
myManageHook = manageDocks <+> composeOne
    [ isDialog                      -?> doFloat
    , className =? "owncloud"       -?> unfloat
    , className =? "XClock"         -?> doFloat
    , className =? "Xmessage"       -?> doFloat
    , className =? "Gxmessage"      -?> doFloat
    , className =? "Ncview"         -?> doCenterFloat
    , workspace =? "1"              -?> doShift "1"
    , workspace =? "2"              -?> doShift "2"
    , workspace =? "3"              -?> doShift "3"
    , workspace =? "4"              -?> doShift "4"
    , workspace =? "5"              -?> doShift "5"
    , workspace =? "6"              -?> doShift "6"
    , workspace =? "7"              -?> doShift "7"
    , workspace =? "8"              -?> doShift "8"
    , workspace =? "9"              -?> doShift "9"
    , className =? "panel"          -?> doIgnore
    , resource  =? "desktop_window" -?> doIgnore
    , role      =? "pop-up"         -?> doCenterFloat
    --, transience -- if window is transient move it to its parent
    ]
    <+> (doF W.swapDown)
    <+> namedScratchpadManageHook myScratchPads
  where role = stringProperty "WM_WINDOW_ROLE"
        workspace = stringProperty "XMONAD_WORKSPACE"
        unfloat = ask >>= doF . W.sink
myManageHook = manageDocks <+> composeOne
    [ isDialog                      -?> doFloat
    , className =? "owncloud"       -?> unfloat
    , className =? "XClock"         -?> doFloat
    , className =? "Xmessage"       -?> doFloat
    , className =? "Gxmessage"      -?> doFloat
    , className =? "Ncview"         -?> doCenterFloat
    , workspace =? "1"              -?> doShift "1"
    , workspace =? "2"              -?> doShift "2"
    , workspace =? "3"              -?> doShift "3"
    , workspace =? "4"              -?> doShift "4"
    , workspace =? "5"              -?> doShift "5"
    , workspace =? "6"              -?> doShift "6"
    , workspace =? "7"              -?> doShift "7"
    , workspace =? "8"              -?> doShift "8"
    , workspace =? "9"              -?> doShift "9"
    , className =? "panel"          -?> doIgnore
    , resource  =? "desktop_window" -?> doIgnore
    , role      =? "pop-up"         -?> doCenterFloat
    --, transience -- if window is transient move it to its parent
    ]
    <+> (doF W.swapDown)
    <+> namedScratchpadManageHook myScratchPads
  where role = stringProperty "WM_WINDOW_ROLE"
        workspace = stringProperty "XMONAD_WORKSPACE"
        unfloat = ask >>= doF . W.sink