[wiki] [sites] Added dwm patch for centering the selected window's name. || Sacules
commit 2b576b2d9b8f4a900e78c813882a806b06543586
Author: Sacules <leociancalucas_AT_gmail.com>
Date: Sun Sep 9 18:22:28 2018 -0300
Added dwm patch for centering the selected window's name.
diff --git a/dwm.suckless.org/patches/centeredwindowname/dwm-centeredwindowname-20180909-bd6efd8.diff b/dwm.suckless.org/patches/centeredwindowname/dwm-centeredwindowname-20180909-bd6efd8.diff
new file mode 100644
index 00000000..5e09b6c2
--- /dev/null
+++ b/dwm.suckless.org/patches/centeredwindowname/dwm-centeredwindowname-20180909-bd6efd8.diff
_AT_@ -0,0 +1,27 @@
+From bd6efd81eabab77c91a3e95b528b19db2d58525b Mon Sep 17 00:00:00 2001
+From: Sacules <leociancalucas_AT_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
+_AT_@ -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
new file mode 100644
index 00000000..f623d116
Binary files /dev/null and b/dwm.suckless.org/patches/centeredwindowname/dwm-centeredwindowname.png differ
diff --git a/dwm.suckless.org/patches/centeredwindowname/index.md b/dwm.suckless.org/patches/centeredwindowname/index.md
new file mode 100644
index 00000000..6facaaae
--- /dev/null
+++ b/dwm.suckless.org/patches/centeredwindowname/index.md
_AT_@ -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_AT_gmail.com>
Received on Sun Sep 09 2018 - 23:24:35 CEST
This archive was generated by hypermail 2.3.0
: Sun Sep 09 2018 - 23:36:26 CEST