[wiki] [sites] ispermanent: This is a 6.0 patch || Chris Down
commit 8c530baa6be6adf4c6752093503ad276cb0938d4
Author: Chris Down <chris_AT_chrisdown.name>
Date: Wed Jul 20 05:31:20 2016 +0100
ispermanent: This is a 6.0 patch
diff --git a/dwm.suckless.org/patches/dwm-6.0-ispermanent.diff b/dwm.suckless.org/patches/dwm-6.0-ispermanent.diff
new file mode 100644
index 0000000..b6da41b
--- /dev/null
+++ b/dwm.suckless.org/patches/dwm-6.0-ispermanent.diff
_AT_@ -0,0 +1,55 @@
+diff --git config.def.h config.def.h
+index eaae8f3..bf48efb 100644
+--- config.def.h
++++ config.def.h
+_AT_@ -26,9 +26,9 @@ static const Rule rules[] = {
+ * WM_CLASS(STRING) = instance, class
+ * WM_NAME(STRING) = title
+ */
+- /* class instance title tags mask isfloating monitor */
+- { "Gimp", NULL, NULL, 0, True, -1 },
+- { "Firefox", NULL, NULL, 1 << 8, False, -1 },
++ /* class instance title tags mask isfloating ispermanent monitor */
++ { "Gimp", NULL, NULL, 0, True, False, -1 },
++ { "Firefox", NULL, NULL, 1 << 8, False, False, -1 },
+ };
+
+ /* layout(s) */
+diff --git dwm.c dwm.c
+index 169adcb..f0c7589 100644
+--- dwm.c
++++ dwm.c
+_AT_@ -92,7 +92,7 @@ struct Client {
+ int basew, baseh, incw, inch, maxw, maxh, minw, minh;
+ int bw, oldbw;
+ unsigned int tags;
+- Bool isfixed, isfloating, isurgent, neverfocus, oldstate, isfullscreen;
++ Bool isfixed, ispermanent, isfloating, isurgent, neverfocus, oldstate, isfullscreen;
+ Client *next;
+ Client *snext;
+ Monitor *mon;
+_AT_@ -138,6 +138,7 @@ typedef struct {
+ const char *title;
+ unsigned int tags;
+ Bool isfloating;
++ Bool ispermanent;
+ int monitor;
+ } Rule;
+
+_AT_@ -295,6 +296,7 @@ applyrules(Client *c) {
+ && (!r->instance || strstr(instance, r->instance)))
+ {
+ c->isfloating = r->isfloating;
++ c->ispermanent = r->ispermanent;
+ c->tags |= r->tags;
+ for(m = mons; m && m->num != r->monitor; m = m->next);
+ if(m)
+_AT_@ -989,7 +991,7 @@ keypress(XEvent *e) {
+
+ void
+ killclient(const Arg *arg) {
+- if(!selmon->sel)
++ if(!selmon->sel || selmon->sel->ispermanent)
+ return;
+ if(!sendevent(selmon->sel, wmatom[WMDelete])) {
+ XGrabServer(dpy);
diff --git a/dwm.suckless.org/patches/dwm-6.1-ispermanent.diff b/dwm.suckless.org/patches/dwm-6.1-ispermanent.diff
deleted file mode 100644
index b6da41b..0000000
--- a/dwm.suckless.org/patches/dwm-6.1-ispermanent.diff
+++ /dev/null
_AT_@ -1,55 +0,0 @@
-diff --git config.def.h config.def.h
-index eaae8f3..bf48efb 100644
---- config.def.h
-+++ config.def.h
-_AT_@ -26,9 +26,9 @@ static const Rule rules[] = {
- * WM_CLASS(STRING) = instance, class
- * WM_NAME(STRING) = title
- */
-- /* class instance title tags mask isfloating monitor */
-- { "Gimp", NULL, NULL, 0, True, -1 },
-- { "Firefox", NULL, NULL, 1 << 8, False, -1 },
-+ /* class instance title tags mask isfloating ispermanent monitor */
-+ { "Gimp", NULL, NULL, 0, True, False, -1 },
-+ { "Firefox", NULL, NULL, 1 << 8, False, False, -1 },
- };
-
- /* layout(s) */
-diff --git dwm.c dwm.c
-index 169adcb..f0c7589 100644
---- dwm.c
-+++ dwm.c
-_AT_@ -92,7 +92,7 @@ struct Client {
- int basew, baseh, incw, inch, maxw, maxh, minw, minh;
- int bw, oldbw;
- unsigned int tags;
-- Bool isfixed, isfloating, isurgent, neverfocus, oldstate, isfullscreen;
-+ Bool isfixed, ispermanent, isfloating, isurgent, neverfocus, oldstate, isfullscreen;
- Client *next;
- Client *snext;
- Monitor *mon;
-_AT_@ -138,6 +138,7 @@ typedef struct {
- const char *title;
- unsigned int tags;
- Bool isfloating;
-+ Bool ispermanent;
- int monitor;
- } Rule;
-
-_AT_@ -295,6 +296,7 @@ applyrules(Client *c) {
- && (!r->instance || strstr(instance, r->instance)))
- {
- c->isfloating = r->isfloating;
-+ c->ispermanent = r->ispermanent;
- c->tags |= r->tags;
- for(m = mons; m && m->num != r->monitor; m = m->next);
- if(m)
-_AT_@ -989,7 +991,7 @@ keypress(XEvent *e) {
-
- void
- killclient(const Arg *arg) {
-- if(!selmon->sel)
-+ if(!selmon->sel || selmon->sel->ispermanent)
- return;
- if(!sendevent(selmon->sel, wmatom[WMDelete])) {
- XGrabServer(dpy);
diff --git a/dwm.suckless.org/patches/ispermanent.md b/dwm.suckless.org/patches/ispermanent.md
index 85cb04e..17b8e08 100644
--- a/dwm.suckless.org/patches/ispermanent.md
+++ b/dwm.suckless.org/patches/ispermanent.md
_AT_@ -10,9 +10,7 @@ windows.
Download
--------
-<!-- Author has indicated this unclean patch will not be fixed but says it
- would be trivial to forward port, fixes are welcome. -->
-* [dwm-6.1-ispermanent.diff](dwm-6.1-ispermanent.diff) (Unclean patch)
+* [dwm-6.0-ispermanent.diff](dwm-6.0-ispermanent.diff)
Author
------
Received on Wed Jul 20 2016 - 06:31:33 CEST
This archive was generated by hypermail 2.3.0
: Wed Jul 20 2016 - 06:36:28 CEST