diff options
author | Alexander Foremny <aforemny@posteo.de> | 2024-05-06 22:23:39 +0200 |
---|---|---|
committer | Alexander Foremny <aforemny@posteo.de> | 2024-05-06 22:23:39 +0200 |
commit | b61dcb6698ee7669655a833d3e8af37727d1c7d6 (patch) | |
tree | cdc632dc6cad1fa8790b84e4a21fca888fabaa20 /app/Main.hs | |
parent | f2605d44a6c758045aba4397f367ffbb9ea24105 (diff) |
feat: automatically compute height
Diffstat (limited to 'app/Main.hs')
-rw-r--r-- | app/Main.hs | 4 |
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 <- |