diff options
Diffstat (limited to '')
| -rw-r--r-- | config.def.h | 2 | ||||
| -rw-r--r-- | dwm.c | 26 |
2 files changed, 14 insertions, 14 deletions
diff --git a/config.def.h b/config.def.h index dedcc61..3cb562a 100644 --- a/config.def.h +++ b/config.def.h | |||
| @@ -13,7 +13,7 @@ | |||
| 13 | 13 | ||
| 14 | /* tagging */ | 14 | /* tagging */ |
| 15 | const char tags[][MAXTAGLEN] = { "1", "2", "3", "4", "5", "6", "7", "8", "www" }; | 15 | const char tags[][MAXTAGLEN] = { "1", "2", "3", "4", "5", "6", "7", "8", "www" }; |
| 16 | Bool seltags[LENGTH(tags)] = {[0] = True}; | 16 | Bool initags[LENGTH(tags)] = {[0] = True}; |
| 17 | Rule rules[] = { | 17 | Rule rules[] = { |
| 18 | /* class:instance:title regex tags regex isfloating */ | 18 | /* class:instance:title regex tags regex isfloating */ |
| 19 | { "Firefox", "www", False }, | 19 | { "Firefox", "www", False }, |
| @@ -297,7 +297,7 @@ applyrules(Client *c) { | |||
| 297 | if(ch.res_name) | 297 | if(ch.res_name) |
| 298 | XFree(ch.res_name); | 298 | XFree(ch.res_name); |
| 299 | if(!matched_tag) | 299 | if(!matched_tag) |
| 300 | memcpy(c->tags, monitors[monitorat(-1, -1)].seltags, sizeof seltags); | 300 | memcpy(c->tags, monitors[monitorat(-1, -1)].seltags, sizeof initags); |
| 301 | if (!matched_monitor) | 301 | if (!matched_monitor) |
| 302 | c->monitor = monitorat(-1, -1); | 302 | c->monitor = monitorat(-1, -1); |
| 303 | } | 303 | } |
| @@ -1056,7 +1056,7 @@ manage(Window w, XWindowAttributes *wa) { | |||
| 1056 | XWindowChanges wc; | 1056 | XWindowChanges wc; |
| 1057 | 1057 | ||
| 1058 | c = emallocz(sizeof(Client)); | 1058 | c = emallocz(sizeof(Client)); |
| 1059 | c->tags = emallocz(sizeof seltags); | 1059 | c->tags = emallocz(sizeof initags); |
| 1060 | c->win = w; | 1060 | c->win = w; |
| 1061 | 1061 | ||
| 1062 | applyrules(c); | 1062 | applyrules(c); |
| @@ -1100,7 +1100,7 @@ manage(Window w, XWindowAttributes *wa) { | |||
| 1100 | if((rettrans = XGetTransientForHint(dpy, w, &trans) == Success)) | 1100 | if((rettrans = XGetTransientForHint(dpy, w, &trans) == Success)) |
| 1101 | for(t = clients; t && t->win != trans; t = t->next); | 1101 | for(t = clients; t && t->win != trans; t = t->next); |
| 1102 | if(t) | 1102 | if(t) |
| 1103 | memcpy(c->tags, t->tags, sizeof seltags); | 1103 | memcpy(c->tags, t->tags, sizeof initags); |
| 1104 | if(!c->isfloating) | 1104 | if(!c->isfloating) |
| 1105 | c->isfloating = (rettrans == Success) || c->isfixed; | 1105 | c->isfloating = (rettrans == Success) || c->isfixed; |
| 1106 | attach(c); | 1106 | attach(c); |
| @@ -1181,7 +1181,7 @@ movemouse(Client *c) { | |||
| 1181 | else if(abs((m->way + m->wah) - (ny + c->h + 2 * c->border)) < SNAP) | 1181 | else if(abs((m->way + m->wah) - (ny + c->h + 2 * c->border)) < SNAP) |
| 1182 | ny = m->way + m->wah - c->h - 2 * c->border; | 1182 | ny = m->way + m->wah - c->h - 2 * c->border; |
| 1183 | resize(c, nx, ny, c->w, c->h, False); | 1183 | resize(c, nx, ny, c->w, c->h, False); |
| 1184 | memcpy(c->tags, monitors[monitorat(nx, ny)].seltags, sizeof seltags); | 1184 | memcpy(c->tags, monitors[monitorat(nx, ny)].seltags, sizeof initags); |
| 1185 | break; | 1185 | break; |
| 1186 | } | 1186 | } |
| 1187 | } | 1187 | } |
| @@ -1591,11 +1591,11 @@ setup(void) { | |||
| 1591 | } | 1591 | } |
| 1592 | 1592 | ||
| 1593 | monitors[i].id = i; | 1593 | monitors[i].id = i; |
| 1594 | monitors[i].seltags = emallocz(LENGTH(tags)*sizeof(char*)); | 1594 | monitors[i].seltags = emallocz(sizeof initags); |
| 1595 | monitors[i].prevtags = emallocz(LENGTH(tags)*sizeof(char*)); | 1595 | monitors[i].prevtags = emallocz(sizeof initags); |
| 1596 | 1596 | ||
| 1597 | memcpy(monitors[i].seltags, seltags, sizeof seltags); | 1597 | memcpy(monitors[i].seltags, initags, sizeof initags); |
| 1598 | memcpy(monitors[i].prevtags, seltags, sizeof seltags); | 1598 | memcpy(monitors[i].prevtags, initags, sizeof initags); |
| 1599 | 1599 | ||
| 1600 | /* init appearance */ | 1600 | /* init appearance */ |
| 1601 | monitors[i].dc.norm[ColBorder] = getcolor(NORMBORDERCOLOR); | 1601 | monitors[i].dc.norm[ColBorder] = getcolor(NORMBORDERCOLOR); |
| @@ -1950,7 +1950,7 @@ view(const char *arg) { | |||
| 1950 | 1950 | ||
| 1951 | Monitor *m = &monitors[monitorat(-1, -1)]; | 1951 | Monitor *m = &monitors[monitorat(-1, -1)]; |
| 1952 | 1952 | ||
| 1953 | memcpy(m->prevtags, seltags, sizeof seltags); | 1953 | memcpy(m->prevtags, m->seltags, sizeof initags); |
| 1954 | for(i = 0; i < LENGTH(tags); i++) | 1954 | for(i = 0; i < LENGTH(tags); i++) |
| 1955 | m->seltags[i] = (NULL == arg); | 1955 | m->seltags[i] = (NULL == arg); |
| 1956 | m->seltags[idxoftag(arg)] = True; | 1956 | m->seltags[idxoftag(arg)] = True; |
| @@ -1963,9 +1963,9 @@ viewprevtag(const char *arg) { | |||
| 1963 | 1963 | ||
| 1964 | Monitor *m = &monitors[monitorat(-1, -1)]; | 1964 | Monitor *m = &monitors[monitorat(-1, -1)]; |
| 1965 | 1965 | ||
| 1966 | memcpy(tmp, m->seltags, sizeof seltags); | 1966 | memcpy(tmp, m->seltags, sizeof initags); |
| 1967 | memcpy(m->seltags, m->prevtags, sizeof seltags); | 1967 | memcpy(m->seltags, m->prevtags, sizeof initags); |
| 1968 | memcpy(m->prevtags, tmp, sizeof seltags); | 1968 | memcpy(m->prevtags, tmp, sizeof initags); |
| 1969 | arrange(); | 1969 | arrange(); |
| 1970 | } | 1970 | } |
| 1971 | 1971 | ||
| @@ -2011,7 +2011,7 @@ movetomonitor(const char *arg) { | |||
| 2011 | if (sel) { | 2011 | if (sel) { |
| 2012 | sel->monitor = arg ? atoi(arg) : (sel->monitor+1) % mcount; | 2012 | sel->monitor = arg ? atoi(arg) : (sel->monitor+1) % mcount; |
| 2013 | 2013 | ||
| 2014 | memcpy(sel->tags, monitors[sel->monitor].seltags, sizeof seltags); | 2014 | memcpy(sel->tags, monitors[sel->monitor].seltags, sizeof initags); |
| 2015 | resize(sel, monitors[sel->monitor].wax, monitors[sel->monitor].way, sel->w, sel->h, True); | 2015 | resize(sel, monitors[sel->monitor].wax, monitors[sel->monitor].way, sel->w, sel->h, True); |
| 2016 | arrange(); | 2016 | arrange(); |
| 2017 | } | 2017 | } |
