make gcc happy

This commit is contained in:
speedie 2022-12-04 22:20:17 +01:00
parent c174e1b106
commit c39f3d603a
7 changed files with 52 additions and 31 deletions

View file

@ -1,26 +1,29 @@
int
width_ltsymbol(Bar *bar, BarWidthArg *a)
{
if (selmon->hidelayout)
if (selmon->hidelayout) {
return 0;
else
} else {
return TEXTW(bar->mon->ltsymbol);
}
}
int
draw_ltsymbol(Bar *bar, BarDrawArg *a)
{
if (selmon->hidelayout)
if (selmon->hidelayout) {
return 0;
else
} else {
return drw_text(drw, a->x, 0, a->w, bh, lrpad / 2, bar->mon->ltsymbol, 0, False);
}
}
int
click_ltsymbol(Bar *bar, Arg *arg, BarClickArg *a)
{
if (selmon->hidelayout)
if (selmon->hidelayout) {
return 0;
else
} else {
return ClkLtSymbol;
}
}

View file

@ -1,28 +1,31 @@
int
width_status_basic(Bar *bar, BarWidthArg *a)
{
if (selmon->hidestatus)
if (selmon->hidestatus) {
return 0;
else
} else {
return TEXTW(stext);
}
}
int
draw_status_basic(Bar *bar, BarDrawArg *a)
{
if (selmon->hidestatus)
if (selmon->hidestatus) {
return 0;
else
} else {
return drw_text(drw, a->x, 0, a->w, bh, lrpad / 2, stext, 0, True);
}
}
int
click_status_basic(Bar *bar, Arg *arg, BarClickArg *a)
{
if (selmon->hidestatus)
if (selmon->hidestatus) {
return 0;
else
} else {
return ClkStatusText;
}
}

View file

@ -4,19 +4,21 @@ static char lastbutton[] = "-";
int
width_status(Bar *bar, BarWidthArg *a)
{
if (selmon->hidestatus)
if (selmon->hidestatus) {
return 0;
else
} else {
return textlength(rawstext) + lrpad;
}
}
int
draw_status(Bar *bar, BarDrawArg *a)
{
if (selmon->hidestatus)
if (selmon->hidestatus) {
return 0;
else
} else {
return drawstatustext(a->x, rawstext);
}
}
int
@ -164,10 +166,11 @@ textlength(char* stext)
int
click_status(Bar *bar, Arg *arg, BarClickArg *a)
{
if (selmon->hidestatus)
if (selmon->hidestatus) {
return 0;
else
} else {
return click_status_text(arg, a->rel_x, rawstext);
}
}
int

View file

@ -1,8 +1,9 @@
int
width_tags_basic(Bar *bar, BarWidthArg *a)
{
if (selmon->hidetags)
if (selmon->hidetags) {
return 0;
}
int w, i;
@ -15,8 +16,9 @@ width_tags_basic(Bar *bar, BarWidthArg *a)
int
draw_tags_basic(Bar *bar, BarDrawArg *a)
{
if (selmon->hidetags)
if (selmon->hidetags) {
return 0;
}
int invert;
int w, x = a->x;
@ -49,8 +51,9 @@ draw_tags_basic(Bar *bar, BarDrawArg *a)
int
click_tags_basic(Bar *bar, Arg *arg, BarClickArg *a)
{
if (selmon->hidetags)
if (selmon->hidetags) {
return 0;
}
int i = 0, x = lrpad / 2;

View file

@ -1,8 +1,9 @@
int
width_tags(Bar *bar, BarWidthArg *a)
{
if (selmon->hidetags)
if (selmon->hidetags) {
return 0;
}
int w, i;
unsigned int occ = 0;
@ -25,8 +26,9 @@ width_tags(Bar *bar, BarWidthArg *a)
int
draw_tags(Bar *bar, BarDrawArg *a)
{
if (selmon->hidetags)
if (selmon->hidetags) {
return 0;
}
int x, w;
int invert;
@ -89,8 +91,9 @@ draw_tags(Bar *bar, BarDrawArg *a)
int
click_tags(Bar *bar, Arg *arg, BarClickArg *a)
{
if (selmon->hidetags)
if (selmon->hidetags) {
return 0;
}
int i = 0, x = lrpad / 2;
int plw = drw->font->h / 2 + 1;

View file

@ -1,8 +1,9 @@
int
width_title_basic(Bar *bar, BarWidthArg *a)
{
if (selmon->hidetitle)
if (selmon->hidetitle) {
return 0;
}
return a->max_width;
}
@ -10,8 +11,9 @@ width_title_basic(Bar *bar, BarWidthArg *a)
int
draw_title_basic(Bar *bar, BarDrawArg *a)
{
if (selmon->hidetitle)
if (selmon->hidetitle) {
return 0;
}
int boxs = drw->font->h / 9;
int boxw = drw->font->h / 6 + 2;
@ -37,8 +39,9 @@ draw_title_basic(Bar *bar, BarDrawArg *a)
int
click_title_basic(Bar *bar, Arg *arg, BarClickArg *a)
{
if (selmon->hidetitle)
if (selmon->hidetitle) {
return 0;
}
return ClkWinTitle;
}

View file

@ -1,8 +1,9 @@
int
width_title(Bar *bar, BarWidthArg *a)
{
if (selmon->hidetitle)
if (selmon->hidetitle) {
return 0;
}
return a->max_width;
}
@ -10,8 +11,9 @@ width_title(Bar *bar, BarWidthArg *a)
int
draw_title(Bar *bar, BarDrawArg *a)
{
if (selmon->hidetitle)
if (selmon->hidetitle) {
return 0;
}
int n = 0, scm, remainder = 0, tabw, padding;
unsigned int i;
@ -58,8 +60,9 @@ draw_title(Bar *bar, BarDrawArg *a)
int
click_title(Bar *bar, Arg *arg, BarClickArg *a)
{
if (selmon->hidetitle)
if (selmon->hidetitle) {
return 0;
}
int x = 0, n = 0;
Client *c;