From 9d6dbb27098376f431cf45ce9fe193c6a686257c Mon Sep 17 00:00:00 2001 From: pi66 Date: Tue, 9 Dec 2025 20:54:02 +0100 Subject: [PATCH] remove window titles from bar --- patches/bar-notitle/README.md | 13 +++++++++ patches/bar-notitle/bar-notitle.patch | 38 +++++++++++++++++++++++++++ 2 files changed, 51 insertions(+) create mode 100644 patches/bar-notitle/README.md create mode 100644 patches/bar-notitle/bar-notitle.patch diff --git a/patches/bar-notitle/README.md b/patches/bar-notitle/README.md new file mode 100644 index 0000000..6344863 --- /dev/null +++ b/patches/bar-notitle/README.md @@ -0,0 +1,13 @@ +# Description +toggle window title display in bar + +> NOTE: +The patch works on (main 2025-12-09) and v0.7 + +# Download +- [git branch](https://codeberg.org/pi66/dwl-patches/raw/branch/main/patches/bar-notitle/bar-notitle.patch) +- [main 2025-11-01](https://codeberg.org/dwl/dwl-patches/raw/branch/main/patches/bar-notitle/bar-notitle.patch) +- [v0.7](https://codeberg.org/dwl/dwl-patches/raw/branch/main/patches/bar-notitle/bar-notitle.patch) + +# Authors +- [pi66](https://pi66.xyz) diff --git a/patches/bar-notitle/bar-notitle.patch b/patches/bar-notitle/bar-notitle.patch new file mode 100644 index 0000000..e724b48 --- /dev/null +++ b/patches/bar-notitle/bar-notitle.patch @@ -0,0 +1,38 @@ +From 3bb3fd29c72e77347356dc0fb5ad50787fcb14bf Mon Sep 17 00:00:00 2001 +From: pi66 +Date: Tue, 9 Dec 2025 20:39:55 +0100 +Subject: [PATCH] remove window titles from bar + +--- + config.def.h | 1 + + dwl.c | 2 +- + 2 files changed, 2 insertions(+), 1 deletion(-) + +diff --git a/config.def.h b/config.def.h +index 1b7472d..790c048 100644 +--- a/config.def.h ++++ b/config.def.h +@@ -7,6 +7,7 @@ + static const int sloppyfocus = 1; /* focus follows mouse */ + static const int bypass_surface_visibility = 0; /* 1 means idle inhibitors will disable idle tracking even if it's surface isn't visible */ + static const unsigned int borderpx = 1; /* border pixel of windows */ ++static const int client_title = 0; /* 1 means show focused client name */ + static const int showbar = 1; /* 0 means no bar */ + static const int topbar = 1; /* 0 means bottom bar */ + static const char *fonts[] = {"monospace:size=10"}; +diff --git a/dwl.c b/dwl.c +index bf340d8..3294820 100644 +--- a/dwl.c ++++ b/dwl.c +@@ -1612,7 +1612,7 @@ drawbar(Monitor *m) + x = drwl_text(m->drw, x, 0, w, m->b.height, m->lrpad / 2, m->ltsymbol, 0); + + if ((w = m->b.width - tw - x) > m->b.height) { +- if (c) { ++ if (c && client_title) { + drwl_setscheme(m->drw, colors[m == selmon ? SchemeSel : SchemeNorm]); + drwl_text(m->drw, x, 0, w, m->b.height, m->lrpad / 2, client_get_title(c), 0); + if (c && c->isfloating) +-- +2.51.2 +