lowercase since it looks better
This commit is contained in:
parent
832895b044
commit
14cb252263
14
bar.h
14
bar.h
|
@ -12,11 +12,11 @@
|
|||
*/
|
||||
static const BarRule barrules[] = {
|
||||
/* monitor bar alignment width function draw function click function name */
|
||||
{ -1, 0, BAR_ALIGN_LEFT, width_ltsymbol, draw_ltsymbol, click_ltsymbol, "layout" },
|
||||
{ -1, 0, BAR_ALIGN_LEFT, width_tags, draw_tags, click_tags, "tags" },
|
||||
{ 'A', 0, BAR_ALIGN_RIGHT, width_systray, draw_systray, click_systray, "systray" },
|
||||
//{ 'A', 0, BAR_ALIGN_RIGHT, width_status_basic, draw_status_basic, click_status_basic, "basic status" },
|
||||
{ 'A', 0, BAR_ALIGN_RIGHT, width_status, draw_status, click_status, "clickable status" },
|
||||
//{ -1, 0, BAR_ALIGN_NONE, width_title_basic, draw_title_basic, click_title_basic, "basic title" },
|
||||
{ -1, 0, BAR_ALIGN_NONE, width_title, draw_title, click_title, "title" },
|
||||
{ -1, 0, bar_align_left, width_ltsymbol, draw_ltsymbol, click_ltsymbol, "layout" },
|
||||
{ -1, 0, bar_align_left, width_tags, draw_tags, click_tags, "tags" },
|
||||
{ 'A', 0, bar_align_right, width_systray, draw_systray, click_systray, "systray" },
|
||||
//{ 'A', 0, bar_align_right, width_status_basic, draw_status_basic, click_status_basic, "basic status" },
|
||||
{ 'A', 0, bar_align_right, width_status, draw_status, click_status, "clickable status" },
|
||||
//{ -1, 0, bar_align_none, width_title_basic, draw_title_basic, click_title_basic, "basic title" },
|
||||
{ -1, 0, bar_align_none, width_title, draw_title, click_title, "title" },
|
||||
};
|
||||
|
|
44
speedwm.c
44
speedwm.c
|
@ -133,17 +133,17 @@ struct ClientState {
|
|||
#endif
|
||||
|
||||
enum {
|
||||
BAR_ALIGN_LEFT,
|
||||
BAR_ALIGN_CENTER,
|
||||
BAR_ALIGN_RIGHT,
|
||||
BAR_ALIGN_LEFT_LEFT,
|
||||
BAR_ALIGN_LEFT_RIGHT,
|
||||
BAR_ALIGN_LEFT_CENTER,
|
||||
BAR_ALIGN_NONE,
|
||||
BAR_ALIGN_RIGHT_LEFT,
|
||||
BAR_ALIGN_RIGHT_RIGHT,
|
||||
BAR_ALIGN_RIGHT_CENTER,
|
||||
BAR_ALIGN_LAST
|
||||
bar_align_left,
|
||||
bar_align_center,
|
||||
bar_align_right,
|
||||
bar_align_left_left,
|
||||
bar_align_left_right,
|
||||
bar_align_left_center,
|
||||
bar_align_none,
|
||||
bar_align_right_left,
|
||||
bar_align_right_right,
|
||||
bar_align_right_center,
|
||||
bar_align_last
|
||||
}; /* bar alignment */
|
||||
|
||||
typedef union {
|
||||
|
@ -2238,7 +2238,7 @@ drawbarwin(Bar *bar)
|
|||
if (br->monitor != 'A' && br->monitor != -1 && br->monitor != mi)
|
||||
continue;
|
||||
drw_setscheme(drw, scheme[SchemeBar]);
|
||||
warg.max_width = (br->alignment < BAR_ALIGN_RIGHT_LEFT ? lw : rw);
|
||||
warg.max_width = (br->alignment < bar_align_right_left ? lw : rw);
|
||||
w = br->widthfunc(bar, &warg);
|
||||
w = MIN(warg.max_width, w);
|
||||
|
||||
|
@ -2252,9 +2252,9 @@ drawbarwin(Bar *bar)
|
|||
|
||||
switch(br->alignment) {
|
||||
default:
|
||||
case BAR_ALIGN_NONE:
|
||||
case BAR_ALIGN_LEFT_LEFT:
|
||||
case BAR_ALIGN_LEFT:
|
||||
case bar_align_none:
|
||||
case bar_align_left_left:
|
||||
case bar_align_left:
|
||||
bar->x[r] = lx;
|
||||
if (lx == rx) {
|
||||
rx += w;
|
||||
|
@ -2263,15 +2263,15 @@ drawbarwin(Bar *bar)
|
|||
lx += w;
|
||||
lw -= w;
|
||||
break;
|
||||
case BAR_ALIGN_LEFT_RIGHT:
|
||||
case BAR_ALIGN_RIGHT:
|
||||
case bar_align_left_right:
|
||||
case bar_align_right:
|
||||
bar->x[r] = lx + lw - w;
|
||||
if (lx == rx)
|
||||
rw -= w;
|
||||
lw -= w;
|
||||
break;
|
||||
case BAR_ALIGN_LEFT_CENTER:
|
||||
case BAR_ALIGN_CENTER:
|
||||
case bar_align_left_center:
|
||||
case bar_align_center:
|
||||
bar->x[r] = lx + lw / 2 - w / 2;
|
||||
if (lx == rx) {
|
||||
rw = rx + rw - bar->x[r] - w;
|
||||
|
@ -2279,7 +2279,7 @@ drawbarwin(Bar *bar)
|
|||
}
|
||||
lw = bar->x[r] - lx;
|
||||
break;
|
||||
case BAR_ALIGN_RIGHT_LEFT:
|
||||
case bar_align_right_left:
|
||||
bar->x[r] = rx;
|
||||
if (lx == rx) {
|
||||
lx += w;
|
||||
|
@ -2288,13 +2288,13 @@ drawbarwin(Bar *bar)
|
|||
rx += w;
|
||||
rw -= w;
|
||||
break;
|
||||
case BAR_ALIGN_RIGHT_RIGHT:
|
||||
case bar_align_right_right:
|
||||
bar->x[r] = rx + rw - w;
|
||||
if (lx == rx)
|
||||
lw -= w;
|
||||
rw -= w;
|
||||
break;
|
||||
case BAR_ALIGN_RIGHT_CENTER:
|
||||
case bar_align_right_center:
|
||||
bar->x[r] = rx + rw / 2 - w / 2;
|
||||
if (lx == rx) {
|
||||
lw = lx + lw - bar->x[r] + w;
|
||||
|
|
Loading…
Reference in a new issue