Extrabar --> extrastatus

This commit is contained in:
bakkeby
2020-07-18 21:12:30 +02:00
parent 250fbbd2c7
commit 6961418d63
14 changed files with 76 additions and 68 deletions

View File

@@ -8,6 +8,18 @@ width_status(Bar *bar, BarWidthArg *a)
#endif // BAR_PANGO_PATCH
}
#if BAR_EXTRASTATUS_PATCH
int
width_status_es(Bar *bar, BarWidthArg *a)
{
#if BAR_PANGO_PATCH
return TEXTWM(estext) - lrpad;
#else
return TEXTW(estext) - lrpad;
#endif // BAR_PANGO_PATCH
}
#endif // BAR_EXTRASTATUS_PATCH
int
draw_status(Bar *bar, BarDrawArg *a)
{
@@ -18,6 +30,18 @@ draw_status(Bar *bar, BarDrawArg *a)
#endif // BAR_PANGO_PATCH
}
#if BAR_EXTRASTATUS_PATCH
int
draw_status_es(Bar *bar, BarDrawArg *a)
{
#if BAR_PANGO_PATCH
return drw_text(drw, a->x, 0, a->w, bh, 0, estext, 0, True);
#else
return drw_text(drw, a->x, 0, a->w, bh, 0, estext, 0);
#endif // BAR_PANGO_PATCH
}
#endif // BAR_EXTRASTATUS_PATCH
int
click_status(Bar *bar, Arg *arg, BarClickArg *a)
{

View File

@@ -1,3 +1,9 @@
static int width_status(Bar *bar, BarWidthArg *a);
#if BAR_EXTRASTATUS_PATCH
static int width_status_es(Bar *bar, BarWidthArg *a);
#endif // BAR_EXTRASTATUS_PATCH
static int draw_status(Bar *bar, BarDrawArg *a);
#if BAR_EXTRASTATUS_PATCH
static int draw_status_es(Bar *bar, BarDrawArg *a);
#endif // BAR_EXTRASTATUS_PATCH
static int click_status(Bar *bar, Arg *arg, BarClickArg *a);

View File

@@ -4,12 +4,28 @@ width_status2d(Bar *bar, BarWidthArg *a)
return status2dtextlength(rawstext) + lrpad;
}
#if BAR_EXTRASTATUS_PATCH
int
width_status2d_es(Bar *bar, BarWidthArg *a)
{
return status2dtextlength(rawestext);
}
#endif // BAR_EXTRASTATUS_PATCH
int
draw_status2d(Bar *bar, BarDrawArg *a)
{
return drawstatusbar(a->x, rawstext);
}
#if BAR_EXTRASTATUS_PATCH
int
draw_status2d_es(Bar *bar, BarDrawArg *a)
{
return drawstatusbar(a->x, rawestext);
}
#endif // BAR_EXTRASTATUS_PATCH
#if !BAR_STATUSCMD_PATCH
int
click_status2d(Bar *bar, Arg *arg, BarClickArg *a)

View File

@@ -1,5 +1,11 @@
static int width_status2d(Bar *bar, BarWidthArg *a);
#if BAR_EXTRASTATUS_PATCH
static int width_status2d_es(Bar *bar, BarWidthArg *a);
#endif // BAR_EXTRASTATUS_PATCH
static int draw_status2d(Bar *bar, BarDrawArg *a);
#if BAR_EXTRASTATUS_PATCH
static int draw_status2d_es(Bar *bar, BarDrawArg *a);
#endif // BAR_EXTRASTATUS_PATCH
#if !BAR_STATUSCMD_PATCH
static int click_status2d(Bar *bar, Arg *arg, BarClickArg *a);
#endif // BAR_STATUSCMD_PATCH

View File

@@ -1,11 +0,0 @@
int
width_status2d_eb(Bar *bar, BarWidthArg *a)
{
return status2dtextlength(rawestext);
}
int
draw_status2d_eb(Bar *bar, BarDrawArg *a)
{
return drawstatusbar(a->x, rawestext);
}

View File

@@ -1,19 +0,0 @@
int
width_status_eb(Bar *bar, BarWidthArg *a)
{
#if BAR_PANGO_PATCH
return TEXTWM(estext) - lrpad;
#else
return TEXTW(estext) - lrpad;
#endif // BAR_PANGO_PATCH
}
int
draw_status_eb(Bar *bar, BarDrawArg *a)
{
#if BAR_PANGO_PATCH
return drw_text(drw, a->x, 0, a->w, bh, 0, estext, 0, True);
#else
return drw_text(drw, a->x, 0, a->w, bh, 0, estext, 0);
#endif // BAR_PANGO_PATCH
}

View File

@@ -1,2 +0,0 @@
static int width_status_eb(Bar *bar, BarWidthArg *a);
static int draw_status_eb(Bar *bar, BarDrawArg *a);

View File

@@ -10,13 +10,13 @@ click_statuscmd(Bar *bar, Arg *arg, BarClickArg *a)
return click_statuscmd_text(arg, a->rel_x, rawstext);
}
#if BAR_EXTRABAR_PATCH
#if BAR_EXTRASTATUS_PATCH
int
click_statuscmd_eb(Bar *bar, Arg *arg, BarClickArg *a)
click_statuscmd_es(Bar *bar, Arg *arg, BarClickArg *a)
{
return click_statuscmd_text(arg, a->rel_x, rawestext);
}
#endif // BAR_EXTRABAR_PATCH
#endif // BAR_EXTRASTATUS_PATCH
int
click_statuscmd_text(Arg *arg, int rel_x, char *text)

View File

@@ -1,6 +1,6 @@
static int click_statuscmd(Bar *bar, Arg *arg, BarClickArg *a);
#if BAR_EXTRABAR_PATCH
static int click_statuscmd_eb(Bar *bar, Arg *arg, BarClickArg *a);
#endif // BAR_EXTRABAR_PATCH
#if BAR_EXTRASTATUS_PATCH
static int click_statuscmd_es(Bar *bar, Arg *arg, BarClickArg *a);
#endif // BAR_EXTRASTATUS_PATCH
static int click_statuscmd_text(Arg *arg, int rel_x, char *text);
static void copyvalidchars(char *text, char *rawtext);

View File

@@ -22,15 +22,9 @@
#endif
#if BAR_STATUS_PATCH
#include "bar_status.c"
#if BAR_EXTRABAR_PATCH
#include "bar_status_eb.c"
#endif // BAR_EXTRABAR_PATCH
#endif
#if BAR_STATUS2D_PATCH
#include "bar_status2d.c"
#if BAR_EXTRABAR_PATCH
#include "bar_status2d_eb.c"
#endif // BAR_EXTRABAR_PATCH
#endif
#if BAR_STATUSBUTTON_PATCH
#include "bar_statusbutton.c"

View File

@@ -22,15 +22,9 @@
#endif
#if BAR_STATUS_PATCH
#include "bar_status.h"
#if BAR_EXTRABAR_PATCH
#include "bar_status_eb.h"
#endif // BAR_EXTRABAR_PATCH
#endif
#if BAR_STATUS2D_PATCH
#include "bar_status2d.h"
#if BAR_EXTRABAR_PATCH
#include "bar_status2d_eb.h"
#endif // BAR_EXTRABAR_PATCH
#endif
#if BAR_STATUSBUTTON_PATCH
#include "bar_statusbutton.h"