ENH remove prelude from main bin

This commit is contained in:
Nathan Dwarshuis 2023-02-12 23:13:46 -05:00
parent 71e86f2233
commit 96cb9298d7
1 changed files with 7 additions and 9 deletions

View File

@ -1,5 +1,3 @@
{-# LANGUAGE ImplicitPrelude #-}
--------------------------------------------------------------------------------
-- XMonad binary
@ -23,7 +21,7 @@ import System.Process
( getPid
, getProcessExitCode
)
import XMonad
import XMonad hiding (display)
import XMonad.Actions.CopyWindow
import XMonad.Actions.CycleWS
import XMonad.Actions.PhysicalScreens
@ -141,21 +139,21 @@ run = do
, normalBorderColor = T.unpack XT.bordersColor
, focusedBorderColor = T.unpack XT.selectedBordersColor
}
io $ runXMonad conf
runXMonad conf
where
startDynWorkspaces fs = do
dws <- catMaybes <$> mapM evalSometimes (fsDynWorkspaces fs)
void $ async $ runWorkspaceMon 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
dirs <- getCreateDirectories
launch conf dirs
liftIO $ launch conf dirs
getCreateDirectories :: IO Directories
getCreateDirectories :: XIO Directories
getCreateDirectories = do
ds <- getDirectories
ds <- liftIO getDirectories
mapM_ (createIfMissing ds) [dataDir, cfgDir, cacheDir]
return ds
where
@ -163,7 +161,7 @@ getCreateDirectories = do
let d = f ds
r <- tryIO $ createDirectoryIfMissing True d
case r of
(Left e) -> print e
(Left e) -> logError $ display e
_ -> return ()
data FeatureSet = FeatureSet