Add vertical padding on bar

This commit is contained in:
Alex Selimov 2025-05-24 21:34:14 -04:00
parent 5d2fdd0da9
commit 56ddeea9aa
2 changed files with 7 additions and 5 deletions

View File

@ -1,10 +1,11 @@
/* See LICENSE file for copyright and license details. */ /* See LICENSE file for copyright and license details. */
/* appearance */ /* appearance */
static const unsigned int borderpx = 3; /* border pixel of windows */ static const unsigned int borderpx = 2; /* border pixel of windows */
static const unsigned int snap = 32; /* snap pixel */ static const unsigned int snap = 32; /* snap pixel */
static const unsigned int gappih = 15; /* horiz inner gap between windows */ static const unsigned int gappih = 15; /* horiz inner gap between windows */
static const unsigned int gappiv = 15; /* vert inner gap between windows */ static const unsigned int gappiv = 15; /* vert inner gap between windows */
static const int vertpadbar = 5; /* vertical padding for statusbar */
static const unsigned int gappoh = static const unsigned int gappoh =
10; /* horiz outer gap between windows and screen edge */ 10; /* horiz outer gap between windows and screen edge */
static const unsigned int gappov = static const unsigned int gappov =
@ -17,7 +18,7 @@ static int smartgaps =
static const int showbar = 1; /* 0 means no bar */ static const int showbar = 1; /* 0 means no bar */
static const int topbar = 1; /* 0 means bottom bar */ static const int topbar = 1; /* 0 means bottom bar */
static const char *fonts[] = { static const char *fonts[] = {
"FiraCode Nerd Font:size=11:antialias=true:autohint=true"}; "SauceCodePro Nerd Font:size=12:antialias=true:autohint=true"};
static const char dmenufont[] = static const char dmenufont[] =
"SauceCodePro Nerd Font:size=10:antialias=true:autohint=true"; "SauceCodePro Nerd Font:size=10:antialias=true:autohint=true";
static const char col_gray1[] = "#191919"; static const char col_gray1[] = "#191919";
@ -30,12 +31,12 @@ static const char col_red[] = "#de6e76";
static const char col_yellow[] = "#d68c67"; static const char col_yellow[] = "#d68c67";
static const char col_teal[] = "#8ec07c"; static const char col_teal[] = "#8ec07c";
static const char col_purple[] = "#b16286"; static const char col_purple[] = "#b16286";
static const unsigned int baralpha = 175; static const unsigned int baralpha = OPAQUE;
static const unsigned int borderalpha = OPAQUE; static const unsigned int borderalpha = OPAQUE;
static const char *colors[][3] = { static const char *colors[][3] = {
/* fg bg border */ /* fg bg border */
[SchemeNorm] = {col_gray3, col_gray1, col_gray1}, [SchemeNorm] = {col_gray3, col_gray1, col_gray1},
[SchemeSel] = {col_gray3, col_cyan, col_cyan}, [SchemeSel] = {col_gray3, col_cyan, col_gray3},
[SchemeStatus] = {col_gray3, col_gray1, col_gray1}, [SchemeStatus] = {col_gray3, col_gray1, col_gray1},
[SchemeTagsSel] = {col_gray3, col_gray1, col_gray1}, [SchemeTagsSel] = {col_gray3, col_gray1, col_gray1},
// Tagbar left unselected {text,background,not used but cannot be empty} // Tagbar left unselected {text,background,not used but cannot be empty}
@ -77,6 +78,7 @@ static const Rule rules[] = {
{"Sxiv", NULL, NULL, 0, 1, 0, 1, -1}, {"Sxiv", NULL, NULL, 0, 1, 0, 1, -1},
{"matplotlib", NULL, NULL, 0, 1, 0, 1, -1}, {"matplotlib", NULL, NULL, 0, 1, 0, 1, -1},
{"Matplotlib", NULL, NULL, 0, 1, 0, 1, -1}, {"Matplotlib", NULL, NULL, 0, 1, 0, 1, -1},
{"xcom2.exe", NULL, NULL, 0, 1, 0, 1, -1},
{NULL, NULL, "Figure 1", 0, 1, 0, 1, -1}, {NULL, NULL, "Figure 1", 0, 1, 0, 1, -1},
{NULL, NULL, "Figure 2", 0, 1, 0, 1, -1}, {NULL, NULL, "Figure 2", 0, 1, 0, 1, -1},
{NULL, NULL, "Figure 3", 0, 1, 0, 1, -1}, {NULL, NULL, "Figure 3", 0, 1, 0, 1, -1},

2
dwm.c
View File

@ -1781,7 +1781,7 @@ void setup(void) {
if (!drw_fontset_create(drw, fonts, LENGTH(fonts))) if (!drw_fontset_create(drw, fonts, LENGTH(fonts)))
die("no fonts could be loaded."); die("no fonts could be loaded.");
lrpad = drw->fonts->h; lrpad = drw->fonts->h;
bh = drw->fonts->h + 2; bh = drw->fonts->h + vertpadbar;
updategeom(); updategeom();
/* init atoms */ /* init atoms */
utf8string = XInternAtom(dpy, "UTF8_STRING", False); utf8string = XInternAtom(dpy, "UTF8_STRING", False);