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.
- 2006-04-15 conky(1)
+ 2006-04-23 conky(1)
.\" -*- 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
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.
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;
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";