1
0
mirror of https://github.com/Llewellynvdm/conky.git synced 2024-11-17 10:35:10 +00:00

acpitempf

git-svn-id: https://conky.svn.sourceforge.net/svnroot/conky/trunk/conky@124 7f574dfc-610e-0410-a909-a81674777703
This commit is contained in:
Brenden Matthews 2005-08-21 06:36:13 +00:00
parent a7c42c003c
commit 80c592785c
4 changed files with 36 additions and 145 deletions

View File

@ -5,6 +5,7 @@
* Fixed ugly gradient bug. closes bug 1255608
* Added $voffset
* Removed metar code. It sucked.
* Added $acpitempf for amooricans
2005-08-12
* Multiple unit additions and modifications

19
conky.c
View File

@ -663,6 +663,7 @@ enum text_object_type {
OBJ_addr,
OBJ_linkstatus,
OBJ_acpitemp,
OBJ_acpitempf,
OBJ_battery,
OBJ_buffers,
OBJ_cached,
@ -860,7 +861,9 @@ static void free_text_objects()
case OBJ_acpitemp:
close(text_objects[i].data.i);
break;
case OBJ_acpitempf:
close(text_objects[i].data.i);
break;
case OBJ_i2c:
close(text_objects[i].data.i2c.fd);
break;
@ -928,6 +931,7 @@ if (s[0] == '#') {
} else
#endif /* X11 */
OBJ(acpitemp, 0) obj->data.i = open_acpi_temperature(arg);
END OBJ(acpitempf, 0) obj->data.i = open_acpi_temperature(arg);
END OBJ(acpiacadapter, 0)
END OBJ(freq, 0);
END OBJ(freq_g, 0);
@ -1540,6 +1544,19 @@ static void generate_text()
data.
i));
}
OBJ(acpitempf) {
/* does anyone have decimals in acpi temperature? */
if (!use_spacer)
snprintf(p, n, "%d", (int)
((get_acpi_temperature(obj->
data.
i)+ 40) * 9.0 / 5 - 40));
else
snprintf(p, 5, "%d ", (int)
((get_acpi_temperature(obj->
data.
i)+ 40) * 9.0 / 5 - 40));
}
OBJ(freq) {
snprintf(p, n, "%sMhz", get_freq());
}

View File

@ -125,27 +125,6 @@
<para></para></listitem>
</varlistentry>
<varlistentry>
<term><command><option>metar_station</option></command></term>
<listitem>
METAR station code for weather, see http://www.wrh.noaa.gov/ if you need to find your code.
<para></para></listitem>
</varlistentry>
<varlistentry>
<term><command><option>metar_server</option></command></term>
<listitem>
Define a custom METAR ftp server
<para></para></listitem>
</varlistentry>
<varlistentry>
<term><command><option>metar_path</option></command></term>
<listitem>
Path on server to use
<para></para></listitem>
</varlistentry>
<varlistentry>
<term><command><option>minimum_size</option></command></term>
<listitem>

View File

@ -32,7 +32,16 @@
<command><option>acpitemp</option></command>
</term>
<listitem>
ACPI temperature.
ACPI temperature in C.
<para></para></listitem>
</varlistentry>
<varlistentry>
<term>
<command><option>acpitempf</option></command>
</term>
<listitem>
ACPI temperature in F.
<para></para></listitem>
</varlistentry>
@ -431,121 +440,6 @@
<para></para></listitem>
</varlistentry>
<varlistentry>
<term>
<command><option>metar_ob_time</option></command>
</term>
<listitem>
self-explanatory
<para></para></listitem>
</varlistentry>
<varlistentry>
<term>
<command><option>metar_temp</option></command>
</term>
<listitem>
self-explanatory
<para></para></listitem>
</varlistentry>
<varlistentry>
<term>
<command><option>metar_tempf</option></command>
</term>
<listitem>
temp in F
<para></para></listitem>
</varlistentry>
<varlistentry>
<term>
<command><option>metar_windchill</option></command>
</term>
<listitem>
self-explanatory
<para></para></listitem>
</varlistentry>
<varlistentry>
<term>
<command><option>metar_dew_poin</option></command>
</term>
<listitem>
self-explanatory
<para></para></listitem>
</varlistentry>
<varlistentry>
<term>
<command><option>metar_rh</option></command>
</term>
<listitem>
self-explanatory
<para></para></listitem>
</varlistentry>
<varlistentry>
<term>
<command><option>metar_windspeed</option></command>
</term>
<listitem>
Windspeed in knots
<para></para></listitem>
</varlistentry>
<varlistentry>
<term>
<command><option>metar_windspeed_km</option></command>
</term>
<listitem>
Windspeed in kph
<para></para></listitem>
</varlistentry>
<varlistentry>
<term>
<command><option>metar_windspeed_mph</option></command>
</term>
<listitem>
Windspeed in mph
<para></para></listitem>
</varlistentry>
<varlistentry>
<term>
<command><option>metar_winddir</option></command>
</term>
<listitem>
self-explanatory
<para></para></listitem>
</varlistentry>
<varlistentry>
<term>
<command><option>metar_swinddir</option></command>
</term>
<listitem>
self-explanatory
<para></para></listitem>
</varlistentry>
<varlistentry>
<term>
<command><option>metar_cloud</option></command>
</term>
<listitem>
self-explanatory
<para></para></listitem>
</varlistentry>
<varlistentry>
<term>
<command><option>metar_u2d_time</option></command>
</term>
<listitem>
self-explanatory
<para></para></listitem>
</varlistentry>
<varlistentry>
<term>
<command><option>ml_upload_counter</option></command>