1
0
mirror of https://github.com/Llewellynvdm/conky.git synced 2024-11-05 21:07:52 +00:00

fixed order of variables and stuff (credit peter tarjan), small battery fix (credit Nexox sf.net patch 1500014)

git-svn-id: https://conky.svn.sourceforge.net/svnroot/conky/trunk/conky1@671 7f574dfc-610e-0410-a909-a81674777703
This commit is contained in:
Brenden Matthews 2006-06-08 04:29:23 +00:00
parent 7698ec7c7f
commit 2c990192cc
6 changed files with 184 additions and 178 deletions

View File

@ -1,5 +1,9 @@
# $Id$
2006-06-07
* Small battery fix (thanks Nexox, sf.net patch 1500014)
* Fixed order of variables/objects in docs (thanks Peter Tarjan)
2006-05-27
* Fixed a bug with $font

60
README
View File

@ -561,16 +561,6 @@ VARIABLES
omitted, the parameter defaults to 1.
voltage_mv (n)
Returns CPU #n's voltage in mV. CPUs are counted from 1. If
omitted, the parameter defaults to 1.
voltage_v (n)
Returns CPU #n's voltage in V. CPUs are counted from 1. If omit-
ted, the parameter defaults to 1.
freq_dyn
Returns CPU frequency in MHz, but is calculated by counting to
clock cycles to complete an instruction. Only available for
@ -696,6 +686,26 @@ VARIABLES
the version formatting of /proc/i8k.
ibm_fan
If running the IBM ACPI, displays the fan speed.
ibm_temps N
If running the IBM ACPI, displays the temperatures from the IBM
temperature sensors (N=0..7) Sensor 0 is on the CPU, 3 is on the
GPU.
ibm_volume
If running the IBM ACPI, displays the "master" volume, con-
trolled by the volume keys (0-14).
ibm_brightness
If running the IBM ACPI, displays the brigtness of the laptops's
LCD (0-7).
if_running (process)
if PROCESS is running, display everything if_running and the
matching $endif
@ -1064,6 +1074,16 @@ VARIABLES
text to overlap. See also $offset.
voltage_mv (n)
Returns CPU #n's voltage in mV. CPUs are counted from 1. If
omitted, the parameter defaults to 1.
voltage_v (n)
Returns CPU #n's voltage in V. CPUs are counted from 1. If omit-
ted, the parameter defaults to 1.
xmms_bar (height),(width)
xmms / bmp / audacious / infopipe: progress bar
@ -1125,26 +1145,6 @@ VARIABLES
xmms / bmp / audacious / infopipe: title of current tune
ibm_fan
If running the IBM ACPI, displays the fan speed.
ibm_temps N
If running the IBM ACPI, displays the temperatures from the IBM
temperature sensors (N=0..7) Sensor 0 is on the CPU, 3 is on the
GPU.
ibm_volume
If running the IBM ACPI, displays the "master" volume, con-
trolled by the volume keys (0-14).
ibm_brightness
If running the IBM ACPI, displays the brigtness of the laptops's
LCD (0-7).
EXAMPLES
conky -t '${time %D %H:%m}' -o -u 30
Start Conky in its own window with date and clock as text and 30

View File

@ -6,9 +6,6 @@ dnl
dnl C Compiler
dnl
if test x$CFLAGS = x; then
AC_SUBST(CFLAGS, [ ])
fi
AC_PROG_CC
AC_PROG_LIBTOOL
PKG_PROG_PKG_CONFIG([0.17.2])

View File

