Simplied and fixed a bug in dwm patch
This commit is contained in:
parent
7e0b163ea0
commit
a1971aa681
|
@ -1,6 +1,6 @@
|
|||
diff -ruN dwm-6.2-ori/config.def.h dwm-6.2/config.def.h
|
||||
--- dwm-6.2-ori/config.def.h 2019-02-02 18:25:28.000000000 +0530
|
||||
+++ dwm-6.2/config.def.h 2020-07-14 22:21:11.048698432 +0530
|
||||
+++ dwm-6.2/config.def.h 2020-07-17 00:20:06.538669316 +0530
|
||||
@@ -12,10 +12,34 @@
|
||||
static const char col_gray3[] = "#bbbbbb";
|
||||
static const char col_gray4[] = "#eeeeee";
|
||||
|
@ -51,7 +51,7 @@ diff -ruN dwm-6.2-ori/config.def.h dwm-6.2/config.def.h
|
|||
{ ClkClientWin, MODKEY, Button3, resizemouse, {0} },
|
||||
diff -ruN dwm-6.2-ori/dwm.c dwm-6.2/dwm.c
|
||||
--- dwm-6.2-ori/dwm.c 2020-06-15 20:11:02.220674229 +0530
|
||||
+++ dwm-6.2/dwm.c 2020-07-14 22:21:37.169392221 +0530
|
||||
+++ dwm-6.2/dwm.c 2020-07-17 00:21:42.452842061 +0530
|
||||
@@ -40,6 +40,8 @@
|
||||
#include <X11/extensions/Xinerama.h>
|
||||
#endif /* XINERAMA */
|
||||
|
@ -139,7 +139,7 @@ diff -ruN dwm-6.2-ori/dwm.c dwm-6.2/dwm.c
|
|||
int boxs = drw->fonts->h / 9;
|
||||
int boxw = drw->fonts->h / 6 + 2;
|
||||
unsigned int i, occ = 0, urg = 0;
|
||||
@@ -703,9 +720,34 @@
|
||||
@@ -703,9 +720,29 @@
|
||||
|
||||
/* draw status first so it can be overdrawn by tags later */
|
||||
if (m == selmon) { /* status is only drawn on selected monitor */
|
||||
|
@ -150,14 +150,8 @@ diff -ruN dwm-6.2-ori/dwm.c dwm-6.2/dwm.c
|
|||
+ char *tp = stextc;
|
||||
+ char ctmp;
|
||||
+
|
||||
+ drw_setscheme(drw, scheme[SchemeNorm]);
|
||||
+ x = drw_text(drw, wbar - wstext, 0, hlrpad, bh, 0, "", 0); /* to keep left padding clean */
|
||||
+ if ((unsigned char)*ts <= LENGTH(colors) + 10) {
|
||||
+ drw_setscheme(drw, scheme[(unsigned char)*ts - 11]);
|
||||
+ tp = ++ts;
|
||||
+ } else {
|
||||
+ drw_setscheme(drw, scheme[SchemeStts]);
|
||||
+ ts++;
|
||||
+ }
|
||||
+ for (;;) {
|
||||
+ if ((unsigned char)*ts > LENGTH(colors) + 10) {
|
||||
+ ts++;
|
||||
|
@ -173,11 +167,12 @@ diff -ruN dwm-6.2-ori/dwm.c dwm-6.2/dwm.c
|
|||
+ *ts = ctmp;
|
||||
+ tp = ++ts;
|
||||
+ }
|
||||
+ drw_setscheme(drw, scheme[SchemeNorm]);
|
||||
+ drw_text(drw, x, 0, wbar - x, bh, 0, "", 0); /* to keep right padding clean */
|
||||
}
|
||||
|
||||
for (c = m->clients; c; c = c->next) {
|
||||
@@ -728,7 +770,7 @@
|
||||
@@ -728,7 +765,7 @@
|
||||
drw_setscheme(drw, scheme[SchemeNorm]);
|
||||
x = drw_text(drw, x, 0, w, bh, lrpad / 2, m->ltsymbol, 0);
|
||||
|
||||
|
@ -186,7 +181,7 @@ diff -ruN dwm-6.2-ori/dwm.c dwm-6.2/dwm.c
|
|||
if (m->sel) {
|
||||
drw_setscheme(drw, scheme[m == selmon ? SchemeSel : SchemeNorm]);
|
||||
drw_text(drw, x, 0, w, bh, lrpad / 2, m->sel->name, 0);
|
||||
@@ -1122,8 +1164,11 @@
|
||||
@@ -1122,8 +1159,11 @@
|
||||
Monitor *m;
|
||||
XMotionEvent *ev = &e->xmotion;
|
||||
|
||||
|
@ -199,7 +194,7 @@ diff -ruN dwm-6.2-ori/dwm.c dwm-6.2/dwm.c
|
|||
if ((m = recttomon(ev->x_root, ev->y_root, 1, 1)) != mon && mon) {
|
||||
unfocus(selmon->sel, 1);
|
||||
selmon = m;
|
||||
@@ -1564,6 +1609,7 @@
|
||||
@@ -1564,6 +1604,7 @@
|
||||
netatom[NetClientList] = XInternAtom(dpy, "_NET_CLIENT_LIST", False);
|
||||
/* init cursors */
|
||||
cursor[CurNormal] = drw_cur_create(drw, XC_left_ptr);
|
||||
|
@ -207,7 +202,7 @@ diff -ruN dwm-6.2-ori/dwm.c dwm-6.2/dwm.c
|
|||
cursor[CurResize] = drw_cur_create(drw, XC_sizing);
|
||||
cursor[CurMove] = drw_cur_create(drw, XC_fleur);
|
||||
/* init appearance */
|
||||
@@ -1637,6 +1683,28 @@
|
||||
@@ -1637,6 +1678,28 @@
|
||||
}
|
||||
|
||||
void
|
||||
|
@ -236,7 +231,7 @@ diff -ruN dwm-6.2-ori/dwm.c dwm-6.2/dwm.c
|
|||
spawn(const Arg *arg)
|
||||
{
|
||||
if (arg->v == dmenucmd)
|
||||
@@ -1805,7 +1873,7 @@
|
||||
@@ -1805,7 +1868,7 @@
|
||||
XSetWindowAttributes wa = {
|
||||
.override_redirect = True,
|
||||
.background_pixmap = ParentRelative,
|
||||
|
@ -245,7 +240,7 @@ diff -ruN dwm-6.2-ori/dwm.c dwm-6.2/dwm.c
|
|||
};
|
||||
XClassHint ch = {"dwm", "dwm"};
|
||||
for (m = mons; m; m = m->next) {
|
||||
@@ -1821,6 +1889,33 @@
|
||||
@@ -1821,6 +1884,33 @@
|
||||
}
|
||||
|
||||
void
|
||||
|
@ -279,7 +274,7 @@ diff -ruN dwm-6.2-ori/dwm.c dwm-6.2/dwm.c
|
|||
updatebarpos(Monitor *m)
|
||||
{
|
||||
m->wy = m->my;
|
||||
@@ -1847,6 +1942,31 @@
|
||||
@@ -1847,6 +1937,31 @@
|
||||
(unsigned char *) &(c->win), 1);
|
||||
}
|
||||
|
||||
|
@ -311,7 +306,7 @@ diff -ruN dwm-6.2-ori/dwm.c dwm-6.2/dwm.c
|
|||
int
|
||||
updategeom(void)
|
||||
{
|
||||
@@ -1987,9 +2107,28 @@
|
||||
@@ -1987,9 +2102,28 @@
|
||||
void
|
||||
updatestatus(void)
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue