added urgent border patch, fixed sticky patch
This commit is contained in:
parent
4fcccf1fe1
commit
7936509652
2
config.h
2
config.h
@ -14,10 +14,12 @@ static const char col_gray2[] = "#444444";
|
|||||||
static const char col_gray3[] = "#bbbbbb";
|
static const char col_gray3[] = "#bbbbbb";
|
||||||
static const char col_gray4[] = "#eeeeee";
|
static const char col_gray4[] = "#eeeeee";
|
||||||
static const char col_cyan[] = "#005577";
|
static const char col_cyan[] = "#005577";
|
||||||
|
static const char col_urgborder[] = "#ff0000";
|
||||||
static const char *colors[][3] = {
|
static const char *colors[][3] = {
|
||||||
/* fg bg border */
|
/* fg bg border */
|
||||||
[SchemeNorm] = { col_gray3, col_gray1, col_gray2 },
|
[SchemeNorm] = { col_gray3, col_gray1, col_gray2 },
|
||||||
[SchemeSel] = { col_gray4, col_cyan, col_cyan },
|
[SchemeSel] = { col_gray4, col_cyan, col_cyan },
|
||||||
|
[SchemeUrg] = { col_gray4, col_cyan, col_urgborder },
|
||||||
};
|
};
|
||||||
|
|
||||||
/* tagging */
|
/* tagging */
|
||||||
|
8
dwm.c
8
dwm.c
@ -59,7 +59,7 @@
|
|||||||
|
|
||||||
/* enums */
|
/* enums */
|
||||||
enum { CurNormal, CurResize, CurMove, CurLast }; /* cursor */
|
enum { CurNormal, CurResize, CurMove, CurLast }; /* cursor */
|
||||||
enum { SchemeNorm, SchemeSel }; /* color schemes */
|
enum { SchemeNorm, SchemeSel, SchemeUrg }; /* color schemes */
|
||||||
enum { NetSupported, NetWMName, NetWMState, NetWMCheck,
|
enum { NetSupported, NetWMName, NetWMState, NetWMCheck,
|
||||||
NetWMFullscreen, NetActiveWindow, NetWMWindowType,
|
NetWMFullscreen, NetActiveWindow, NetWMWindowType,
|
||||||
NetWMWindowTypeDialog, NetClientList, NetLast }; /* EWMH atoms */
|
NetWMWindowTypeDialog, NetClientList, NetLast }; /* EWMH atoms */
|
||||||
@ -215,6 +215,7 @@ static void togglefloating(const Arg *arg);
|
|||||||
static void togglefullscr(const Arg *arg);
|
static void togglefullscr(const Arg *arg);
|
||||||
static void toggletag(const Arg *arg);
|
static void toggletag(const Arg *arg);
|
||||||
static void toggleview(const Arg *arg);
|
static void toggleview(const Arg *arg);
|
||||||
|
static void togglesticky(const Arg *arg);
|
||||||
static void unfocus(Client *c, int setfocus);
|
static void unfocus(Client *c, int setfocus);
|
||||||
static void unmanage(Client *c, int destroyed);
|
static void unmanage(Client *c, int destroyed);
|
||||||
static void unmapnotify(XEvent *e);
|
static void unmapnotify(XEvent *e);
|
||||||
@ -2054,8 +2055,11 @@ updatewmhints(Client *c)
|
|||||||
if (c == selmon->sel && wmh->flags & XUrgencyHint) {
|
if (c == selmon->sel && wmh->flags & XUrgencyHint) {
|
||||||
wmh->flags &= ~XUrgencyHint;
|
wmh->flags &= ~XUrgencyHint;
|
||||||
XSetWMHints(dpy, c->win, wmh);
|
XSetWMHints(dpy, c->win, wmh);
|
||||||
} else
|
} else {
|
||||||
c->isurgent = (wmh->flags & XUrgencyHint) ? 1 : 0;
|
c->isurgent = (wmh->flags & XUrgencyHint) ? 1 : 0;
|
||||||
|
if (c->isurgent)
|
||||||
|
XSetWindowBorder(dpy, c->win, scheme[SchemeUrg][ColBorder].pixel);
|
||||||
|
}
|
||||||
if (wmh->flags & InputHint)
|
if (wmh->flags & InputHint)
|
||||||
c->neverfocus = !wmh->input;
|
c->neverfocus = !wmh->input;
|
||||||
else
|
else
|
||||||
|
56
patches/dwm-6.2-urg-border.diff
Normal file
56
patches/dwm-6.2-urg-border.diff
Normal file
@ -0,0 +1,56 @@
|
|||||||
|
From f20e5593e154e7e46c3f7100bd1378c7844b5ec8 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Dirk Leichsenring <dlei@reddott.de>
|
||||||
|
Date: Sun, 21 Jun 2020 14:00:40 +0200
|
||||||
|
Subject: [PATCH] Make the borders of urgent windows a different color - for dwm 6.2
|
||||||
|
|
||||||
|
---
|
||||||
|
config.def.h | 2 ++
|
||||||
|
dwm.c | 7 +++++--
|
||||||
|
2 files changed, 7 insertions(+), 2 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/config.def.h b/config.def.h
|
||||||
|
index 1c0b587..1cb4492 100644
|
||||||
|
--- a/config.def.h
|
||||||
|
+++ b/config.def.h
|
||||||
|
@@ -12,10 +12,12 @@ static const char col_gray2[] = "#444444";
|
||||||
|
static const char col_gray3[] = "#bbbbbb";
|
||||||
|
static const char col_gray4[] = "#eeeeee";
|
||||||
|
static const char col_cyan[] = "#005577";
|
||||||
|
+static const char col_urgborder[] = "#ff0000";
|
||||||
|
static const char *colors[][3] = {
|
||||||
|
/* fg bg border */
|
||||||
|
[SchemeNorm] = { col_gray3, col_gray1, col_gray2 },
|
||||||
|
[SchemeSel] = { col_gray4, col_cyan, col_cyan },
|
||||||
|
+ [SchemeUrg] = { col_gray4, col_cyan, col_urgborder },
|
||||||
|
};
|
||||||
|
|
||||||
|
/* tagging */
|
||||||
|
diff --git a/dwm.c b/dwm.c
|
||||||
|
index 4465af1..fda4013 100644
|
||||||
|
--- a/dwm.c
|
||||||
|
+++ b/dwm.c
|
||||||
|
@@ -59,7 +59,7 @@
|
||||||
|
|
||||||
|
/* enums */
|
||||||
|
enum { CurNormal, CurResize, CurMove, CurLast }; /* cursor */
|
||||||
|
-enum { SchemeNorm, SchemeSel }; /* color schemes */
|
||||||
|
+enum { SchemeNorm, SchemeSel, SchemeUrg }; /* color schemes */
|
||||||
|
enum { NetSupported, NetWMName, NetWMState, NetWMCheck,
|
||||||
|
NetWMFullscreen, NetActiveWindow, NetWMWindowType,
|
||||||
|
NetWMWindowTypeDialog, NetClientList, NetLast }; /* EWMH atoms */
|
||||||
|
@@ -2022,8 +2022,11 @@ updatewmhints(Client *c)
|
||||||
|
if (c == selmon->sel && wmh->flags & XUrgencyHint) {
|
||||||
|
wmh->flags &= ~XUrgencyHint;
|
||||||
|
XSetWMHints(dpy, c->win, wmh);
|
||||||
|
- } else
|
||||||
|
+ } else {
|
||||||
|
c->isurgent = (wmh->flags & XUrgencyHint) ? 1 : 0;
|
||||||
|
+ if (c->isurgent)
|
||||||
|
+ XSetWindowBorder(dpy, c->win, scheme[SchemeUrg][ColBorder].pixel);
|
||||||
|
+ }
|
||||||
|
if (wmh->flags & InputHint)
|
||||||
|
c->neverfocus = !wmh->input;
|
||||||
|
else
|
||||||
|
--
|
||||||
|
2.27.0
|
||||||
|
|
Loading…
Reference in New Issue
Block a user