Mercurial > aewl
comparison tag.c @ 130:30d1302dbe3b
sanitization of several clunky stuff, removed heretag (rarely of use), simplified pop(), changed shortcuts to always contain MODKEY
author | arg@10ksloc.org |
---|---|
date | Fri, 21 Jul 2006 07:37:52 +0200 |
parents | 1480e19f6377 |
children | c1185dc7a36e |
comparison
equal
deleted
inserted
replaced
129:c478383db7c9 | 130:30d1302dbe3b |
---|---|
19 } Rule; | 19 } Rule; |
20 | 20 |
21 /* CUSTOMIZE */ | 21 /* CUSTOMIZE */ |
22 static Rule rule[] = { | 22 static Rule rule[] = { |
23 /* class:instance tags isfloat */ | 23 /* class:instance tags isfloat */ |
24 { "Firefox.*", { [Twww] = "www" }, False }, | 24 { "Firefox.*", { [Tnet] = "net" }, False }, |
25 { "Gimp.*", { 0 }, True}, | 25 { "Gimp.*", { 0 }, True}, |
26 }; | 26 }; |
27 | 27 |
28 char *tags[TLast] = { | 28 char *tags[TLast] = { |
29 [Tscratch] = "scratch", | 29 [Tfnord] = "fnord", |
30 [Tdev] = "dev", | 30 [Tdev] = "dev", |
31 [Twww] = "www", | 31 [Tnet] = "net", |
32 [Twork] = "work", | 32 [Twork] = "work", |
33 [Tmisc] = "misc", | |
33 }; | 34 }; |
34 | 35 |
35 void (*arrange)(Arg *) = dotile; | 36 void (*arrange)(Arg *) = dotile; |
36 | 37 |
37 /* END CUSTOMIZE */ | 38 /* END CUSTOMIZE */ |
143 Client * | 144 Client * |
144 getprev(Client *c) | 145 getprev(Client *c) |
145 { | 146 { |
146 for(; c && !c->tags[tsel]; c = c->prev); | 147 for(; c && !c->tags[tsel]; c = c->prev); |
147 return c; | 148 return c; |
148 } | |
149 | |
150 void | |
151 heretag(Arg *arg) | |
152 { | |
153 int i; | |
154 Client *c; | |
155 | |
156 if(arg->i == tsel) | |
157 return; | |
158 | |
159 if(!(c = getnext(clients, arg->i))) | |
160 return; | |
161 | |
162 for(i = 0; i < TLast; i++) | |
163 c->tags[i] = NULL; | |
164 c->tags[tsel] = tags[tsel]; | |
165 pop(c); | |
166 focus(c); | |
167 } | 149 } |
168 | 150 |
169 void | 151 void |
170 replacetag(Arg *arg) | 152 replacetag(Arg *arg) |
171 { | 153 { |