@ -504,7 +504,7 @@ Specify a different font. This new font will apply to the current line and every
\fBfreq\fR \fB(n)\fR
Returns CPU #n's frequency in MHz. CPUs are
counted from 1. If omitted, the parameter
defaults to 1.
defaults to 1.
.TP
\fBfreq_g\fR \fB(n)\fR
@ -512,18 +512,6 @@ Returns CPU #n's frequency in GHz. CPUs are
counted from 1. If omitted, the parameter
defaults to 1.
.TP
\fBvoltage_mv\fR \fB(n)\fR
Returns CPU #n's voltage in mV. CPUs are
counted from 1. If omitted, the parameter
defaults to 1.
.TP
\fBvoltage_v\fR \fB(n)\fR
Returns CPU #n's voltage in V. CPUs are
counted from 1. If omitted, the parameter
defaults to 1.
.TP
\fBfreq_dyn\fR
Returns CPU frequency in MHz, but is calculated by counting to clock cycles to complete an instruction. Only available for x86/amd64.
@ -616,6 +604,26 @@ If running the i8k kernel driver for Inspiron laptops, displays your laptop seri
\fBi8k_version\fR \fB\fR
If running the i8k kernel driver for Inspiron laptops, displays the version formatting of /proc/i8k.
.TP
\fBibm_fan\fR
If running the IBM ACPI, displays the fan speed.
.TP
\fBibm_temps\fR \fBN\fR
If running the IBM ACPI, displays the temperatures
from the IBM temperature sensors (N=0..7) Sensor 0 is
on the CPU, 3 is on the GPU.
.TP
\fBibm_volume\fR
If running the IBM ACPI, displays the "master" volume,
controlled by the volume keys (0-14).
.TP
\fBibm_brightness\fR
If running the IBM ACPI, displays the brigtness of the
laptops's LCD (0-7).
.TP
\fBif_running\fR \fB(process)\fR
if PROCESS is running, display everything if_running and the matching $endif
@ -937,6 +945,18 @@ Seti@home total user credit
\fBvoffset\fR \fB(pixels)\fR
Change vertical offset by N pixels. Negative values will cause text to overlap. See also $offset.
.TP
\fBvoltage_mv\fR \fB(n)\fR
Returns CPU #n's voltage in mV. CPUs are
counted from 1. If omitted, the parameter
defaults to 1.
.TP
\fBvoltage_v\fR \fB(n)\fR
Returns CPU #n's voltage in V. CPUs are
counted from 1. If omitted, the parameter
defaults to 1.
.TP
\fBxmms_bar\fR \fB(height),(width)\fR
xmms / bmp / audacious / infopipe: progress bar
@ -989,26 +1009,6 @@ xmms / bmp / audacious / infopipe: player status (Playing/Paused/Stopped/Not run
\fBxmms_title\fR
xmms / bmp / audacious / infopipe: title of current tune
.TP
\fBibm_fan\fR
If running the IBM ACPI, displays the fan speed.
.TP
\fBibm_temps\fR \fBN\fR
If running the IBM ACPI, displays the temperatures
from the IBM temperature sensors (N=0..7) Sensor 0 is
on the CPU, 3 is on the GPU.
.TP
\fBibm_volume\fR
If running the IBM ACPI, displays the "master" volume,
controlled by the volume keys (0-14).
.TP
\fBibm_brightness\fR
If running the IBM ACPI, displays the brigtness of the
laptops's LCD (0-7).
.SH EXAMPLES
.TP
conky \fB\-t '${time %D %H:%m}' \-o \-u 30\fR

View File

@ -361,71 +361,48 @@
<para></para></listitem>
</varlistentry>
<varlistentry>
<term>
<command><option>freq</option></command>
<option>(n)</option>
</term>
<listitem>
Returns CPU #n's frequency in MHz. CPUs are
counted from 1. If omitted, the parameter
defaults to 1.
<para></para></listitem>
</varlistentry>
<varlistentry>
<term>
<command><option>freq_g</option></command>
<option>(n)</option>
</term>
<listitem>
Returns CPU #n's frequency in GHz. CPUs are
counted from 1. If omitted, the parameter
defaults to 1.
<para></para></listitem>
</varlistentry>
<varlistentry>
<term>
<command><option>freq</option></command>
<option>(n)</option>
</term>
<listitem>
Returns CPU #n's frequency in MHz. CPUs are
counted from 1. If omitted, the parameter
defaults to 1.
<para></para></listitem>
</varlistentry>
<varlistentry>
<term>
<command><option>freq_g</option></command>
<option>(n)</option>
</term>
<listitem>
Returns CPU #n's frequency in GHz. CPUs are
counted from 1. If omitted, the parameter
defaults to 1.
<para></para></listitem>
</varlistentry>
<varlistentry>
<term>
<command><option>voltage_mv</option></command>
<option>(n)</option>
</term>
<listitem>
Returns CPU #n's voltage in mV. CPUs are
counted from 1. If omitted, the parameter
defaults to 1.
<para></para></listitem>
</varlistentry>
<varlistentry>
<term>
<command><option>voltage_v</option></command>
<option>(n)</option>
</term>
<listitem>
Returns CPU #n's voltage in V. CPUs are
counted from 1. If omitted, the parameter
defaults to 1.
<para></para></listitem>
</varlistentry>
<varlistentry>
<term>
<command><option>freq_dyn</option></command>
</term>
<listitem>
<varlistentry>
<term>
<command><option>freq_dyn</option></command>
</term>
<listitem>
Returns CPU frequency in MHz, but is calculated by counting to clock cycles to complete an instruction. Only available for x86/amd64.
<para></para></listitem>
</varlistentry>
<varlistentry>
<term>
<command><option>freq_dyn_g</option></command>
</term>
<listitem>
Returns CPU frequency in GHz, but is calculated by counting to clock cycles to complete an instruction. Only available for x86/amd64.
<para></para></listitem>
</varlistentry>
</varlistentry>
<varlistentry>
<term>
<command><option>freq_dyn_g</option></command>
</term>
<listitem>
Returns CPU frequency in GHz, but is calculated by counting to clock cycles to complete an instruction. Only available for x86/amd64.
<para></para></listitem>
</varlistentry>
<varlistentry>
<varlistentry>
<term>
<command><option>fs_bar</option></command>
<option>(height),(width) fs</option>
@ -635,6 +612,47 @@
<para></para></listitem>
</varlistentry>
<varlistentry>
<term>
<command><option>ibm_fan</option></command>
</term>
<listitem>
If running the IBM ACPI, displays the fan speed.
<para></para></listitem>
</varlistentry>
<varlistentry>
<term>
<command><option>ibm_temps</option></command>
<option>N</option>
</term>
<listitem>
If running the IBM ACPI, displays the temperatures
from the IBM temperature sensors (N=0..7) Sensor 0 is
on the CPU, 3 is on the GPU.
<para></para></listitem>
</varlistentry>
<varlistentry>
<term>
<command><option>ibm_volume</option></command>
</term>
<listitem>
If running the IBM ACPI, displays the "master" volume,
controlled by the volume keys (0-14).
<para></para></listitem>
</varlistentry>
<varlistentry>
<term>
<command><option>ibm_brightness</option></command>
</term>
<listitem>
If running the IBM ACPI, displays the brigtness of the
laptops's LCD (0-7).
<para></para></listitem>
</varlistentry>
<varlistentry>
<term>
@ -1301,6 +1319,7 @@
Seti@home total user credit
<para></para></listitem>
</varlistentry>
<varlistentry>
<term>
<command><option>voffset</option></command>
@ -1311,6 +1330,30 @@
<para></para></listitem>
</varlistentry>
<varlistentry>
<term>
<command><option>voltage_mv</option></command>
<option>(n)</option>
</term>
<listitem>
Returns CPU #n's voltage in mV. CPUs are
counted from 1. If omitted, the parameter
defaults to 1.
<para></para></listitem>
</varlistentry>
<varlistentry>
<term>
<command><option>voltage_v</option></command>
<option>(n)</option>
</term>
<listitem>
Returns CPU #n's voltage in V. CPUs are
counted from 1. If omitted, the parameter
defaults to 1.
<para></para></listitem>
</varlistentry>
<varlistentry>
<term>
<command><option>xmms_bar</option></command>
@ -1429,45 +1472,4 @@
<para></para></listitem>
</varlistentry>
<varlistentry>
<term>
<command><option>ibm_fan</option></command>
</term>
<listitem>
If running the IBM ACPI, displays the fan speed.
<para></para></listitem>
</varlistentry>
<varlistentry>
<term>
<command><option>ibm_temps</option></command>
<option>N</option>
</term>
<listitem>
If running the IBM ACPI, displays the temperatures
from the IBM temperature sensors (N=0..7) Sensor 0 is
on the CPU, 3 is on the GPU.
<para></para></listitem>
</varlistentry>
<varlistentry>
<term>
<command><option>ibm_volume</option></command>
</term>
<listitem>
If running the IBM ACPI, displays the "master" volume,
controlled by the volume keys (0-14).
<para></para></listitem>
</varlistentry>
<varlistentry>
<term>
<command><option>ibm_brightness</option></command>
</term>
<listitem>
If running the IBM ACPI, displays the brigtness of the
laptops's LCD (0-7).
<para></para></listitem>
</varlistentry>
</variablelist>

View File

@ -1264,7 +1264,7 @@ void get_battery_stuff(char *buf, unsigned int n, const char *bat)
/* charging */
if (strcmp(charging_state, "charging") == 0) {
if (acpi_last_full != 0 && present_rate > 0) {
strcpy(last_battery_str, "charging ");
strncpy(last_battery_str, "charging ", 64);
format_seconds(last_battery_str + 9,
63 - 9,
(acpi_last_full -
@ -1272,39 +1272,42 @@ void get_battery_stuff(char *buf, unsigned int n, const char *bat)
60 / present_rate);
} else if (acpi_last_full != 0
&& present_rate <= 0) {
sprintf(last_battery_str, "charging %d%%",
snprintf(last_battery_str, 64, "charging %d%%",
remaining_capacity * 100 /
acpi_last_full);
} else {
strcpy(last_battery_str, "charging");
strncpy(last_battery_str, "charging", 63);
}
}
/* discharging */
else if (strcmp(charging_state, "discharging") == 0) {
if (present_rate > 0)
else if (strncmp(charging_state, "discharging", 64) == 0) {
if (present_rate > 0) {
format_seconds(last_battery_str, 63,
(remaining_capacity * 60 *
60) / present_rate);
else
sprintf(last_battery_str,
} else if (present_rate == 0) { /* Thanks to Nexox for this one */
snprintf(last_battery_str, 64, "full");
} else {
snprintf(last_battery_str, 64,
"discharging %d%%",
remaining_capacity * 100 /
acpi_last_full);
}
}
/* charged */
/* thanks to Lukas Zapletal <lzap@seznam.cz> */
else if (strcmp(charging_state, "charged") == 0) {
else if (strncmp(charging_state, "charged", 64) == 0) {
strcpy(last_battery_str, "charged");
}
/* unknown, probably full / AC */
else {
if (acpi_last_full != 0
&& remaining_capacity != acpi_last_full)
sprintf(last_battery_str, "unknown %d%%",
snprintf(last_battery_str, 64, "unknown %d%%",
remaining_capacity * 100 /
acpi_last_full);
else
strcpy(last_battery_str, "AC");
strncpy(last_battery_str, "AC", 64);
}
} else {
/* APM */