summaryrefslogtreecommitdiffstats
path: root/Main.hs
diff options
context:
space:
mode:
Diffstat (limited to 'Main.hs')
-rw-r--r--Main.hs3
1 files changed, 2 insertions, 1 deletions
diff --git a/Main.hs b/Main.hs
index 8c9b485..1b2e42f 100644
--- a/Main.hs
+++ b/Main.hs
@@ -45,6 +45,7 @@ main = do
xinesc <- getScreenInfo dpy
nbc <- initcolor normalBorderColor
fbc <- initcolor focusedBorderColor
+ hSetBuffering stdout NoBuffering
args <- getArgs
let winset | ("--resume" : s : _) <- args
@@ -89,7 +90,7 @@ main = do
, w <- W.integrate (W.stack wk) ]
mapM_ manage ws -- find new windows
- -- withWindowSet (io . hPrint stderr) -- uncomment for state logging
+ when logging $ withWindowSet (io . hPrint stdout)
-- main loop, for all you HOF/recursion fans out there.
forever $ handle =<< io (nextEvent dpy e >> getEvent e)