Mercurial > aewl
comparison tag.c @ 93:c498da7520c7
added heretag command which allows to tag a client of a foreign tag with current tag
author | Anselm R. Garbe <garbeam@wmii.de> |
---|---|
date | Tue, 18 Jul 2006 11:38:31 +0200 |
parents | 052fe7498930 |
children | 6efe82c775c9 |
comparison
equal
deleted
inserted
replaced
92:4bee0aa5b286 | 93:c498da7520c7 |
---|---|
47 resize(c, True); | 47 resize(c, True); |
48 else | 48 else |
49 ban(c); | 49 ban(c); |
50 } | 50 } |
51 if(sel && !sel->tags[tsel]) { | 51 if(sel && !sel->tags[tsel]) { |
52 if((sel = getnext(clients))) { | 52 if((sel = getnext(clients, tsel))) { |
53 higher(sel); | 53 higher(sel); |
54 focus(sel); | 54 focus(sel); |
55 } | 55 } |
56 } | 56 } |
57 drawall(); | 57 drawall(); |
104 } | 104 } |
105 else | 105 else |
106 ban(c); | 106 ban(c); |
107 } | 107 } |
108 if(!sel || (sel && !sel->tags[tsel])) { | 108 if(!sel || (sel && !sel->tags[tsel])) { |
109 if((sel = getnext(clients))) { | 109 if((sel = getnext(clients, tsel))) { |
110 higher(sel); | 110 higher(sel); |
111 focus(sel); | 111 focus(sel); |
112 } | 112 } |
113 } | 113 } |
114 drawall(); | 114 drawall(); |
115 } | 115 } |
116 | 116 |
117 Client * | 117 Client * |
118 getnext(Client *c) | 118 getnext(Client *c, unsigned int t) |
119 { | 119 { |
120 for(; c && !c->tags[tsel]; c = c->next); | 120 for(; c && !c->tags[t]; c = c->next); |
121 return c; | 121 return c; |
122 } | |
123 | |
124 void | |
125 heretag(Arg *arg) | |
126 { | |
127 int i; | |
128 Client *c; | |
129 | |
130 if(arg->i == tsel) | |
131 return; | |
132 | |
133 if(!(c = getnext(clients, arg->i))) | |
134 return; | |
135 | |
136 for(i = 0; i < TLast; i++) | |
137 c->tags[i] = NULL; | |
138 c->tags[tsel] = tags[tsel]; | |
139 arrange(NULL); | |
140 focus(c); | |
122 } | 141 } |
123 | 142 |
124 void | 143 void |
125 replacetag(Arg *arg) | 144 replacetag(Arg *arg) |
126 { | 145 { |