From aff60a94095099db865d996e1deb0334985864e0 Mon Sep 17 00:00:00 2001 From: ndwarshuis Date: Sat, 19 Jun 2021 16:20:14 -0400 Subject: [PATCH] REF write message to future self warning of the dangers of flushing --- bin/xmonad.hs | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/bin/xmonad.hs b/bin/xmonad.hs index 8b726b7..8d89296 100644 --- a/bin/xmonad.hs +++ b/bin/xmonad.hs @@ -75,6 +75,11 @@ main = do , childHandles = [h] } (ekbs, missing) <- fmap filterExternal $ evalExternal $ externalBindings ts + -- TODO this seems really dumb but I can't print outside the launch function; + -- this seems like a buffering problem since I can print something here and + -- then print from the launch function (eg in the X monad) and both messages + -- will print. However, trying to flush the print output from here makes + -- xmonad bootloop let missingErrs = warnMissing <$> missing launch $ ewmh @@ -117,7 +122,7 @@ runCleanup ts = io $ do -- TODO add _NET_DESKTOP_VIEWPORTS to _NET_SUPPORTED? myStartupHook :: [String] -> X () myStartupHook msgs = setDefaultCursor xC_left_ptr - <+> (io $ mapM_ print msgs) + <+> io (mapM_ print msgs) <+> docksStartupHook <+> startupHook def