From a6d8fb01fc1e6df134234a5a071ff44895adf6c9 Mon Sep 17 00:00:00 2001 From: bakkeby Date: Fri, 4 Jun 2021 12:13:39 +0200 Subject: [PATCH] Adding example patch for how to use a different font for the status --- ...e_a_different_font_for_the_status-6.2.diff | 36 +++++++++++++++++++ 1 file changed, 36 insertions(+) create mode 100644 dwm/dwm-use_a_different_font_for_the_status-6.2.diff diff --git a/dwm/dwm-use_a_different_font_for_the_status-6.2.diff b/dwm/dwm-use_a_different_font_for_the_status-6.2.diff new file mode 100644 index 0000000..5fcb52c --- /dev/null +++ b/dwm/dwm-use_a_different_font_for_the_status-6.2.diff @@ -0,0 +1,36 @@ +From 9534d169827d337664c78cb34dbb16bd525a0c98 Mon Sep 17 00:00:00 2001 +From: bakkeby +Date: Fri, 4 Jun 2021 12:10:31 +0200 +Subject: [PATCH] This is meant as an example patch (horrible hack) to use a + different font for the status compared to the rest of the bar. + +The gist of it is that we forcibly use the second, or third, font to +draw the bar, leaving the primary (first) font to draw the rest. +--- + dwm.c | 4 ++++ + 1 file changed, 4 insertions(+) + +diff --git a/dwm.c b/dwm.c +index 4465af1..5e99aca 100644 +--- a/dwm.c ++++ b/dwm.c +@@ -700,12 +700,16 @@ drawbar(Monitor *m) + int boxw = drw->fonts->h / 6 + 2; + unsigned int i, occ = 0, urg = 0; + Client *c; ++ Fnt *cur; + + /* draw status first so it can be overdrawn by tags later */ + if (m == selmon) { /* status is only drawn on selected monitor */ ++ cur = drw->fonts; // remember which was the first font ++ drw->fonts = drw->fonts->next; // skip to the second font, add more of these to get to third, fourth etc. + drw_setscheme(drw, scheme[SchemeNorm]); + sw = TEXTW(stext) - lrpad + 2; /* 2px right padding */ + drw_text(drw, m->ww - sw, 0, sw, bh, 0, stext, 0); ++ drw->fonts = cur; // set the normal font back to the first font + } + + for (c = m->clients; c; c = c->next) { +-- +2.19.1 +