mirror of
https://github.com/Llewellynvdm/conky.git
synced 2024-12-26 04:17:33 +00:00
woops, fixed batt stuff
git-svn-id: https://conky.svn.sourceforge.net/svnroot/conky/trunk/conky1@623 7f574dfc-610e-0410-a909-a81674777703
This commit is contained in:
parent
c9502198c9
commit
3082207800
20
README
20
README
@ -784,6 +784,24 @@ VARIABLES
|
||||
Change outline color
|
||||
|
||||
|
||||
pb_battery item
|
||||
If running on Apple powerbook/ibook, display information on bat-
|
||||
tery status. The item parameter specifies, what information to
|
||||
display. Exactly one item must be specified. Valid items are:
|
||||
|
||||
status: Display if battery is fully charged, charging, discharg-
|
||||
ing or absent (running on AC)
|
||||
|
||||
percent: Display charge of battery in percent, if charging or
|
||||
discharging. Nothing will be displayed, if battery is fully
|
||||
charged or absent.
|
||||
|
||||
time: Display the time remaining until the battery will be fully
|
||||
charged or discharged at current rate. Nothing is displayed, if
|
||||
battery is absent or if it's present but fully charged and not
|
||||
discharging.
|
||||
|
||||
|
||||
pre_exec shell command
|
||||
Executes a shell command one time before conky displays anything
|
||||
and puts output as text.
|
||||
@ -1082,4 +1100,4 @@ AUTHORS
|
||||
|
||||
|
||||
|
||||
2006-04-15 conky(1)
|
||||
2006-04-23 conky(1)
|
||||
|
26
doc/conky.1
26
doc/conky.1
@ -1,5 +1,5 @@
|
||||
.\" -*- coding: us-ascii -*-
|
||||
.TH conky 1 2006-04-15
|
||||
.TH conky 1 2006-04-23
|
||||
.SH NAME
|
||||
conky \- A system monitor for X originally based on the torsmo code, but more kickass. It just keeps on given'er. Yeah.
|
||||
.SH SYNOPSIS
|
||||
@ -708,6 +708,30 @@ Hostname
|
||||
\fBoutlinecolor\fR \fB(color)\fR
|
||||
Change outline color
|
||||
|
||||
.TP
|
||||
\fBpb_battery\fR \fBitem\fR
|
||||
If running on Apple powerbook/ibook, display
|
||||
information on battery status. The item parameter
|
||||
specifies, what information to display. Exactly one item
|
||||
must be specified. Valid items are:
|
||||
|
||||
status:
|
||||
Display if battery is fully charged, charging,
|
||||
discharging or absent (running on AC)
|
||||
|
||||
percent:
|
||||
Display charge of battery in percent, if
|
||||
charging or discharging. Nothing will be
|
||||
displayed, if battery is fully charged
|
||||
or absent.
|
||||
|
||||
time:
|
||||
Display the time remaining until the battery
|
||||
will be fully charged or discharged at current
|
||||
rate. Nothing is displayed, if battery is
|
||||
absent or if it's present but fully charged
|
||||
and not discharging.
|
||||
|
||||
.TP
|
||||
\fBpre_exec\fR \fBshell command\fR
|
||||
Executes a shell command one time before conky displays anything and puts output as text.
|
||||
|
@ -464,7 +464,7 @@ struct ibm_acpi_struct {
|
||||
struct ibm_acpi_struct ibm_acpi;
|
||||
|
||||
enum { PB_BATT_STATUS, PB_BATT_PERCENT, PB_BATT_TIME};
|
||||
void get_powerbook_batt_info(char* buf, size_t size, int i);
|
||||
void get_powerbook_batt_info(char*, size_t, int);
|
||||
|
||||
struct process {
|
||||
struct process *next;
|
||||
|
@ -1264,7 +1264,7 @@ static char pb_battery_info[3][32];
|
||||
static double pb_battery_info_update;
|
||||
|
||||
#define PMU_PATH "/proc/pmu"
|
||||
void get_powerbook_batt_info(char *buf, unsigned int n, int i)
|
||||
void get_powerbook_batt_info(char *buf, size_t n, int i)
|
||||
{
|
||||
static int rep;
|
||||
const char* batt_path = PMU_PATH "/battery_0";
|
||||
|
Loading…
Reference in New Issue
Block a user