mirror of
https://github.com/xzeldon/htop.git
synced 2025-07-16 05:54:34 +03:00
ACPI Battery meter
contributed by Ian Hands
This commit is contained in:
7
Meter.c
7
Meter.c
@ -96,8 +96,10 @@ typedef enum {
|
||||
#include "TasksMeter.h"
|
||||
#include "LoadAverageMeter.h"
|
||||
#include "UptimeMeter.h"
|
||||
#include "BatteryMeter.h"
|
||||
#include "ClockMeter.h"
|
||||
|
||||
|
||||
#ifndef MIN
|
||||
#define MIN(a,b) ((a)<(b)?(a):(b))
|
||||
#endif
|
||||
@ -120,6 +122,7 @@ MeterType* Meter_types[] = {
|
||||
&SwapMeter,
|
||||
&TasksMeter,
|
||||
&UptimeMeter,
|
||||
&BatteryMeter,
|
||||
&AllCPUsMeter,
|
||||
NULL
|
||||
};
|
||||
@ -242,8 +245,8 @@ static void BarMeterMode_draw(Meter* this, int x, int y, int w) {
|
||||
|
||||
w -= 2;
|
||||
attrset(CRT_colors[METER_TEXT]);
|
||||
mvaddstr(y, x, this->caption);
|
||||
int captionLen = strlen(this->caption);
|
||||
int captionLen = 3;
|
||||
mvaddnstr(y, x, this->caption, captionLen);
|
||||
x += captionLen;
|
||||
w -= captionLen;
|
||||
attrset(CRT_colors[BAR_BORDER]);
|
||||
|
Reference in New Issue
Block a user