xbattmon

simple battery monitor for X
git clone git://git.2f30.org/xbattmon
Log | Files | Refs | README | LICENSE

commit 3f2d6c6dcdcf821f51478c0df9146c9f7e89434d
parent 90ac8e04bfb989e7ec8a5007b6be80070cc6bedc
Author: sin <sin@2f30.org>
Date:   Sat,  1 Nov 2014 15:38:09 +0000

Rename BATT to BAT

Diffstat:
Mconfig.def.h | 8++++----
Mxbattmon.c | 16++++++++--------
2 files changed, 12 insertions(+), 12 deletions(-)

diff --git a/config.def.h b/config.def.h @@ -1,8 +1,8 @@ char *colors[] = { - [COLOR_BATT_CHARGED] = "green", - [COLOR_BATT_LEFT2CHARGE] = "grey", - [COLOR_BATT_DRAINED] = "red", - [COLOR_BATT_LEFT2DRAIN] = "blue" + [COLOR_BAT_CHARGED] = "green", + [COLOR_BAT_LEFT2CHARGE] = "grey", + [COLOR_BAT_DRAINED] = "red", + [COLOR_BAT_LEFT2DRAIN] = "blue" }; unsigned int thickness = 2; /* 2 pixels by default */ diff --git a/xbattmon.c b/xbattmon.c @@ -23,10 +23,10 @@ enum { }; enum { - COLOR_BATT_CHARGED, - COLOR_BATT_LEFT2CHARGE, - COLOR_BATT_DRAINED, - COLOR_BATT_LEFT2DRAIN + COLOR_BAT_CHARGED, + COLOR_BAT_LEFT2CHARGE, + COLOR_BAT_DRAINED, + COLOR_BAT_LEFT2DRAIN }; char *argv0; @@ -106,15 +106,15 @@ redraw(void) pos = barwidth * howmuch / maxcap; switch (state) { case AC_ON: - XSetForeground(dpy, gcbar, cmap[COLOR_BATT_CHARGED]); + XSetForeground(dpy, gcbar, cmap[COLOR_BAT_CHARGED]); XFillRectangle(dpy, winbar, gcbar, 0, 0, pos, thickness); - XSetForeground(dpy, gcbar, cmap[COLOR_BATT_LEFT2CHARGE]); + XSetForeground(dpy, gcbar, cmap[COLOR_BAT_LEFT2CHARGE]); XFillRectangle(dpy, winbar, gcbar, pos, 0, barwidth, thickness); break; case AC_OFF: - XSetForeground(dpy, gcbar, cmap[COLOR_BATT_LEFT2DRAIN]); + XSetForeground(dpy, gcbar, cmap[COLOR_BAT_LEFT2DRAIN]); XFillRectangle(dpy, winbar, gcbar, 0, 0, pos, thickness); - XSetForeground(dpy, gcbar, cmap[COLOR_BATT_DRAINED]); + XSetForeground(dpy, gcbar, cmap[COLOR_BAT_DRAINED]); XFillRectangle(dpy, winbar, gcbar, pos, 0, barwidth, thickness); break; }