diff --git config.def.h config.def.h index eaae8f3..bf48efb 100644 --- config.def.h +++ config.def.h @@ -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 @@ -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; @@ -138,6 +138,7 @@ typedef struct { const char *title; unsigned int tags; Bool isfloating; + Bool ispermanent; int monitor; } Rule; @@ -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) @@ -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);