[wiki] [sites] dwm patches: Add ispermanent || Chris Down

From: <git_AT_suckless.org>
Date: Mon, 03 Aug 2015 09:04:34 +0200

commit 58c80e54203a77fc4936f7d6319d9e5427edba3c
Author: Chris Down <chris_AT_chrisdown.name>
Date: Mon Aug 3 08:03:49 2015 +0100

    dwm patches: Add ispermanent

diff --git a/dwm.suckless.org/patches/dwm-6.1-ispermanent.diff b/dwm.suckless.org/patches/dwm-6.1-ispermanent.diff
new file mode 100644
index 0000000..b6da41b
--- /dev/null
+++ b/dwm.suckless.org/patches/dwm-6.1-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/ispermanent.md b/dwm.suckless.org/patches/ispermanent.md
new file mode 100644
index 0000000..cd6ca62
--- /dev/null
+++ b/dwm.suckless.org/patches/ispermanent.md
_AT_@ -0,0 +1,18 @@
+ispermanent
+===========
+
+Description
+-----------
+
+Property for clients to avoid accidental termination by `killclient` for sticky
+windows.
+
+Download
+--------
+
+* [dwm-6.1-ispermanent.diff](dwm-6.1-ispermanent.diff) (1.8k) (20150803)
+
+Author
+------
+
+* [Chris Down](https://chrisdown.name) (cdown) <chris_AT_chrisdown.name>
diff --git a/suckless.org/people/cdown.md b/suckless.org/people/cdown.md
index 23a9956..d59c420 100644
--- a/suckless.org/people/cdown.md
+++ b/suckless.org/people/cdown.md
_AT_@ -7,6 +7,7 @@ stuff for dmenu, although I'm not as active in the community as I used to be.
 - [alwaysfullscreen](http://dwm.suckless.org/patches/alwaysfullscreen)
 - [attachaside (unfocused tag version)](http://dwm.suckless.org/patches/attachaside)
 - [center](http://dwm.suckless.org/patches/center)
+- [ispermanent](http://dwm.suckless.org/patches/ispermanent)
 
 Most of my projects are hosted on [my Github](https://github.com/cdown), or on
 [my website](https://chrisdown.name).
Received on Mon Aug 03 2015 - 09:04:34 CEST

This archive was generated by hypermail 2.3.0 : Mon Aug 03 2015 - 09:12:11 CEST