From 9d21a7dd818ece5247e2f75f13d588111e334d8c Mon Sep 17 00:00:00 2001 From: tulthix Date: Tue, 2 Nov 2021 19:31:18 -0500 Subject: hspace feature. Initial intent: make space for a tray --- src/Xmobar/App/EventLoop.hs | 1 + 1 file changed, 1 insertion(+) (limited to 'src/Xmobar/App') diff --git a/src/Xmobar/App/EventLoop.hs b/src/Xmobar/App/EventLoop.hs index 4a0db46..474ff4f 100644 --- a/src/Xmobar/App/EventLoop.hs +++ b/src/Xmobar/App/EventLoop.hs @@ -265,6 +265,7 @@ updateActions conf (Rectangle _ _ wid _) ~[left,center,right] = do iconW i = maybe 0 Bitmap.width (lookup i $ iconS conf) getCoords (Text s,_,i,a) = textWidth d (safeIndex fs i) s >>= \tw -> return (a, 0, fi tw) getCoords (Icon s,_,_,a) = return (a, 0, fi $ iconW s) + getCoords (Hspace w,_,_,a) = return (a, 0, fi w) partCoord off xs = map (\(a, x, x') -> (fromJust a, x, x')) $ filter (\(a, _,_) -> isJust a) $ scanl (\(_,_,x') (a,_,w') -> (a, x', x' + w')) -- cgit v1.2.3