summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLibravatar Alexander Foremny <aforemny@posteo.de>2024-05-06 22:23:39 +0200
committerLibravatar Alexander Foremny <aforemny@posteo.de>2024-05-06 22:23:39 +0200
commitb61dcb6698ee7669655a833d3e8af37727d1c7d6 (patch)
treecdc632dc6cad1fa8790b84e4a21fca888fabaa20
parentf2605d44a6c758045aba4397f367ffbb9ea24105 (diff)
feat: automatically compute height
-rw-r--r--app/Main.hs4
1 files changed, 2 insertions, 2 deletions
diff --git a/app/Main.hs b/app/Main.hs
index 93db14c..701646f 100644
--- a/app/Main.hs
+++ b/app/Main.hs
@@ -152,9 +152,10 @@ createWindow args = do
swidth = fi (X.displayWidth dpy scrn)
sheight = fi (X.displayHeight dpy scrn)
wwidth = swidth - 16
- wheight = 32
wleft = 8
wtop = 8
+ fnt <- X.xftFontOpen dpy scr "IosevkaTerm Nerd Font:size=14"
+ wheight <- X.xftfont_height fnt
cmap <- X.createColormap dpy root vis X.allocNone
win <- X.allocaSetWindowAttributes $ \attr -> do
X.set_colormap attr cmap
@@ -184,7 +185,6 @@ createWindow args = do
pixm <- X.createPixmap dpy win (fi wwidth) (fi wheight) dpth
gc <- X.createGC dpy win
drw <- X.xftDrawCreate dpy pixm vis cmap
- fnt <- X.xftFontOpen dpy scr "IosevkaTerm Nerd Font:size=14"
X.mapWindow dpy win
let dirty = True
ui <-