ENH remove prelude from main bin
This commit is contained in:
parent
71e86f2233
commit
96cb9298d7
|
@ -1,5 +1,3 @@
|
||||||
{-# LANGUAGE ImplicitPrelude #-}
|
|
||||||
|
|
||||||
--------------------------------------------------------------------------------
|
--------------------------------------------------------------------------------
|
||||||
-- XMonad binary
|
-- XMonad binary
|
||||||
|
|
||||||
|
@ -23,7 +21,7 @@ import System.Process
|
||||||
( getPid
|
( getPid
|
||||||
, getProcessExitCode
|
, getProcessExitCode
|
||||||
)
|
)
|
||||||
import XMonad
|
import XMonad hiding (display)
|
||||||
import XMonad.Actions.CopyWindow
|
import XMonad.Actions.CopyWindow
|
||||||
import XMonad.Actions.CycleWS
|
import XMonad.Actions.CycleWS
|
||||||
import XMonad.Actions.PhysicalScreens
|
import XMonad.Actions.PhysicalScreens
|
||||||
|
@ -141,21 +139,21 @@ run = do
|
||||||
, normalBorderColor = T.unpack XT.bordersColor
|
, normalBorderColor = T.unpack XT.bordersColor
|
||||||
, focusedBorderColor = T.unpack XT.selectedBordersColor
|
, focusedBorderColor = T.unpack XT.selectedBordersColor
|
||||||
}
|
}
|
||||||
io $ runXMonad conf
|
runXMonad conf
|
||||||
where
|
where
|
||||||
startDynWorkspaces fs = do
|
startDynWorkspaces fs = do
|
||||||
dws <- catMaybes <$> mapM evalSometimes (fsDynWorkspaces fs)
|
dws <- catMaybes <$> mapM evalSometimes (fsDynWorkspaces fs)
|
||||||
void $ async $ runWorkspaceMon dws
|
void $ async $ runWorkspaceMon dws
|
||||||
return dws
|
return dws
|
||||||
|
|
||||||
runXMonad :: (LayoutClass l Window, Read (l Window)) => XConfig l -> IO ()
|
runXMonad :: (LayoutClass l Window, Read (l Window)) => XConfig l -> XIO ()
|
||||||
runXMonad conf = do
|
runXMonad conf = do
|
||||||
dirs <- getCreateDirectories
|
dirs <- getCreateDirectories
|
||||||
launch conf dirs
|
liftIO $ launch conf dirs
|
||||||
|
|
||||||
getCreateDirectories :: IO Directories
|
getCreateDirectories :: XIO Directories
|
||||||
getCreateDirectories = do
|
getCreateDirectories = do
|
||||||
ds <- getDirectories
|
ds <- liftIO getDirectories
|
||||||
mapM_ (createIfMissing ds) [dataDir, cfgDir, cacheDir]
|
mapM_ (createIfMissing ds) [dataDir, cfgDir, cacheDir]
|
||||||
return ds
|
return ds
|
||||||
where
|
where
|
||||||
|
@ -163,7 +161,7 @@ getCreateDirectories = do
|
||||||
let d = f ds
|
let d = f ds
|
||||||
r <- tryIO $ createDirectoryIfMissing True d
|
r <- tryIO $ createDirectoryIfMissing True d
|
||||||
case r of
|
case r of
|
||||||
(Left e) -> print e
|
(Left e) -> logError $ display e
|
||||||
_ -> return ()
|
_ -> return ()
|
||||||
|
|
||||||
data FeatureSet = FeatureSet
|
data FeatureSet = FeatureSet
|
||||||
|
|
Loading…
Reference in New Issue