mirror of
https://github.com/xzeldon/htop.git
synced 2025-07-14 13:04:35 +03:00
Show CPU temperature in CPU meter
Show the CPU temperature in the CPU meter, like CPU frequency, instead of using an extra Meter.
This commit is contained in:
12
htop.c
12
htop.c
@ -36,6 +36,10 @@ in the source distribution for its full text.
|
||||
#include "XUtils.h"
|
||||
|
||||
|
||||
#ifdef HAVE_LIBSENSORS
|
||||
#include <sensors/sensors.h>
|
||||
#endif
|
||||
|
||||
//#link m
|
||||
|
||||
static void printVersionFlag(void) {
|
||||
@ -317,6 +321,10 @@ int main(int argc, char** argv) {
|
||||
|
||||
CRT_init(settings->delay, settings->colorScheme, flags.allowUnicode);
|
||||
|
||||
#ifdef HAVE_LIBSENSORS
|
||||
sensors_init(NULL);
|
||||
#endif
|
||||
|
||||
MainPanel* panel = MainPanel_new();
|
||||
ProcessList_setPanel(pl, (Panel*) panel);
|
||||
|
||||
@ -357,6 +365,10 @@ int main(int argc, char** argv) {
|
||||
attroff(CRT_colors[RESET_COLOR]);
|
||||
refresh();
|
||||
|
||||
#ifdef HAVE_LIBSENSORS
|
||||
sensors_cleanup();
|
||||
#endif
|
||||
|
||||
CRT_done();
|
||||
if (settings->changed)
|
||||
Settings_write(settings);
|
||||
|
Reference in New Issue
Block a user