dwm-ispermanent-6.0.diff - sites - public wiki contents of suckless.org
(HTM) git clone git://git.suckless.org/sites
(DIR) Log
(DIR) Files
(DIR) Refs
---
dwm-ispermanent-6.0.diff (1783B)
---
1 diff --git config.def.h config.def.h
2 index eaae8f3..bf48efb 100644
3 --- config.def.h
4 +++ config.def.h
5 @@ -26,9 +26,9 @@ static const Rule rules[] = {
6 * WM_CLASS(STRING) = instance, class
7 * WM_NAME(STRING) = title
8 */
9 - /* class instance title tags mask isfloating monitor */
10 - { "Gimp", NULL, NULL, 0, True, -1 },
11 - { "Firefox", NULL, NULL, 1 << 8, False, -1 },
12 + /* class instance title tags mask isfloating ispermanent monitor */
13 + { "Gimp", NULL, NULL, 0, True, False, -1 },
14 + { "Firefox", NULL, NULL, 1 << 8, False, False, -1 },
15 };
16
17 /* layout(s) */
18 diff --git dwm.c dwm.c
19 index 169adcb..f0c7589 100644
20 --- dwm.c
21 +++ dwm.c
22 @@ -92,7 +92,7 @@ struct Client {
23 int basew, baseh, incw, inch, maxw, maxh, minw, minh;
24 int bw, oldbw;
25 unsigned int tags;
26 - Bool isfixed, isfloating, isurgent, neverfocus, oldstate, isfullscreen;
27 + Bool isfixed, ispermanent, isfloating, isurgent, neverfocus, oldstate, isfullscreen;
28 Client *next;
29 Client *snext;
30 Monitor *mon;
31 @@ -138,6 +138,7 @@ typedef struct {
32 const char *title;
33 unsigned int tags;
34 Bool isfloating;
35 + Bool ispermanent;
36 int monitor;
37 } Rule;
38
39 @@ -295,6 +296,7 @@ applyrules(Client *c) {
40 && (!r->instance || strstr(instance, r->instance)))
41 {
42 c->isfloating = r->isfloating;
43 + c->ispermanent = r->ispermanent;
44 c->tags |= r->tags;
45 for(m = mons; m && m->num != r->monitor; m = m->next);
46 if(m)
47 @@ -989,7 +991,7 @@ keypress(XEvent *e) {
48
49 void
50 killclient(const Arg *arg) {
51 - if(!selmon->sel)
52 + if(!selmon->sel || selmon->sel->ispermanent)
53 return;
54 if(!sendevent(selmon->sel, wmatom[WMDelete])) {
55 XGrabServer(dpy);