summaryrefslogtreecommitdiffhomepage
path: root/Xmobar.hs
diff options
context:
space:
mode:
authorAndrea Rossato <andrea.rossato@ing.unitn.it>2007-11-04 16:26:26 +0100
committerAndrea Rossato <andrea.rossato@ing.unitn.it>2007-11-04 16:26:26 +0100
commit094a454324c31b62b418289821b4dc71790736c1 (patch)
treed662772082b898d037fd0a213280cca1278ed927 /Xmobar.hs
parente3dd6aeca60ab216b079c87aa57078a951d0a08b (diff)
downloadxmobar-094a454324c31b62b418289821b4dc71790736c1.tar.gz
xmobar-094a454324c31b62b418289821b4dc71790736c1.tar.bz2
Preserve backward compatibility
WARNING: this patch changes the configuration file This patch reintroduces backward compatibility with recent changes in the configuration option. Now Top and Bottom do not take any argument. To set the width and alignment used TopW (Align Int) and BottomW (Align Int) instead, where Align is either C, L or R. darcs-hash:20071104152626-d6583-a5ee9d7f1e20b33e47b902d11267fb6d2e623483.gz
Diffstat (limited to 'Xmobar.hs')
-rw-r--r--Xmobar.hs22
1 files changed, 11 insertions, 11 deletions
diff --git a/Xmobar.hs b/Xmobar.hs
index e26d2f7..4545dcd 100644
--- a/Xmobar.hs
+++ b/Xmobar.hs
@@ -144,14 +144,14 @@ createWin d fs c = do
setPosition :: XPosition -> Rectangle -> Dimension -> (Position,Position,Dimension,Dimension,Bool)
setPosition p (Rectangle rx ry rw rh) ht =
case p of
- Top A -> (rx , ry , rw , h , True)
- Top (L i) -> (rx , ry , nw i , h , True)
- Top (R i) -> (right i, ry , nw i , h , True)
- Top (C i) -> (center i, ry , nw i , h , True)
- Bottom A -> (rx , ny , rw , h , True)
- Bottom (L i) -> (rx , ny , nw i , h , True)
- Bottom (R i) -> (right i, ny , nw i , h , True)
- Bottom (C i) -> (center i, ny , nw i , h , True)
+ Top -> (rx , ry , rw , h , True)
+ TopW (L i) -> (rx , ry , nw i , h , True)
+ TopW (R i) -> (right i, ry , nw i , h , True)
+ TopW (C i) -> (center i, ry , nw i , h , True)
+ Bottom -> (rx , ny , rw , h , True)
+ BottomW (L i) -> (rx , ny , nw i , h , True)
+ BottomW (R i) -> (right i, ny , nw i , h , True)
+ BottomW (C i) -> (center i, ny , nw i , h , True)
Static cx cy cw ch -> (fi cx , fi cy , fi cw, fi ch, True)
where
ny = ry + fi (rh - ht)
@@ -175,9 +175,9 @@ setProperties h c d w = do
getStrutValues :: Dimension -> Config -> [Int]
getStrutValues h c =
case position c of
- Top _ -> [0, 0, fi h, 0 ]
- Bottom _ -> [0, 0, 0 , fi h]
- _ -> [0, 0, 0 , 0 ]
+ Top -> [0, 0, fi h, 0 ]
+ Bottom -> [0, 0, 0 , fi h]
+ _ -> [0, 0, 0 , 0 ]
updateWin :: TVar String -> X ()
updateWin v = do