summaryrefslogtreecommitdiffhomepage
path: root/src/Xmobar/X11/Bitmap.hs
diff options
context:
space:
mode:
authorUnoqwy <julien.qwy@gmail.com>2020-07-24 01:53:15 +0200
committerUnoqwy <julien.qwy@gmail.com>2020-08-07 19:49:26 +0200
commit43d1dc71f9900986168458d3af281453f41df966 (patch)
tree47fb1e3c12f71051d16ccfb23001f0091e8541ef /src/Xmobar/X11/Bitmap.hs
parent9891cd087f311c5b248bf8e7bd68d03946f3de48 (diff)
downloadxmobar-43d1dc71f9900986168458d3af281453f41df966.tar.gz
xmobar-43d1dc71f9900986168458d3af281453f41df966.tar.bz2
Allow font bg to be taller (or smaller)
Implemented only for XFT fonts. Adds a new "part" in the fc tag. > Example: <fc=white,gray:0>foo bar</fc> will make the font background as tall as the bar (absolute offset, here set to 0 for both top & bottom) Changes ColorString to ColorInfo, containing both top and bottom offsets. The "colors string" is still in only one string.
Diffstat (limited to 'src/Xmobar/X11/Bitmap.hs')
-rw-r--r--src/Xmobar/X11/Bitmap.hs4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/Xmobar/X11/Bitmap.hs b/src/Xmobar/X11/Bitmap.hs
index e323606..e764384 100644
--- a/src/Xmobar/X11/Bitmap.hs
+++ b/src/Xmobar/X11/Bitmap.hs
@@ -24,7 +24,7 @@ import System.Directory (doesFileExist)
import System.FilePath ((</>))
import System.Mem.Weak ( addFinalizer )
import Xmobar.X11.ColorCache
-import Xmobar.X11.Parsers (Widget(..))
+import Xmobar.X11.Parsers (ColorInfo(..), Widget(..))
import Xmobar.X11.Actions (Action)
#ifdef XPM
@@ -54,7 +54,7 @@ data Bitmap = Bitmap { width :: Dimension
}
updateCache :: Display -> Window -> Map FilePath Bitmap -> FilePath ->
- [[(Widget, String, Int, Maybe [Action])]] -> IO (Map FilePath Bitmap)
+ [[(Widget, ColorInfo, Int, Maybe [Action])]] -> IO (Map FilePath Bitmap)
updateCache dpy win cache iconRoot ps = do
let paths = map (\(Icon p, _, _, _) -> p) . concatMap (filter icons) $ ps
icons (Icon _, _, _, _) = True