diff options
Diffstat (limited to 'XMonad/Util')
-rw-r--r-- | XMonad/Util/Font.hsc | 3 | ||||
-rw-r--r-- | XMonad/Util/Loggers.hs | 2 |
2 files changed, 3 insertions, 2 deletions
diff --git a/XMonad/Util/Font.hsc b/XMonad/Util/Font.hsc index 42de67d..5912053 100644 --- a/XMonad/Util/Font.hsc +++ b/XMonad/Util/Font.hsc @@ -143,7 +143,7 @@ textExtentsXMF (Xft xftfont) _ = io $ do #endif -- | String position -data Align = AlignCenter | AlignRight | AlignLeft +data Align = AlignCenter | AlignRight | AlignLeft | AlignRightOffset Int -- | Return the string x and y 'Position' in a 'Rectangle', given a -- 'FontStruct' and the 'Align'ment @@ -156,6 +156,7 @@ stringPosition dpy fs (Rectangle _ _ w h) al s = do AlignCenter -> fi (w `div` 2) - fi (width `div` 2) AlignLeft -> 1 AlignRight -> fi (w - (fi width + 1)); + AlignRightOffset offset -> fi (w - (fi width + 1)) - fi offset; return (x,y) printStringXMF :: (Functor m, MonadIO m) => Display -> Drawable -> XMonadFont -> GC -> String -> String diff --git a/XMonad/Util/Loggers.hs b/XMonad/Util/Loggers.hs index f8aef65..3065d30 100644 --- a/XMonad/Util/Loggers.hs +++ b/XMonad/Util/Loggers.hs @@ -254,7 +254,7 @@ fixedWidthL a str n logger = do case a of AlignCenter -> toL (take n $ padhalf l ++ l ++ cs) AlignRight -> toL (reverse (take n $ reverse l ++ cs)) - AlignLeft -> toL (take n $ l ++ cs) + _ -> toL (take n $ l ++ cs) where toL = return . Just cs = cycle str |