From e2a460de4089603ca0694b57e95ba017f6d17239 Mon Sep 17 00:00:00 2001 From: Eduardo Pedroni Date: Sun, 17 Mar 2019 14:49:14 +0100 Subject: Parameterised status bar padding --- config-desktop.h | 1 + config-laptop.h | 1 + dwm.c | 2 +- 3 files changed, 3 insertions(+), 1 deletion(-) diff --git a/config-desktop.h b/config-desktop.h index 5401ef8..90159ee 100644 --- a/config-desktop.h +++ b/config-desktop.h @@ -22,6 +22,7 @@ static const char colors[NUMCOLORS][ColLast][8] = { }; static const unsigned int borderpx = 1; /* border pixel of windows */ static const unsigned int snap = 8; /* snap pixel */ +static const int statusbarpadding = 0; static const Bool showbar = True; /* False means no bar */ static const Bool topbar = False; /* False means bottom bar */ static const Bool showtitle = False; /* True means titles are shown on bar */ diff --git a/config-laptop.h b/config-laptop.h index bc9e02f..4d18558 100644 --- a/config-laptop.h +++ b/config-laptop.h @@ -28,6 +28,7 @@ static const char colors[NUMCOLORS][ColLast][8] = { }; static const unsigned int borderpx = 1; /* border pixel of windows */ static const unsigned int snap = 8; /* snap pixel */ +static const int statusbarpadding = 3; static const Bool showbar = True; /* False means no bar */ static const Bool topbar = False; /* False means bottom bar */ static const Bool showtitle = False; /* True means titles are shown on bar */ diff --git a/dwm.c b/dwm.c index d9c4470..43267d6 100644 --- a/dwm.c +++ b/dwm.c @@ -1292,7 +1292,7 @@ initfont(const char *fontstr) { && !(dc.font.xfont = XftFontOpenName(dpy, screen, "fixed"))) die("error, cannot load font: '%s'\n", fontstr); - dc.font.ascent = dc.font.xfont->ascent + 3; + dc.font.ascent = dc.font.xfont->ascent + statusbarpadding; dc.font.descent = dc.font.xfont->descent; dc.font.height = dc.font.ascent + dc.font.descent; } -- cgit v1.2.3