mirror of https://github.com/0intro/wmii
removed focuscolors again (unnecessary bloat)
This commit is contained in:
parent
58fa7998b8
commit
1ee2585062
|
@ -46,7 +46,7 @@ create_bar(char *name, Bool intern)
|
|||
b->id = id++;
|
||||
b->intern = intern;
|
||||
cext_strlcpy(b->name, name, sizeof(b->name));
|
||||
cext_strlcpy(b->colstr, def.focuscolor, sizeof(b->colstr));
|
||||
cext_strlcpy(b->colstr, def.selcolor, sizeof(b->colstr));
|
||||
b->color = def.sel;
|
||||
cext_vattach(vector_of_bars(&bar), b);
|
||||
qsort(bar.data, bar.size, sizeof(Bar *), comp_bar_name);
|
||||
|
@ -120,7 +120,7 @@ draw_bar()
|
|||
b = bar.data[i];
|
||||
if(b->intern) {
|
||||
if(view.size && !strncmp(b->name, view.data[sel]->name, sizeof(b->name)))
|
||||
b->color = def.focus;
|
||||
b->color = def.sel;
|
||||
else
|
||||
b->color = def.norm;
|
||||
}
|
||||
|
|
|
@ -273,13 +273,9 @@ draw_client(Client *c)
|
|||
d.gc = c->gc;
|
||||
|
||||
if(c == sel_client())
|
||||
d.color = def.focus;
|
||||
else {
|
||||
if(f->area->sel == fidx)
|
||||
d.color = def.sel;
|
||||
else
|
||||
d.color = def.norm;
|
||||
}
|
||||
d.color = def.sel;
|
||||
else
|
||||
d.color = def.norm;
|
||||
|
||||
/* draw border */
|
||||
if(def.border) {
|
||||
|
@ -305,10 +301,19 @@ draw_client(Client *c)
|
|||
d.rect.x = f->rect.width - d.rect.width;
|
||||
d.data = buf;
|
||||
|
||||
if(f->area->sel == fidx)
|
||||
d.color = def.sel;
|
||||
else
|
||||
d.color = def.norm;
|
||||
blitz_drawlabel(dpy, &d);
|
||||
blitz_drawborder(dpy, &d);
|
||||
d.rect.x = 0;
|
||||
|
||||
if(c == sel_client())
|
||||
d.color = def.sel;
|
||||
else
|
||||
d.color = def.norm;
|
||||
|
||||
/* tag bar */
|
||||
d.rect.width = d.rect.height + blitz_textwidth(dpy, &blitzfont, c->tags);
|
||||
if(d.rect.width + w > f->rect.width)
|
||||
|
|
21
cmd/wm/fs.c
21
cmd/wm/fs.c
|
@ -36,7 +36,6 @@ enum { WMII_IOUNIT = 2048 };
|
|||
* /def/ FsDdef
|
||||
* /def/border FsFborder 0..n
|
||||
* /def/font FsFfont xlib font name
|
||||
* /def/focuscolors FsFfocuscolors focused colors
|
||||
* /def/selcolors FsFselcolors selected colors
|
||||
* /def/normcolors FsFnormcolors normal colors
|
||||
* /def/rules FsFrules rules
|
||||
|
@ -197,7 +196,6 @@ name_of_qid(Qid wqid[IXP_MAX_WELEM], unsigned short qsel)
|
|||
snprintf(buf, sizeof(buf), "%u", i3);
|
||||
return buf;
|
||||
break;
|
||||
case FsFfocuscolors: return "focuscolors"; break;
|
||||
case FsFselcolors: return "selcolors"; break;
|
||||
case FsFnormcolors: return "normcolors"; break;
|
||||
case FsFfont: return "font"; break;
|
||||
|
@ -299,8 +297,6 @@ type_of_name(Qid wqid[IXP_MAX_WELEM], unsigned short qsel, char *name)
|
|||
return FsFgeom;
|
||||
if(!strncmp(name, "colors", 7))
|
||||
return FsFcolors;
|
||||
if(!strncmp(name, "focuscolors", 12))
|
||||
return FsFfocuscolors;
|
||||
if(!strncmp(name, "selcolors", 10))
|
||||
return FsFselcolors;
|
||||
if(!strncmp(name, "normcolors", 11))
|
||||
|
@ -461,7 +457,6 @@ qid_of_name(Qid wqid[IXP_MAX_WELEM], unsigned short qsel, char *name)
|
|||
case FsFfont:
|
||||
case FsFcolw:
|
||||
case FsFrules:
|
||||
case FsFfocuscolors:
|
||||
case FsFselcolors:
|
||||
case FsFnormcolors:
|
||||
case FsFkeys:
|
||||
|
@ -614,7 +609,6 @@ stat_of_name(Stat *stat, char *name, Qid wqid[IXP_MAX_WELEM], unsigned short qse
|
|||
}
|
||||
break;
|
||||
case FsFcolors:
|
||||
case FsFfocuscolors:
|
||||
case FsFselcolors:
|
||||
case FsFnormcolors:
|
||||
return pack_stat(stat, wqid, qsel, name, 23, IXP_DMREAD | IXP_DMWRITE);
|
||||
|
@ -1055,8 +1049,6 @@ xread(IXPConn *c, Fcall *fcall)
|
|||
case FsDdef:
|
||||
fcall->count = stat_of_name(&stat, "border", m->wqid, m->sel);
|
||||
p = ixp_pack_stat(p, &stat);
|
||||
fcall->count += stat_of_name(&stat, "focuscolors", m->wqid, m->sel);
|
||||
p = ixp_pack_stat(p, &stat);
|
||||
fcall->count += stat_of_name(&stat, "selcolors", m->wqid, m->sel);
|
||||
p = ixp_pack_stat(p, &stat);
|
||||
fcall->count += stat_of_name(&stat, "normcolors", m->wqid, m->sel);
|
||||
|
@ -1226,10 +1218,6 @@ xread(IXPConn *c, Fcall *fcall)
|
|||
if((fcall->count = strlen(bar.data[i1]->colstr)))
|
||||
memcpy(p, bar.data[i1]->colstr, fcall->count);
|
||||
break;
|
||||
case FsFfocuscolors:
|
||||
if((fcall->count = strlen(def.focuscolor)))
|
||||
memcpy(p, def.focuscolor, fcall->count);
|
||||
break;
|
||||
case FsFselcolors:
|
||||
if((fcall->count = strlen(def.selcolor)))
|
||||
memcpy(p, def.selcolor, fcall->count);
|
||||
|
@ -1430,15 +1418,6 @@ xwrite(IXPConn *c, Fcall *fcall)
|
|||
blitz_loadcolor(dpy, &bar.data[i1]->color, screen, bar.data[i1]->colstr);
|
||||
draw_bar();
|
||||
break;
|
||||
case FsFfocuscolors:
|
||||
if((fcall->count != 23) || (fcall->data[0] != '#')
|
||||
|| (fcall->data[8] != '#') || (fcall->data[16] != '#'))
|
||||
return Ebadvalue;
|
||||
memcpy(def.focuscolor, fcall->data, fcall->count);
|
||||
def.focuscolor[fcall->count] = 0;
|
||||
blitz_loadcolor(dpy, &def.focus, screen, def.focuscolor);
|
||||
draw_clients();
|
||||
break;
|
||||
case FsFselcolors:
|
||||
if((fcall->count != 23) || (fcall->data[0] != '#')
|
||||
|| (fcall->data[8] != '#') || (fcall->data[16] != '#'))
|
||||
|
|
|
@ -143,7 +143,7 @@ init_screen()
|
|||
|
||||
gcv.subwindow_mode = IncludeInferiors;
|
||||
gcv.function = GXxor;
|
||||
gcv.foreground = def.focus.bg;
|
||||
gcv.foreground = def.sel.bg;
|
||||
gcv.plane_mask = AllPlanes;
|
||||
gcv.graphics_exposures = False;
|
||||
xorgc = XCreateGC(dpy, root, GCForeground | GCGraphicsExposures
|
||||
|
@ -303,8 +303,6 @@ main(int argc, char *argv[])
|
|||
def.border = 2;
|
||||
def.colmode = Coldefault;
|
||||
def.colw = 0;
|
||||
cext_strlcpy(def.focuscolor, BLITZ_FOCUSCOLORS, sizeof(def.focuscolor));
|
||||
blitz_loadcolor(dpy, &def.focus, screen, def.focuscolor);
|
||||
cext_strlcpy(def.selcolor, BLITZ_SELCOLORS, sizeof(def.selcolor));
|
||||
blitz_loadcolor(dpy, &def.sel, screen, def.selcolor);
|
||||
cext_strlcpy(def.normcolor, BLITZ_NORMCOLORS, sizeof(def.normcolor));
|
||||
|
|
|
@ -54,7 +54,6 @@ enum {
|
|||
FsFdata,
|
||||
FsFcolors,
|
||||
FsFfont,
|
||||
FsFfocuscolors,
|
||||
FsFselcolors,
|
||||
FsFnormcolors,
|
||||
FsFkeys,
|
||||
|
@ -150,11 +149,9 @@ typedef struct {
|
|||
|
||||
/* default values */
|
||||
typedef struct {
|
||||
char focuscolor[24];
|
||||
char selcolor[24];
|
||||
char normcolor[24];
|
||||
char *font;
|
||||
BlitzColor focus;
|
||||
BlitzColor sel;
|
||||
BlitzColor norm;
|
||||
unsigned int border;
|
||||
|
|
|
@ -364,9 +364,9 @@ main(int argc, char *argv[])
|
|||
if (!normcolstr || strlen(normcolstr) != 23)
|
||||
normcolstr = strdup(BLITZ_NORMCOLORS);
|
||||
blitz_loadcolor(dpy, &normcolor, screen, normcolstr);
|
||||
selcolstr = getenv("WMII_FOCUSCOLORS");
|
||||
selcolstr = getenv("WMII_SELCOLORS");
|
||||
if (!selcolstr || strlen(selcolstr) != 23)
|
||||
selcolstr = strdup(BLITZ_FOCUSCOLORS);
|
||||
selcolstr = strdup(BLITZ_SELCOLORS);
|
||||
blitz_loadcolor(dpy, &selcolor, screen, selcolstr);
|
||||
|
||||
wa.override_redirect = 1;
|
||||
|
|
|
@ -7,8 +7,7 @@
|
|||
#include <X11/Xlocale.h>
|
||||
|
||||
#define BLITZ_FONT "fixed"
|
||||
#define BLITZ_FOCUSCOLORS "#ffffff #335577 #447799"
|
||||
#define BLITZ_SELCOLORS "#ffffff #112233 #224466"
|
||||
#define BLITZ_SELCOLORS "#ffffff #335577 #447799"
|
||||
#define BLITZ_NORMCOLORS "#222222 #eeeeee #666666"
|
||||
|
||||
/*
|
||||
|
|
|
@ -17,13 +17,12 @@ LEFT=h
|
|||
RIGHT=l
|
||||
|
||||
WMII_FONT='fixed'
|
||||
WMII_FOCUSCOLORS='#ffffff #335577 #447799'
|
||||
WMII_SELCOLORS='#ffffff #112233 #224466'
|
||||
WMII_SELCOLORS='#ffffff #335577 #447799'
|
||||
WMII_NORMCOLORS='#222222 #eeeeee #666666'
|
||||
# dark background
|
||||
#WMII_NORMCOLORS='#eeeeee #111111 #222222'
|
||||
|
||||
export WMII_FONT WMII_FOCUSCOLORS WMII_SELCOLORS WMII_NORMCOLORS
|
||||
export WMII_FONT WMII_SELCOLORS WMII_NORMCOLORS
|
||||
|
||||
# give wmiiwm a chance to start
|
||||
while :
|
||||
|
@ -35,7 +34,6 @@ done
|
|||
# WM CONFIGURATION
|
||||
xwrite /def/border 2
|
||||
xwrite /def/font $WMII_FONT
|
||||
xwrite /def/focuscolors $WMII_FOCUSCOLORS
|
||||
xwrite /def/selcolors $WMII_SELCOLORS
|
||||
xwrite /def/normcolors $WMII_NORMCOLORS
|
||||
xwrite /def/colmode default
|
||||
|
|
Loading…
Reference in New Issue