sites

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs

commit 859da9e8adead6332b1f641beaee31421943d0be
parent e807d7225d943d7856ee0e054c76a8d52633729b
Author: Alexander Huemer <alexander.huemer@xx.vu>
Date:   Sat,  7 Mar 2015 22:03:30 +0100

dwm: update urgent border patch

Diffstat:
Ddwm.suckless.org/patches/dwm-5.7.2-urgentborder.diff | 45---------------------------------------------
Adwm.suckless.org/patches/dwm-6.1-make-the-borders-of-urgent-windows-a-different-color.diff | 61+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Mdwm.suckless.org/patches/urgentborder.md | 4++--
3 files changed, 63 insertions(+), 47 deletions(-)

diff --git a/dwm.suckless.org/patches/dwm-5.7.2-urgentborder.diff b/dwm.suckless.org/patches/dwm-5.7.2-urgentborder.diff @@ -1,45 +0,0 @@ -diff -r 7b02d596fa11 config.def.h ---- a/config.def.h Mon Dec 21 01:16:59 2009 -0500 -+++ b/config.def.h Mon Dec 21 01:18:51 2009 -0500 -@@ -8,6 +8,7 @@ - static const char selbordercolor[] = "#0066ff"; - static const char selbgcolor[] = "#0066ff"; - static const char selfgcolor[] = "#ffffff"; -+static const char urgbordercolor[] = "#ff0000"; - static const unsigned int borderpx = 1; /* border pixel of windows */ - static const unsigned int snap = 32; /* snap pixel */ - static const Bool showbar = True; /* False means no bar */ -diff -r 7b02d596fa11 dwm.c ---- a/dwm.c Mon Dec 21 01:16:59 2009 -0500 -+++ b/dwm.c Mon Dec 21 01:18:51 2009 -0500 -@@ -97,6 +97,7 @@ - int x, y, w, h; - unsigned long norm[ColLast]; - unsigned long sel[ColLast]; -+ unsigned long urg[ColLast]; - Drawable drawable; - GC gc; - struct { -@@ -1504,6 +1505,9 @@ - dc.sel[ColBorder] = getcolor(selbordercolor); - dc.sel[ColBG] = getcolor(selbgcolor); - dc.sel[ColFG] = getcolor(selfgcolor); -+ dc.urg[ColBorder] = getcolor(urgbordercolor); -+ dc.urg[ColBG] = getcolor(selbgcolor); -+ dc.urg[ColFG] = getcolor(selfgcolor); - dc.drawable = XCreatePixmap(dpy, root, DisplayWidth(dpy, screen), bh, DefaultDepth(dpy, screen)); - dc.gc = XCreateGC(dpy, root, 0, NULL); - XSetLineAttributes(dpy, dc.gc, 1, LineSolid, CapButt, JoinMiter); -@@ -1904,8 +1908,11 @@ - wmh->flags &= ~XUrgencyHint; - XSetWMHints(dpy, c->win, wmh); - } -- else -+ else { - c->isurgent = (wmh->flags & XUrgencyHint) ? True : False; -+ if (c->isurgent) -+ XSetWindowBorder(dpy, c->win, dc.urg[ColBorder]); -+ } - XFree(wmh); - } - } diff --git a/dwm.suckless.org/patches/dwm-6.1-make-the-borders-of-urgent-windows-a-different-color.diff b/dwm.suckless.org/patches/dwm-6.1-make-the-borders-of-urgent-windows-a-different-color.diff @@ -0,0 +1,61 @@ +From 8b7bc42822cd5924450bbfc9ed598f72254473ba Mon Sep 17 00:00:00 2001 +From: Alexander Huemer <alexander.huemer@xx.vu> +Date: Sat, 7 Mar 2015 21:45:48 +0100 +Subject: [PATCH] Make the borders of urgent windows a different color + +--- + config.def.h | 1 + + dwm.c | 10 ++++++++-- + 2 files changed, 9 insertions(+), 2 deletions(-) + +diff --git a/config.def.h b/config.def.h +index 875885b..5276f02 100644 +--- a/config.def.h ++++ b/config.def.h +@@ -8,6 +8,7 @@ static const char normfgcolor[] = "#bbbbbb"; + static const char selbordercolor[] = "#005577"; + static const char selbgcolor[] = "#005577"; + static const char selfgcolor[] = "#eeeeee"; ++static const char urgbordercolor[] = "#ff0000"; + static const unsigned int borderpx = 1; /* border pixel of windows */ + static const unsigned int snap = 32; /* snap pixel */ + static const Bool showbar = True; /* False means no bar */ +diff --git a/dwm.c b/dwm.c +index c8fc7d7..0924ace 100644 +--- a/dwm.c ++++ b/dwm.c +@@ -58,7 +58,7 @@ + + /* enums */ + enum { CurNormal, CurResize, CurMove, CurLast }; /* cursor */ +-enum { SchemeNorm, SchemeSel, SchemeLast }; /* color schemes */ ++enum { SchemeNorm, SchemeSel, SchemeUrg, SchemeLast }; /* color schemes */ + enum { NetSupported, NetWMName, NetWMState, + NetWMFullscreen, NetActiveWindow, NetWMWindowType, + NetWMWindowTypeDialog, NetClientList, NetLast }; /* EWMH atoms */ +@@ -1537,6 +1537,9 @@ setup(void) { + scheme[SchemeSel].border = drw_clr_create(drw, selbordercolor); + scheme[SchemeSel].bg = drw_clr_create(drw, selbgcolor); + scheme[SchemeSel].fg = drw_clr_create(drw, selfgcolor); ++ scheme[SchemeUrg].border = drw_clr_create(drw, urgbordercolor); ++ scheme[SchemeUrg].bg = drw_clr_create(drw, selbgcolor); ++ scheme[SchemeUrg].fg = drw_clr_create(drw, selfgcolor); + /* init bars */ + updatebars(); + updatestatus(); +@@ -1982,8 +1985,11 @@ updatewmhints(Client *c) { + wmh->flags &= ~XUrgencyHint; + XSetWMHints(dpy, c->win, wmh); + } +- else ++ else { + c->isurgent = (wmh->flags & XUrgencyHint) ? True : False; ++ if (c->isurgent) ++ XSetWindowBorder(dpy, c->win, scheme[SchemeUrg].border->rgb); ++ } + if(wmh->flags & InputHint) + c->neverfocus = !wmh->input; + else +-- +2.1.4 + diff --git a/dwm.suckless.org/patches/urgentborder.md b/dwm.suckless.org/patches/urgentborder.md @@ -8,8 +8,8 @@ Use config.h item "urgbordercolor" to change it. ## Download - * [dwm-5.7.2-urgentborder.diff](dwm-5.7.2-urgentborder.diff) (1.6K) (20091221) + * [dwm-6.1-make-the-borders-of-urgent-windows-a-different-color.diff](dwm-6.1-make-the-borders-of-urgent-windows-a-different-color.diff) (2.2K) (20150307) ## Author - * Ray Kohler - ataraxia937 gmail com + * Alexander Huemer - alexander dot huemer dot xx dot vu (Based on former work by Ray Kohler - ataraxia937 gmail com)