summaryrefslogtreecommitdiffhomepage
path: root/src/Xmobar/App
diff options
context:
space:
mode:
authortulthix <tulthix@gmail.com>2021-11-02 19:31:18 -0500
committertulthix <tulthix@gmail.com>2021-11-02 19:35:31 -0500
commit9d21a7dd818ece5247e2f75f13d588111e334d8c (patch)
tree75e11000996f68454f42e545872760b8776968a3 /src/Xmobar/App
parent8ca3cfced681ae6c069450cc6d0352910433d46b (diff)
downloadxmobar-9d21a7dd818ece5247e2f75f13d588111e334d8c.tar.gz
xmobar-9d21a7dd818ece5247e2f75f13d588111e334d8c.tar.bz2
hspace feature. Initial intent: make space for a tray
Diffstat (limited to 'src/Xmobar/App')
-rw-r--r--src/Xmobar/App/EventLoop.hs1
1 files changed, 1 insertions, 0 deletions
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'))