summaryrefslogtreecommitdiffhomepage
path: root/Xmobar.hs
diff options
context:
space:
mode:
authorAndrea Rossato <andrea.rossato@ing.unitn.it>2007-09-28 14:03:44 +0200
committerAndrea Rossato <andrea.rossato@ing.unitn.it>2007-09-28 14:03:44 +0200
commit9212a2ee83a9fe79636953034b1a6a84d49a1d2c (patch)
tree5174d6166c24935ab601caa852c1feb040af886c /Xmobar.hs
parent3c90a7b44b6a71bd83ce4710e52e8f7c693d8b37 (diff)
downloadxmobar-9212a2ee83a9fe79636953034b1a6a84d49a1d2c.tar.gz
xmobar-9212a2ee83a9fe79636953034b1a6a84d49a1d2c.tar.bz2
code formatting
darcs-hash:20070928120344-d6583-7edfabb4fcee32e1b63cb4496e3e1470b957570d.gz
Diffstat (limited to 'Xmobar.hs')
-rw-r--r--Xmobar.hs18
1 files changed, 9 insertions, 9 deletions
diff --git a/Xmobar.hs b/Xmobar.hs
index fc6ab8d..f8cf1a2 100644
--- a/Xmobar.hs
+++ b/Xmobar.hs
@@ -135,21 +135,21 @@ drawInWin str =
do config <- ask
st <- get
let (dpy,win) = (display st, window st)
- bgcolor <- io $ initColor dpy $ bgColor config
+ bgcolor <- io $ initColor dpy $ bgColor config
gc <- io $ createGC dpy win
--let's get the fonts
let lf c = loadQueryFont dpy (font c)
- fontst <- io $ catch (lf config) (const $ lf defaultConfig)
+ fontst <- io $ catch (lf config) (const $ lf defaultConfig)
io $ setFont dpy gc (fontFromFontStruct fontst)
-- create a pixmap to write to and fill it with a rectangle
- p <- io $ createPixmap dpy win
- (fi (width config))
- (fi (height config))
- (defaultDepthOfScreen (defaultScreenOfDisplay dpy))
+ p <- io $ createPixmap dpy win
+ (fi (width config))
+ (fi (height config))
+ (defaultDepthOfScreen (defaultScreenOfDisplay dpy))
-- the fgcolor of the rectangle will be the bgcolor of the window
io $ setForeground dpy gc bgcolor
io $ fillRectangle dpy p gc 0 0
- (fi $ width config)
+ (fi $ width config)
(fi $ height config)
-- write to the pixmap the new string
let strWithLenth = map (\(s,c) -> (s,c,textWidth fontst s)) str
@@ -157,8 +157,8 @@ drawInWin str =
-- copy the pixmap with the new string to the window
io $ copyArea dpy p win gc 0 0 (fi (width config)) (fi (height config)) 0 0
-- free up everything (we do not want to leak memory!)
- io $ freeFont dpy fontst
- io $ freeGC dpy gc
+ io $ freeFont dpy fontst
+ io $ freeGC dpy gc
io $ freePixmap dpy p
-- resync
io $ sync dpy True