From 1b225cd7a0af03a6349c48326118a287fc36acd0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christian=20G=C3=B6ttsche?= Date: Thu, 10 Sep 2020 19:56:33 +0200 Subject: Show CPU temperature in CPU meter Show the CPU temperature in the CPU meter, like CPU frequency, instead of using an extra Meter. --- htop.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'htop.c') diff --git a/htop.c b/htop.c index b36bd4b0..c6cd5411 100644 --- a/htop.c +++ b/htop.c @@ -36,6 +36,10 @@ in the source distribution for its full text. #include "XUtils.h" +#ifdef HAVE_LIBSENSORS +#include +#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); -- cgit v1.2.3