woops, fixed batt stuff
authorBrenden Matthews <brenden1@rty.ca>
Sun, 23 Apr 2006 21:37:59 +0000 (21:37 +0000)
committerBrenden Matthews <brenden1@rty.ca>
Sun, 23 Apr 2006 21:37:59 +0000 (21:37 +0000)
git-svn-id: https://conky.svn.sourceforge.net/svnroot/conky/trunk/conky1@623 7f574dfc-610e-0410-a909-a81674777703

README
doc/conky.1
src/conky.h
src/linux.c

diff --git a/README b/README
index a955a22..d08837e 100644 (file)
--- a/README
+++ b/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)
index db14570..af07b5a 100644 (file)
@@ -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
@@ -709,6 +709,30 @@ Hostname
 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.
 
index 90f72eb..8e3dee4 100644 (file)
@@ -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;
index 7ab0372..240cae5 100644 (file)
@@ -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";