Browse Source

removed a bunch of lines, made mode symbols configurable

config
Anselm R. Garbe 18 years ago
parent
commit
aa471f2d65
4 changed files with 7 additions and 8 deletions
  1. +2
    -0
      config.arg.h
  2. +2
    -0
      config.default.h
  3. +2
    -7
      draw.c
  4. +1
    -1
      main.c

+ 2
- 0
config.arg.h View File

@ -15,6 +15,8 @@ const char *tags[] = { "work", "net", "fnord", NULL };
#define NORMFGCOLOR "#cccccc" #define NORMFGCOLOR "#cccccc"
#define STATUSBGCOLOR "#dddddd" #define STATUSBGCOLOR "#dddddd"
#define STATUSFGCOLOR "#222222" #define STATUSFGCOLOR "#222222"
#define FLOATSYMBOL "><"
#define TILEDSYMBOL "|="
#define MODKEY Mod1Mask #define MODKEY Mod1Mask
#define MASTERW 60 /* percent */ #define MASTERW 60 /* percent */


+ 2
- 0
config.default.h View File

@ -15,6 +15,8 @@ const char *tags[] = { "1", "2", "3", "4", "5", NULL };
#define NORMFGCOLOR "#cccccc" #define NORMFGCOLOR "#cccccc"
#define STATUSBGCOLOR "#dddddd" #define STATUSBGCOLOR "#dddddd"
#define STATUSFGCOLOR "#222222" #define STATUSFGCOLOR "#222222"
#define FLOATSYMBOL "~"
#define TILEDSYMBOL "#"
#define MODKEY Mod1Mask #define MODKEY Mod1Mask
#define MASTERW 60 /* percent */ #define MASTERW 60 /* percent */


+ 2
- 7
draw.c View File

@ -94,18 +94,13 @@ drawall()
void void
drawstatus() drawstatus()
{ {
static const char *mode[] = { "><", "|=" };
int i, x; int i, x;
dc.x = dc.y = 0; dc.x = dc.y = 0;
dc.w = bw; dc.w = bw;
if(!modew)
modew = textw(mode[0]) > textw(mode[1]) ? textw(mode[0]) : textw(mode[1]);
drawtext(mode[arrange == dotile ? 1 : 0], dc.status, False);
dc.w = 0;
dc.x = modew;
drawtext(arrange == dotile ? TILEDSYMBOL : FLOATSYMBOL, dc.status, False);
dc.w = modew;
for(i = 0; i < ntags; i++) { for(i = 0; i < ntags; i++) {
dc.x += dc.w; dc.x += dc.w;
dc.w = textw(tags[i]); dc.w = textw(tags[i]);


+ 1
- 1
main.c View File

@ -129,7 +129,7 @@ setup()
dc.status[ColFG] = getcolor(STATUSFGCOLOR); dc.status[ColFG] = getcolor(STATUSFGCOLOR);
setfont(FONT); setfont(FONT);
modew = 0;
modew = textw(FLOATSYMBOL) > textw(TILEDSYMBOL) ? textw(FLOATSYMBOL) : textw(TILEDSYMBOL);
sx = sy = 0; sx = sy = 0;
sw = DisplayWidth(dpy, screen); sw = DisplayWidth(dpy, screen);
sh = DisplayHeight(dpy, screen); sh = DisplayHeight(dpy, screen);


Loading…
Cancel
Save