[XMonad] Move main to top of xmonad.hs

This commit is contained in:
Ivan Malison 2016-10-26 13:23:44 -07:00
parent 352f684cca
commit 093bf7314a
No known key found for this signature in database
GPG Key ID: 62530EFBE99DC2F8

View File

@ -35,6 +35,18 @@ import XMonad.Util.CustomKeys
import qualified XMonad.Util.ExtensibleState as XS import qualified XMonad.Util.ExtensibleState as XS
import XMonad.Util.NamedWindows (getName) import XMonad.Util.NamedWindows (getName)
main = xmonad $ pagerHints def
{ modMask = mod4Mask
, terminal = "urxvt"
, manageHook = manageDocks <+> myManageHook <+> manageHook def
, layoutHook = myLayoutHook
, logHook = myLogHook +++ ewmhWorkspaceNamesLogHook
, handleEventHook = docksEventHook <+> fullscreenEventHook +++ ewmhDesktopsEventHook
, startupHook = myStartup +++ ewmhWorkspaceNamesLogHook
, keys = customKeys (const []) addKeys
} where
x +++ y = mappend y x
getClass :: Window -> X String getClass :: Window -> X String
getClass w = do getClass w = do
classHint <- withDisplay $ \d -> io $ getClassHint d w classHint <- withDisplay $ \d -> io $ getClassHint d w
@ -57,18 +69,6 @@ getClassRemap = do
text <- B.readFile (home </> ".lib/class_remap.json") text <- B.readFile (home </> ".lib/class_remap.json")
return $ fromMaybe M.empty (decode text) return $ fromMaybe M.empty (decode text)
main = xmonad $ pagerHints def
{ modMask = mod4Mask
, terminal = "urxvt"
, manageHook = manageDocks <+> myManageHook <+> manageHook def
, layoutHook = myLayoutHook
, logHook = myLogHook +++ ewmhWorkspaceNamesLogHook
, handleEventHook = docksEventHook <+> fullscreenEventHook +++ ewmhDesktopsEventHook
, startupHook = myStartup +++ ewmhWorkspaceNamesLogHook
, keys = customKeys (const []) addKeys
} where
x +++ y = mappend y x
myLogHook = fadeInactiveLogHook 0.9 myLogHook = fadeInactiveLogHook 0.9
ewmhWorkspaceNamesLogHook = do ewmhWorkspaceNamesLogHook = do