Mercurial > hg > index.fcgi > dwm > dwm-3.6.1-11pba
changeset 9:bc03b37b37ba
move command mode text to the left, next to the layout icon
author | paulo@thepaulopc |
---|---|
date | Wed, 15 Jun 2011 23:27:32 -0700 |
parents | e749c30135e9 |
children | ed4f1bf80e57 |
files | draw.c dwm.h main.c |
diffstat | 3 files changed, 8 insertions(+), 8 deletions(-) [+] |
line diff
1.1 --- a/draw.c Tue Jun 14 00:33:07 2011 -0700 1.2 +++ b/draw.c Wed Jun 15 23:27:32 2011 -0700 1.3 @@ -72,19 +72,21 @@ 1.4 drawtext(lt->symbol, dc.norm); 1.5 x = dc.x + dc.w; 1.6 1.7 - char *_stext = stext; 1.8 if (getkeymode() == COMMANDMODE) { 1.9 - strcpy(cmtext, "-- CMD -- "); 1.10 - strncat(cmtext, stext, sizeof cmtext - 1 - strlen(cmtext)); 1.11 - _stext = cmtext; 1.12 + const char *_cmtext = "-- CMD --"; 1.13 + dc.w = textw(_cmtext); 1.14 + dc.x = x; 1.15 + drawtext(_cmtext, dc.norm); 1.16 + x = dc.x + dc.w; 1.17 } 1.18 - dc.w = textw(_stext); 1.19 + 1.20 + dc.w = textw(stext); 1.21 dc.x = sw - dc.w; 1.22 if(dc.x < x) { 1.23 dc.x = x; 1.24 dc.w = sw - x; 1.25 } 1.26 - drawtext(_stext, dc.norm); 1.27 + drawtext(stext, dc.norm); 1.28 1.29 if((dc.w = dc.x - x) > bh) { 1.30 dc.x = x;
2.1 --- a/dwm.h Tue Jun 14 00:33:07 2011 -0700 2.2 +++ b/dwm.h Wed Jun 15 23:27:32 2011 -0700 2.3 @@ -89,7 +89,6 @@ 2.4 2.5 extern const char *tags[]; /* all tags */ 2.6 extern char stext[256]; /* status text */ 2.7 -extern char cmtext[256]; /* command mode text */ 2.8 extern int screen, sx, sy, sw, sh; /* screen geometry */ 2.9 extern int wax, way, wah, waw; /* windowarea geometry */ 2.10 extern unsigned int bh, blw; /* bar height, bar layout label width */
3.1 --- a/main.c Tue Jun 14 00:33:07 2011 -0700 3.2 +++ b/main.c Wed Jun 15 23:27:32 2011 -0700 3.3 @@ -18,7 +18,6 @@ 3.4 /* extern */ 3.5 3.6 char stext[256]; 3.7 -char cmtext[256]; 3.8 int screen, sx, sy, sw, sh, wax, way, waw, wah; 3.9 unsigned int bh, ntags, numlockmask; 3.10 Atom wmatom[WMLast], netatom[NetLast];