[hackers] [dwm][PATCH] Invert urgent border for window hint
Feature parity for tags with urgent client. Tags are inversed but not window border. Window border now uses SchemeNorm ColFg, same as tags but for window. Prior art: https://dwm.suckless.org/patches/focusurgent/ --- dwm.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/dwm.c b/dwm.c index 4465af1..6610199 100644 --- a/dwm.c +++ b/dwm.c @@ -1233,6 +1233,8 @@ propertynotify(XEvent *e) case XA_WM_HINTS: updatewmhints(c); drawbars(); + if (c->isurgent) + XSetWindowBorder(dpy, c->win, scheme[SchemeSel][ColFg].pixel); break; } if (ev->atom == XA_WM_NAME || ev->atom == netatom[NetWMName]) { -- 2.23.0
Re: [hackers] [dwm][PATCH] Invert urgent border for window hint
will check it once I'm free. On 02/09, Ivan Tham wrote: Feature parity for tags with urgent client. Tags are inversed but not window border. Window border now uses SchemeNorm ColFg, same as tags but for window. Prior art: https://dwm.suckless.org/patches/focusurgent/ --- dwm.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/dwm.c b/dwm.c index 4465af1..c07d7b2 100644 --- a/dwm.c +++ b/dwm.c @@ -2022,8 +2022,8 @@ updatewmhints(Client *c) if (c == selmon->sel && wmh->flags & XUrgencyHint) { wmh->flags &= ~XUrgencyHint; XSetWMHints(dpy, c->win, wmh); - } else - c->isurgent = (wmh->flags & XUrgencyHint) ? 1 : 0; + } else if ((c->isurgent = (wmh->flags & XUrgencyHint) ? 1 : 0)) + XSetWindowBorder(dpy, c->win, scheme[SchemeNorm][ColFg].pixel); if (wmh->flags & InputHint) c->neverfocus = !wmh->input; else -- 2.23.0 Abdullah https://abdullah.today C20F 2707 3025 2569 BAC5 534B 7820 6670 C19D 1580 signature.asc Description: PGP signature
[hackers] [dwm][PATCH] Invert urgent border for window hint
Feature parity for tags with urgent client. Tags are inversed but not window border. Window border now uses SchemeNorm ColFg, same as tags but for window. Prior art: https://dwm.suckless.org/patches/focusurgent/ --- dwm.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/dwm.c b/dwm.c index 4465af1..c07d7b2 100644 --- a/dwm.c +++ b/dwm.c @@ -2022,8 +2022,8 @@ updatewmhints(Client *c) if (c == selmon->sel && wmh->flags & XUrgencyHint) { wmh->flags &= ~XUrgencyHint; XSetWMHints(dpy, c->win, wmh); - } else - c->isurgent = (wmh->flags & XUrgencyHint) ? 1 : 0; + } else if ((c->isurgent = (wmh->flags & XUrgencyHint) ? 1 : 0)) + XSetWindowBorder(dpy, c->win, scheme[SchemeNorm][ColFg].pixel); if (wmh->flags & InputHint) c->neverfocus = !wmh->input; else -- 2.23.0