dmenu-bar-height-5.2.diff - sites - public wiki contents of suckless.org
 (HTM) git clone git://git.suckless.org/sites
 (DIR) Log
 (DIR) Files
 (DIR) Refs
       ---
       dmenu-bar-height-5.2.diff (809B)
       ---
            1 diff --git a/config.def.h b/config.def.h
            2 index 1edb647..5c79628 100644
            3 --- a/config.def.h
            4 +++ b/config.def.h
            5 @@ -3,6 +3,8 @@
            6 
            7  static int topbar = 1;                      /* -b  option; if 0, dmenu appears at bottom     */
            8  /* -fn option overrides fonts[0]; default X11 font or font set */
            9 +static const int user_bh = 0;               /* add an defined amount of pixels to the bar height */
           10 +
           11  static const char *fonts[] = {
           12          "monospace:size=10"
           13  };
           14 diff --git a/dmenu.c b/dmenu.c
           15 index 27b7a30..7be0dc3 100644
           16 --- a/dmenu.c
           17 +++ b/dmenu.c
           18 @@ -629,7 +629,8 @@ setup(void)
           19          utf8 = XInternAtom(dpy, "UTF8_STRING", False);
           20 
           21          /* calculate menu geometry */
           22 -        bh = drw->fonts->h + 2;
           23 +        bh = drw->fonts->h;
           24 +        bh = user_bh ? bh + user_bh : bh + 2;
           25          lines = MAX(lines, 0);
           26          mh = (lines + 1) * bh;
           27  #ifdef XINERAMA