Introduction
Introduction Statistics Contact Development Disclaimer Help
dwm-centretitle-20200907-61bb8b2.diff - sites - public wiki contents of suckles…
git clone git://git.suckless.org/sites
Log
Files
Refs
---
dwm-centretitle-20200907-61bb8b2.diff (1204B)
---
1 From fe22e3d1434be1819fe0c0200d4a20967b02f3f6 Mon Sep 17 00:00:00 2001
2 From: Felix Chen <[email protected]>
3 Date: Mon, 7 Sep 2020 11:45:01 +0800
4 Subject: [PATCH] Place title in the middle of barwin
5
6 ---
7 dwm.c | 7 +++++--
8 1 file changed, 5 insertions(+), 2 deletions(-)
9
10 diff --git a/dwm.c b/dwm.c
11 index 664c527..23e94f5 100644
12 --- a/dwm.c
13 +++ b/dwm.c
14 @@ -697,6 +697,7 @@ void
15 drawbar(Monitor *m)
16 {
17 int x, w, tw = 0;
18 + int tlpad;
19 int boxs = drw->fonts->h / 9;
20 int boxw = drw->fonts->h / 6 + 2;
21 unsigned int i, occ = 0, urg = 0;
22 @@ -732,9 +733,11 @@ drawbar(Monitor *m)
23 if ((w = m->ww - tw - x) > bh) {
24 if (m->sel) {
25 drw_setscheme(drw, scheme[m == selmon ? SchemeS…
26 - drw_text(drw, x, 0, w, bh, lrpad / 2, m->sel->n…
27 + tlpad = MAX((m->ww - ((int)TEXTW(m->sel->name) …
28 + drw_text(drw, x, 0, w, bh, tlpad, m->sel->name,…
29 if (m->sel->isfloating)
30 - drw_rect(drw, x + boxs, boxs, boxw, box…
31 + drw_rect(drw, x + boxs + tlpad - lrpad …
32 + boxw, boxw, m->sel->isfixed, 0);
33 } else {
34 drw_setscheme(drw, scheme[SchemeNorm]);
35 drw_rect(drw, x, 0, w, bh, 1, 1);
36 --
37 2.28.0
38
You are viewing proxied material from suckless.org. The copyright of proxied material belongs to its original authors. Any comments or complaints in relation to proxied material should be directed to the original authors of the content concerned. Please see the disclaimer for more details.