summaryrefslogtreecommitdiffstats
path: root/dwm.c
diff options
context:
space:
mode:
authorAnselm R Garbe <garbeam@gmail.com>2008-05-17 14:04:27 +0100
committerAnselm R Garbe <garbeam@gmail.com>2008-05-17 14:04:27 +0100
commit349d768b573c5b96056faf153273878f61a9f0c9 (patch)
treea793c1ecb3afbed2c97e1d660e222f610cdb3a51 /dwm.c
parentremoved temporary wildcard handling (diff)
downloaddwm-349d768b573c5b96056faf153273878f61a9f0c9.tar.gz
dwm-349d768b573c5b96056faf153273878f61a9f0c9.zip
renamed setlayout into togglelayout
Diffstat (limited to 'dwm.c')
-rw-r--r--dwm.c48
1 files changed, 24 insertions, 24 deletions
diff --git a/dwm.c b/dwm.c
index 02c30d4..88391af 100644
--- a/dwm.c
+++ b/dwm.c
@@ -165,7 +165,6 @@ void restack(void);
165void run(void); 165void run(void);
166void scan(void); 166void scan(void);
167void setclientstate(Client *c, long state); 167void setclientstate(Client *c, long state);
168void setlayout(const char *arg);
169void setmfact(const char *arg); 168void setmfact(const char *arg);
170void setup(void); 169void setup(void);
171void spawn(const char *arg); 170void spawn(const char *arg);
@@ -179,6 +178,7 @@ void tileresize(Client *c, int x, int y, int w, int h);
179void tilev(void); 178void tilev(void);
180void tilevstack(unsigned int n); 179void tilevstack(unsigned int n);
181void togglefloating(const char *arg); 180void togglefloating(const char *arg);
181void togglelayout(const char *arg);
182void toggletag(const char *arg); 182void toggletag(const char *arg);
183void toggleview(const char *arg); 183void toggleview(const char *arg);
184void unban(Client *c); 184void unban(Client *c);
@@ -335,7 +335,7 @@ buttonpress(XEvent *e) {
335 } 335 }
336 } 336 }
337 if((ev->x < x + blw) && ev->button == Button1) 337 if((ev->x < x + blw) && ev->button == Button1)
338 setlayout(NULL); 338 togglelayout(NULL);
339 } 339 }
340 else if((c = getclient(ev->window))) { 340 else if((c = getclient(ev->window))) {
341 focus(c); 341 focus(c);
@@ -1376,28 +1376,6 @@ setclientstate(Client *c, long state) {
1376} 1376}
1377 1377
1378void 1378void
1379setlayout(const char *arg) {
1380 unsigned int i;
1381
1382 if(!arg) {
1383 if(++lt == &layouts[LENGTH(layouts)])
1384 lt = &layouts[0];
1385 }
1386 else {
1387 for(i = 0; i < LENGTH(layouts); i++)
1388 if(!strcmp(arg, layouts[i].symbol))
1389 break;
1390 if(i == LENGTH(layouts))
1391 return;
1392 lt = &layouts[i];
1393 }
1394 if(sel)
1395 arrange();
1396 else
1397 drawbar();
1398}
1399
1400void
1401setmfact(const char *arg) { 1379setmfact(const char *arg) {
1402 double d; 1380 double d;
1403 1381
@@ -1636,6 +1614,28 @@ togglefloating(const char *arg) {
1636} 1614}
1637 1615
1638void 1616void
1617togglelayout(const char *arg) {
1618 unsigned int i;
1619
1620 if(!arg) {
1621 if(++lt == &layouts[LENGTH(layouts)])
1622 lt = &layouts[0];
1623 }
1624 else {
1625 for(i = 0; i < LENGTH(layouts); i++)
1626 if(!strcmp(arg, layouts[i].symbol))
1627 break;
1628 if(i == LENGTH(layouts))
1629 return;
1630 lt = &layouts[i];
1631 }
1632 if(sel)
1633 arrange();
1634 else
1635 drawbar();
1636}
1637
1638void
1639toggletag(const char *arg) { 1639toggletag(const char *arg) {
1640 unsigned int i, j; 1640 unsigned int i, j;
1641 1641