commit 2b576b2d9b8f4a900e78c813882a806b06543586
parent df47d6fac3bf9b9108f9306d6339808be66591f3
Author: Sacules <leociancalucas@gmail.com>
Date: Sun, 9 Sep 2018 18:22:28 -0300
Added dwm patch for centering the selected window's name.
Diffstat:
3 files changed, 48 insertions(+), 0 deletions(-)
diff --git a/dwm.suckless.org/patches/centeredwindowname/dwm-centeredwindowname-20180909-bd6efd8.diff b/dwm.suckless.org/patches/centeredwindowname/dwm-centeredwindowname-20180909-bd6efd8.diff
@@ -0,0 +1,27 @@
+From bd6efd81eabab77c91a3e95b528b19db2d58525b Mon Sep 17 00:00:00 2001
+From: Sacules <leociancalucas@gmail.com>
+Date: Sun, 9 Sep 2018 17:12:58 -0300
+Subject: [PATCH] Centers windows names on status bar.
+
+---
+ dwm.c | 3 ++-
+ 1 file changed, 2 insertions(+), 1 deletion(-)
+
+diff --git a/dwm.c b/dwm.c
+index 4465af1..9d5ef7a 100644
+--- a/dwm.c
++++ b/dwm.c
+@@ -730,8 +730,9 @@ drawbar(Monitor *m)
+
+ if ((w = m->ww - sw - x) > bh) {
+ if (m->sel) {
++ int mid = (m->ww - TEXTW(m->sel->name)) / 2 - x;
+ drw_setscheme(drw, scheme[m == selmon ? SchemeSel : SchemeNorm]);
+- drw_text(drw, x, 0, w, bh, lrpad / 2, m->sel->name, 0);
++ drw_text(drw, x, 0, w, bh, mid, m->sel->name, 0);
+ if (m->sel->isfloating)
+ drw_rect(drw, x + boxs, boxs, boxw, boxw, m->sel->isfixed, 0);
+ } else {
+--
+2.18.0
+
diff --git a/dwm.suckless.org/patches/centeredwindowname/dwm-centeredwindowname.png b/dwm.suckless.org/patches/centeredwindowname/dwm-centeredwindowname.png
Binary files differ.
diff --git a/dwm.suckless.org/patches/centeredwindowname/index.md b/dwm.suckless.org/patches/centeredwindowname/index.md
@@ -0,0 +1,21 @@
+centeredwindowname
+=====
+
+[![Screenshot](dwm-centeredwindowname.png)](dwm-centeredwindowname.png)
+
+Description
+-----------
+
+A little patch to center the WM_NAME of the currently selected window on the status bar.
+
+
+Download
+--------
+
+* [dwm-centeredwindowname-20180909-bd6efd8.diff](dwm-centeredwindowname-20180909-bd6efd8.diff)
+
+
+Authors
+-------
+
+* Sacules - <leociancalucas@gmail.com>