Mercurial > aewl
annotate tag.c @ 190:713dcc7d2c42
fixed a bug in dmenu call
author | arg@10ksloc.org |
---|---|
date | Fri, 04 Aug 2006 13:42:40 +0200 |
parents | e848966a1ac6 |
children | 56fee1dc9d53 |
rev | line source |
---|---|
75 | 1 /* |
2 * (C)opyright MMVI Anselm R. Garbe <garbeam at gmail dot com> | |
3 * See LICENSE file for license details. | |
4 */ | |
76
4bd49f404f10
proceeded with cleaning up, sorting functions, etc
Anselm R. Garbe <garbeam@wmii.de>
parents:
75
diff
changeset
|
5 #include "dwm.h" |
114 | 6 #include <regex.h> |
7 #include <stdio.h> | |
75 | 8 #include <string.h> |
114 | 9 #include <sys/types.h> |
75 | 10 #include <X11/Xutil.h> |
11 | |
84
052fe7498930
ordered variables in structs and source files alphabetically
Anselm R. Garbe <garbeam@wmii.de>
parents:
80
diff
changeset
|
12 /* static */ |
76
4bd49f404f10
proceeded with cleaning up, sorting functions, etc
Anselm R. Garbe <garbeam@wmii.de>
parents:
75
diff
changeset
|
13 |
114 | 14 typedef struct { |
15 const char *pattern; | |
178
e848966a1ac6
removed TLast tag enum, now tags is simple defined as char *[] array, the rest is calculated correctly, rules take an int array for the tags
arg@10ksloc.org
parents:
177
diff
changeset
|
16 const unsigned int *tags; |
114 | 17 Bool isfloat; |
18 } Rule; | |
19 | |
146
f328ce9c558c
centralized/externalized configuration to config.h
arg@10ksloc.org
parents:
144
diff
changeset
|
20 TAGS |
f328ce9c558c
centralized/externalized configuration to config.h
arg@10ksloc.org
parents:
144
diff
changeset
|
21 RULES |
84
052fe7498930
ordered variables in structs and source files alphabetically
Anselm R. Garbe <garbeam@wmii.de>
parents:
80
diff
changeset
|
22 |
156 | 23 void (*arrange)(Arg *) = DEFMODE; |
125 | 24 |
25 /* extern */ | |
26 | |
75 | 27 void |
76
4bd49f404f10
proceeded with cleaning up, sorting functions, etc
Anselm R. Garbe <garbeam@wmii.de>
parents:
75
diff
changeset
|
28 appendtag(Arg *arg) |
75 | 29 { |
76
4bd49f404f10
proceeded with cleaning up, sorting functions, etc
Anselm R. Garbe <garbeam@wmii.de>
parents:
75
diff
changeset
|
30 if(!sel) |
75 | 31 return; |
32 | |
173
1db04019684e
changed Client->tags and Rule->tags to be Bool (I'll also try to remove the TLast enum)
arg@10ksloc.org
parents:
164
diff
changeset
|
33 sel->tags[arg->i] = True; |
75 | 34 arrange(NULL); |
35 } | |
36 | |
37 void | |
38 dofloat(Arg *arg) | |
39 { | |
40 Client *c; | |
41 | |
42 for(c = clients; c; c = c->next) { | |
124
75576e44c1d8
made status bar drawing more robust, implemented togglemax and togglemode, works quite well
arg@10ksloc.org
parents:
123
diff
changeset
|
43 c->ismax = False; |
95
5d88952cbf96
implemened distinguishing float/managed geometries of clients (works quite well)
Anselm R. Garbe <garbeam@wmii.de>
parents:
94
diff
changeset
|
44 if(c->tags[tsel]) { |
99
a19556fe83b5
applied Sanders resize patch, fixed lower bug
arg@10ksloc.org
parents:
97
diff
changeset
|
45 resize(c, True, TopLeft); |
95
5d88952cbf96
implemened distinguishing float/managed geometries of clients (works quite well)
Anselm R. Garbe <garbeam@wmii.de>
parents:
94
diff
changeset
|
46 } |
75 | 47 else |
48 ban(c); | |
49 } | |
50 if(sel && !sel->tags[tsel]) { | |
142
9b9deafa0508
committed a patch which fixes the hints of Jukka
arg@10ksloc.org
parents:
138
diff
changeset
|
51 if((sel = getnext(clients))) { |
75 | 52 higher(sel); |
53 focus(sel); | |
54 } | |
143 | 55 else |
56 XSetInputFocus(dpy, root, RevertToPointerRoot, CurrentTime); | |
75 | 57 } |
58 drawall(); | |
59 } | |
60 | |
61 void | |
62 dotile(Arg *arg) | |
63 { | |
123 | 64 int n, i, w, h; |
75 | 65 Client *c; |
66 | |
67 w = sw - mw; | |
68 for(n = 0, c = clients; c; c = c->next) | |
80
8125f908c80c
several additions in mouse handling ;)
Anselm R. Garbe <garbeam@wmii.de>
parents:
76
diff
changeset
|
69 if(c->tags[tsel] && !c->isfloat) |
75 | 70 n++; |
71 | |
72 if(n > 1) | |
73 h = (sh - bh) / (n - 1); | |
74 else | |
75 h = sh - bh; | |
76 | |
77 for(i = 0, c = clients; c; c = c->next) { | |
124
75576e44c1d8
made status bar drawing more robust, implemented togglemax and togglemode, works quite well
arg@10ksloc.org
parents:
123
diff
changeset
|
78 c->ismax = False; |
75 | 79 if(c->tags[tsel]) { |
80
8125f908c80c
several additions in mouse handling ;)
Anselm R. Garbe <garbeam@wmii.de>
parents:
76
diff
changeset
|
80 if(c->isfloat) { |
75 | 81 higher(c); |
99
a19556fe83b5
applied Sanders resize patch, fixed lower bug
arg@10ksloc.org
parents:
97
diff
changeset
|
82 resize(c, True, TopLeft); |
75 | 83 continue; |
84 } | |
85 if(n == 1) { | |
115
329fd7dae530
removed c->f{x,y,w,h} and c->t{x,y,w,h} in favor for the new rule handling remembering two kinds of geometries is unnecessary, removed the randomized (x,y) setting on dofloat startup, was kind too random und unpredictable
arg@10ksloc.org
parents:
114
diff
changeset
|
86 c->x = sx; |
329fd7dae530
removed c->f{x,y,w,h} and c->t{x,y,w,h} in favor for the new rule handling remembering two kinds of geometries is unnecessary, removed the randomized (x,y) setting on dofloat startup, was kind too random und unpredictable
arg@10ksloc.org
parents:
114
diff
changeset
|
87 c->y = sy + bh; |
164
21071ae1fe68
made fullscreen apps working fine in floating mode (there is no sane way to make them work in tiled mode, thus I switch to floating mode if I run such kind of app), also fixed the xterm issue reported by Sander
arg@10ksloc.org
parents:
156
diff
changeset
|
88 c->w = sw - 2; |
21071ae1fe68
made fullscreen apps working fine in floating mode (there is no sane way to make them work in tiled mode, thus I switch to floating mode if I run such kind of app), also fixed the xterm issue reported by Sander
arg@10ksloc.org
parents:
156
diff
changeset
|
89 c->h = sh - 2 - bh; |
75 | 90 } |
91 else if(i == 0) { | |
115
329fd7dae530
removed c->f{x,y,w,h} and c->t{x,y,w,h} in favor for the new rule handling remembering two kinds of geometries is unnecessary, removed the randomized (x,y) setting on dofloat startup, was kind too random und unpredictable
arg@10ksloc.org
parents:
114
diff
changeset
|
92 c->x = sx; |
329fd7dae530
removed c->f{x,y,w,h} and c->t{x,y,w,h} in favor for the new rule handling remembering two kinds of geometries is unnecessary, removed the randomized (x,y) setting on dofloat startup, was kind too random und unpredictable
arg@10ksloc.org
parents:
114
diff
changeset
|
93 c->y = sy + bh; |
164
21071ae1fe68
made fullscreen apps working fine in floating mode (there is no sane way to make them work in tiled mode, thus I switch to floating mode if I run such kind of app), also fixed the xterm issue reported by Sander
arg@10ksloc.org
parents:
156
diff
changeset
|
94 c->w = mw - 2; |
21071ae1fe68
made fullscreen apps working fine in floating mode (there is no sane way to make them work in tiled mode, thus I switch to floating mode if I run such kind of app), also fixed the xterm issue reported by Sander
arg@10ksloc.org
parents:
156
diff
changeset
|
95 c->h = sh - 2 - bh; |
75 | 96 } |
104
3a708f113f55
implemented fallback for too many clients in stacked mode
arg@10ksloc.org
parents:
99
diff
changeset
|
97 else if(h > bh) { |
115
329fd7dae530
removed c->f{x,y,w,h} and c->t{x,y,w,h} in favor for the new rule handling remembering two kinds of geometries is unnecessary, removed the randomized (x,y) setting on dofloat startup, was kind too random und unpredictable
arg@10ksloc.org
parents:
114
diff
changeset
|
98 c->x = sx + mw; |
329fd7dae530
removed c->f{x,y,w,h} and c->t{x,y,w,h} in favor for the new rule handling remembering two kinds of geometries is unnecessary, removed the randomized (x,y) setting on dofloat startup, was kind too random und unpredictable
arg@10ksloc.org
parents:
114
diff
changeset
|
99 c->y = sy + (i - 1) * h + bh; |
164
21071ae1fe68
made fullscreen apps working fine in floating mode (there is no sane way to make them work in tiled mode, thus I switch to floating mode if I run such kind of app), also fixed the xterm issue reported by Sander
arg@10ksloc.org
parents:
156
diff
changeset
|
100 c->w = w - 2; |
21071ae1fe68
made fullscreen apps working fine in floating mode (there is no sane way to make them work in tiled mode, thus I switch to floating mode if I run such kind of app), also fixed the xterm issue reported by Sander
arg@10ksloc.org
parents:
156
diff
changeset
|
101 c->h = h - 2; |
75 | 102 } |
104
3a708f113f55
implemented fallback for too many clients in stacked mode
arg@10ksloc.org
parents:
99
diff
changeset
|
103 else { /* fallback if h < bh */ |
115
329fd7dae530
removed c->f{x,y,w,h} and c->t{x,y,w,h} in favor for the new rule handling remembering two kinds of geometries is unnecessary, removed the randomized (x,y) setting on dofloat startup, was kind too random und unpredictable
arg@10ksloc.org
parents:
114
diff
changeset
|
104 c->x = sx + mw; |
329fd7dae530
removed c->f{x,y,w,h} and c->t{x,y,w,h} in favor for the new rule handling remembering two kinds of geometries is unnecessary, removed the randomized (x,y) setting on dofloat startup, was kind too random und unpredictable
arg@10ksloc.org
parents:
114
diff
changeset
|
105 c->y = sy + bh; |
164
21071ae1fe68
made fullscreen apps working fine in floating mode (there is no sane way to make them work in tiled mode, thus I switch to floating mode if I run such kind of app), also fixed the xterm issue reported by Sander
arg@10ksloc.org
parents:
156
diff
changeset
|
106 c->w = w - 2; |
21071ae1fe68
made fullscreen apps working fine in floating mode (there is no sane way to make them work in tiled mode, thus I switch to floating mode if I run such kind of app), also fixed the xterm issue reported by Sander
arg@10ksloc.org
parents:
156
diff
changeset
|
107 c->h = sh - 2 - bh; |
104
3a708f113f55
implemented fallback for too many clients in stacked mode
arg@10ksloc.org
parents:
99
diff
changeset
|
108 } |
99
a19556fe83b5
applied Sanders resize patch, fixed lower bug
arg@10ksloc.org
parents:
97
diff
changeset
|
109 resize(c, False, TopLeft); |
75 | 110 i++; |
111 } | |
112 else | |
113 ban(c); | |
114 } | |
115 if(!sel || (sel && !sel->tags[tsel])) { | |
142
9b9deafa0508
committed a patch which fixes the hints of Jukka
arg@10ksloc.org
parents:
138
diff
changeset
|
116 if((sel = getnext(clients))) { |
75 | 117 higher(sel); |
118 focus(sel); | |
119 } | |
143 | 120 else |
121 XSetInputFocus(dpy, root, RevertToPointerRoot, CurrentTime); | |
75 | 122 } |
123 drawall(); | |
124 } | |
125 | |
76
4bd49f404f10
proceeded with cleaning up, sorting functions, etc
Anselm R. Garbe <garbeam@wmii.de>
parents:
75
diff
changeset
|
126 Client * |
142
9b9deafa0508
committed a patch which fixes the hints of Jukka
arg@10ksloc.org
parents:
138
diff
changeset
|
127 getnext(Client *c) |
93
c498da7520c7
added heretag command which allows to tag a client of a foreign tag with current tag
Anselm R. Garbe <garbeam@wmii.de>
parents:
84
diff
changeset
|
128 { |
142
9b9deafa0508
committed a patch which fixes the hints of Jukka
arg@10ksloc.org
parents:
138
diff
changeset
|
129 for(; c && !c->tags[tsel]; c = c->next); |
93
c498da7520c7
added heretag command which allows to tag a client of a foreign tag with current tag
Anselm R. Garbe <garbeam@wmii.de>
parents:
84
diff
changeset
|
130 return c; |
c498da7520c7
added heretag command which allows to tag a client of a foreign tag with current tag
Anselm R. Garbe <garbeam@wmii.de>
parents:
84
diff
changeset
|
131 } |
c498da7520c7
added heretag command which allows to tag a client of a foreign tag with current tag
Anselm R. Garbe <garbeam@wmii.de>
parents:
84
diff
changeset
|
132 |
127
1480e19f6377
using double-linked list in order to get correct prev focus handling
arg@10ksloc.org
parents:
125
diff
changeset
|
133 Client * |
1480e19f6377
using double-linked list in order to get correct prev focus handling
arg@10ksloc.org
parents:
125
diff
changeset
|
134 getprev(Client *c) |
1480e19f6377
using double-linked list in order to get correct prev focus handling
arg@10ksloc.org
parents:
125
diff
changeset
|
135 { |
1480e19f6377
using double-linked list in order to get correct prev focus handling
arg@10ksloc.org
parents:
125
diff
changeset
|
136 for(; c && !c->tags[tsel]; c = c->prev); |
1480e19f6377
using double-linked list in order to get correct prev focus handling
arg@10ksloc.org
parents:
125
diff
changeset
|
137 return c; |
1480e19f6377
using double-linked list in order to get correct prev focus handling
arg@10ksloc.org
parents:
125
diff
changeset
|
138 } |
1480e19f6377
using double-linked list in order to get correct prev focus handling
arg@10ksloc.org
parents:
125
diff
changeset
|
139 |
93
c498da7520c7
added heretag command which allows to tag a client of a foreign tag with current tag
Anselm R. Garbe <garbeam@wmii.de>
parents:
84
diff
changeset
|
140 void |
75 | 141 replacetag(Arg *arg) |
142 { | |
143 int i; | |
123 | 144 |
75 | 145 if(!sel) |
146 return; | |
147 | |
178
e848966a1ac6
removed TLast tag enum, now tags is simple defined as char *[] array, the rest is calculated correctly, rules take an int array for the tags
arg@10ksloc.org
parents:
177
diff
changeset
|
148 for(i = 0; i < ntags; i++) |
173
1db04019684e
changed Client->tags and Rule->tags to be Bool (I'll also try to remove the TLast enum)
arg@10ksloc.org
parents:
164
diff
changeset
|
149 sel->tags[i] = False; |
75 | 150 appendtag(arg); |
151 } | |
152 | |
76
4bd49f404f10
proceeded with cleaning up, sorting functions, etc
Anselm R. Garbe <garbeam@wmii.de>
parents:
75
diff
changeset
|
153 void |
4bd49f404f10
proceeded with cleaning up, sorting functions, etc
Anselm R. Garbe <garbeam@wmii.de>
parents:
75
diff
changeset
|
154 settags(Client *c) |
4bd49f404f10
proceeded with cleaning up, sorting functions, etc
Anselm R. Garbe <garbeam@wmii.de>
parents:
75
diff
changeset
|
155 { |
114 | 156 char classinst[256]; |
138
c1185dc7a36e
some cleanups/fixes inspired by Jukka Salmi's feedback
arg@10ksloc.org
parents:
130
diff
changeset
|
157 static unsigned int len = sizeof(rule) / sizeof(rule[0]); |
178
e848966a1ac6
removed TLast tag enum, now tags is simple defined as char *[] array, the rest is calculated correctly, rules take an int array for the tags
arg@10ksloc.org
parents:
177
diff
changeset
|
158 unsigned int i, j, n; |
114 | 159 regex_t regex; |
160 regmatch_t tmp; | |
76
4bd49f404f10
proceeded with cleaning up, sorting functions, etc
Anselm R. Garbe <garbeam@wmii.de>
parents:
75
diff
changeset
|
161 Bool matched = False; |
114 | 162 XClassHint ch; |
76
4bd49f404f10
proceeded with cleaning up, sorting functions, etc
Anselm R. Garbe <garbeam@wmii.de>
parents:
75
diff
changeset
|
163 |
4bd49f404f10
proceeded with cleaning up, sorting functions, etc
Anselm R. Garbe <garbeam@wmii.de>
parents:
75
diff
changeset
|
164 if(XGetClassHint(dpy, c->win, &ch)) { |
114 | 165 snprintf(classinst, sizeof(classinst), "%s:%s", |
166 ch.res_class ? ch.res_class : "", | |
167 ch.res_name ? ch.res_name : ""); | |
168 for(i = 0; !matched && i < len; i++) { | |
169 if(!regcomp(®ex, rule[i].pattern, 0)) { | |
170 if(!regexec(®ex, classinst, 1, &tmp, 0)) { | |
178
e848966a1ac6
removed TLast tag enum, now tags is simple defined as char *[] array, the rest is calculated correctly, rules take an int array for the tags
arg@10ksloc.org
parents:
177
diff
changeset
|
171 n = rule[i].tags ? |
e848966a1ac6
removed TLast tag enum, now tags is simple defined as char *[] array, the rest is calculated correctly, rules take an int array for the tags
arg@10ksloc.org
parents:
177
diff
changeset
|
172 sizeof(rule[i].tags) / sizeof(rule[i].tags[0]) : 0; |
e848966a1ac6
removed TLast tag enum, now tags is simple defined as char *[] array, the rest is calculated correctly, rules take an int array for the tags
arg@10ksloc.org
parents:
177
diff
changeset
|
173 matched = n != 0; |
e848966a1ac6
removed TLast tag enum, now tags is simple defined as char *[] array, the rest is calculated correctly, rules take an int array for the tags
arg@10ksloc.org
parents:
177
diff
changeset
|
174 for(j = 0; j < n; j++) |
e848966a1ac6
removed TLast tag enum, now tags is simple defined as char *[] array, the rest is calculated correctly, rules take an int array for the tags
arg@10ksloc.org
parents:
177
diff
changeset
|
175 c->tags[rule[i].tags[j]] = True; |
80
8125f908c80c
several additions in mouse handling ;)
Anselm R. Garbe <garbeam@wmii.de>
parents:
76
diff
changeset
|
176 c->isfloat = rule[i].isfloat; |
76
4bd49f404f10
proceeded with cleaning up, sorting functions, etc
Anselm R. Garbe <garbeam@wmii.de>
parents:
75
diff
changeset
|
177 } |
114 | 178 regfree(®ex); |
179 } | |
76
4bd49f404f10
proceeded with cleaning up, sorting functions, etc
Anselm R. Garbe <garbeam@wmii.de>
parents:
75
diff
changeset
|
180 } |
4bd49f404f10
proceeded with cleaning up, sorting functions, etc
Anselm R. Garbe <garbeam@wmii.de>
parents:
75
diff
changeset
|
181 if(ch.res_class) |
4bd49f404f10
proceeded with cleaning up, sorting functions, etc
Anselm R. Garbe <garbeam@wmii.de>
parents:
75
diff
changeset
|
182 XFree(ch.res_class); |
4bd49f404f10
proceeded with cleaning up, sorting functions, etc
Anselm R. Garbe <garbeam@wmii.de>
parents:
75
diff
changeset
|
183 if(ch.res_name) |
4bd49f404f10
proceeded with cleaning up, sorting functions, etc
Anselm R. Garbe <garbeam@wmii.de>
parents:
75
diff
changeset
|
184 XFree(ch.res_name); |
4bd49f404f10
proceeded with cleaning up, sorting functions, etc
Anselm R. Garbe <garbeam@wmii.de>
parents:
75
diff
changeset
|
185 } |
4bd49f404f10
proceeded with cleaning up, sorting functions, etc
Anselm R. Garbe <garbeam@wmii.de>
parents:
75
diff
changeset
|
186 if(!matched) |
173
1db04019684e
changed Client->tags and Rule->tags to be Bool (I'll also try to remove the TLast enum)
arg@10ksloc.org
parents:
164
diff
changeset
|
187 c->tags[tsel] = True; |
76
4bd49f404f10
proceeded with cleaning up, sorting functions, etc
Anselm R. Garbe <garbeam@wmii.de>
parents:
75
diff
changeset
|
188 } |
4bd49f404f10
proceeded with cleaning up, sorting functions, etc
Anselm R. Garbe <garbeam@wmii.de>
parents:
75
diff
changeset
|
189 |
4bd49f404f10
proceeded with cleaning up, sorting functions, etc
Anselm R. Garbe <garbeam@wmii.de>
parents:
75
diff
changeset
|
190 void |
124
75576e44c1d8
made status bar drawing more robust, implemented togglemax and togglemode, works quite well
arg@10ksloc.org
parents:
123
diff
changeset
|
191 togglemode(Arg *arg) |
75576e44c1d8
made status bar drawing more robust, implemented togglemax and togglemode, works quite well
arg@10ksloc.org
parents:
123
diff
changeset
|
192 { |
75576e44c1d8
made status bar drawing more robust, implemented togglemax and togglemode, works quite well
arg@10ksloc.org
parents:
123
diff
changeset
|
193 arrange = arrange == dofloat ? dotile : dofloat; |
75576e44c1d8
made status bar drawing more robust, implemented togglemax and togglemode, works quite well
arg@10ksloc.org
parents:
123
diff
changeset
|
194 arrange(NULL); |
75576e44c1d8
made status bar drawing more robust, implemented togglemax and togglemode, works quite well
arg@10ksloc.org
parents:
123
diff
changeset
|
195 } |
75576e44c1d8
made status bar drawing more robust, implemented togglemax and togglemode, works quite well
arg@10ksloc.org
parents:
123
diff
changeset
|
196 |
75576e44c1d8
made status bar drawing more robust, implemented togglemax and togglemode, works quite well
arg@10ksloc.org
parents:
123
diff
changeset
|
197 void |
76
4bd49f404f10
proceeded with cleaning up, sorting functions, etc
Anselm R. Garbe <garbeam@wmii.de>
parents:
75
diff
changeset
|
198 view(Arg *arg) |
4bd49f404f10
proceeded with cleaning up, sorting functions, etc
Anselm R. Garbe <garbeam@wmii.de>
parents:
75
diff
changeset
|
199 { |
4bd49f404f10
proceeded with cleaning up, sorting functions, etc
Anselm R. Garbe <garbeam@wmii.de>
parents:
75
diff
changeset
|
200 tsel = arg->i; |
4bd49f404f10
proceeded with cleaning up, sorting functions, etc
Anselm R. Garbe <garbeam@wmii.de>
parents:
75
diff
changeset
|
201 arrange(NULL); |
4bd49f404f10
proceeded with cleaning up, sorting functions, etc
Anselm R. Garbe <garbeam@wmii.de>
parents:
75
diff
changeset
|
202 drawall(); |
4bd49f404f10
proceeded with cleaning up, sorting functions, etc
Anselm R. Garbe <garbeam@wmii.de>
parents:
75
diff
changeset
|
203 } |
144
e61447a7f249
applied Jukkas prev/next patch with XK_{h,l}
arg@10ksloc.org
parents:
143
diff
changeset
|
204 |
e61447a7f249
applied Jukkas prev/next patch with XK_{h,l}
arg@10ksloc.org
parents:
143
diff
changeset
|
205 void |
e61447a7f249
applied Jukkas prev/next patch with XK_{h,l}
arg@10ksloc.org
parents:
143
diff
changeset
|
206 viewnext(Arg *arg) |
e61447a7f249
applied Jukkas prev/next patch with XK_{h,l}
arg@10ksloc.org
parents:
143
diff
changeset
|
207 { |
178
e848966a1ac6
removed TLast tag enum, now tags is simple defined as char *[] array, the rest is calculated correctly, rules take an int array for the tags
arg@10ksloc.org
parents:
177
diff
changeset
|
208 arg->i = (tsel < ntags-1) ? tsel+1 : 0; |
144
e61447a7f249
applied Jukkas prev/next patch with XK_{h,l}
arg@10ksloc.org
parents:
143
diff
changeset
|
209 view(arg); |
e61447a7f249
applied Jukkas prev/next patch with XK_{h,l}
arg@10ksloc.org
parents:
143
diff
changeset
|
210 } |
e61447a7f249
applied Jukkas prev/next patch with XK_{h,l}
arg@10ksloc.org
parents:
143
diff
changeset
|
211 |
e61447a7f249
applied Jukkas prev/next patch with XK_{h,l}
arg@10ksloc.org
parents:
143
diff
changeset
|
212 void |
e61447a7f249
applied Jukkas prev/next patch with XK_{h,l}
arg@10ksloc.org
parents:
143
diff
changeset
|
213 viewprev(Arg *arg) |
e61447a7f249
applied Jukkas prev/next patch with XK_{h,l}
arg@10ksloc.org
parents:
143
diff
changeset
|
214 { |
178
e848966a1ac6
removed TLast tag enum, now tags is simple defined as char *[] array, the rest is calculated correctly, rules take an int array for the tags
arg@10ksloc.org
parents:
177
diff
changeset
|
215 arg->i = (tsel > 0) ? tsel-1 : ntags-1; |
144
e61447a7f249
applied Jukkas prev/next patch with XK_{h,l}
arg@10ksloc.org
parents:
143
diff
changeset
|
216 view(arg); |
e61447a7f249
applied Jukkas prev/next patch with XK_{h,l}
arg@10ksloc.org
parents:
143
diff
changeset
|
217 } |