summaryrefslogtreecommitdiffhomepage
path: root/xmobar.hs
diff options
context:
space:
mode:
Diffstat (limited to 'xmobar.hs')
-rw-r--r--xmobar.hs10
1 files changed, 5 insertions, 5 deletions
diff --git a/xmobar.hs b/xmobar.hs
index 46edfcf..1c40497 100644
--- a/xmobar.hs
+++ b/xmobar.hs
@@ -137,17 +137,17 @@ eventLoop (d,w) =
eventLoop (d,w)
-- | The function to create the initial window
-createWin :: Config -> IO (Display, Window)
+createWin :: Config -> Xbar (Display, Window)
createWin config =
- do dpy <- openDisplay ""
+ do dpy <- io $ openDisplay ""
let dflt = defaultScreen dpy
- rootw <- rootWindow dpy dflt
- win <- mkUnmanagedWindow dpy (defaultScreenOfDisplay dpy) rootw
+ rootw <- io $ rootWindow dpy dflt
+ win <- io $ mkUnmanagedWindow dpy (defaultScreenOfDisplay dpy) rootw
(fromIntegral $ xPos config)
(fromIntegral $ yPos config)
(fromIntegral $ width config)
(fromIntegral $ hight config)
- mapWindow dpy win
+ io $ mapWindow dpy win
return (dpy,win)
-- | Draws in and updates the window