diff --git a/README b/README deleted file mode 100644 index 2d6833e..0000000 --- a/README +++ /dev/null @@ -1,4 +0,0 @@ -This is dead simple Window Wmaker app for monitoring CPU and GPU temperature. -Hardcoded Core2 and Nvidia GPU support. Based on WMTempMon dockapp. - -Depends on lmsensors and optionally on nvidia-settings packages. diff --git a/README.rst b/README.rst new file mode 100644 index 0000000..786a347 --- /dev/null +++ b/README.rst @@ -0,0 +1,69 @@ +wmtemp +====== + +This is dead simple Window Maker app for monitoring CPU and GPU temperature. +Based on WMTempMon dockapp, although it was heavily reworked. + +.. image:: /images/wmtemp.gif?raw=true + :alt: wmtemp transitions + +Compile +------- + +To build the dockapp, perform the commands: + +.. code:: shell-session + + $ cd wmtemp + $ make + $ sudo make install + +Binary will be installed in ``/usr/local/bin`` directory. + +Configuration +------------- + +To use the dockapp, you'll need to prepare configuration file, otherwise you'll +see 0 values for every core/gpu. + +Wmtemp will look for configuration file in home directory. Here is sample +content of such file: + +.. code:: shell-session + + $ cat ~/.wmtemp + # wmtemp conf file + + cpu1_path = /sys/devices/platform/coretemp.0/hwmon/hwmon2/temp2_input + cpu1_critical = 80 + cpu1_warning = 65 + cpu2_path = /sys/devices/platform/coretemp.0/hwmon/hwmon2/temp3_input + cpu2_critical = 80 + cpu2_warning = 65 + cpu3_path = /sys/devices/platform/coretemp.0/hwmon/hwmon2/temp4_input + cpu3_critical = 80 + cpu3_warning = 65 + cpu4_path = /sys/devices/platform/coretemp.0/hwmon/hwmon2/temp5_input + cpu4_critical = 80 + cpu4_warning = 65 + gpu_path = /sys/devices/virtual/hwmon/hwmon1/temp4_input + gpu_critical = 70 + gpu_warning = 60 + + +Every core have three options to change: + +* ``[core]_path`` - path to temperature file to read from. The content of such + file contains a number of temperature in mili-Celsius. +* ``[core]_critical`` - temperature in °C, on which (and beyond) red color would + be used for highlight the entry. +* ``[core]_warninf`` - temperature in °C, on which (and beyond) orange color + would be used for highlight the entry. + +In main directory there is a ``wmtemp_sample`` file, which can be copied to +``~/.wmtemp`` and tweaked according to the needs and hardware. + +Licence +------- + +This software is licensed under GPL2 license. See COPYING file for details. diff --git a/images/wmtemp.gif b/images/wmtemp.gif new file mode 100644 index 0000000..15df7da Binary files /dev/null and b/images/wmtemp.gif differ diff --git a/wmtempnv/Makefile b/wmtemp/Makefile similarity index 81% rename from wmtempnv/Makefile rename to wmtemp/Makefile index 1eff21e..c4e9994 100644 --- a/wmtempnv/Makefile +++ b/wmtemp/Makefile @@ -1,9 +1,9 @@ # By RedSeb 1999, Liverbugg 2002 -SRC = wmtempnv.c ../wmgeneral/wmgeneral.c ../wmgeneral/misc.c ../wmgeneral/list.c +SRC = wmtemp.c ../wmgeneral/wmgeneral.c ../wmgeneral/misc.c ../wmgeneral/list.c -EXE = wmtempnv +EXE = wmtemp OBJ = $(SRC:.c=.o) diff --git a/wmtempnv/standards.h b/wmtemp/standards.h similarity index 100% rename from wmtempnv/standards.h rename to wmtemp/standards.h diff --git a/wmtempnv/wmtempnv.c b/wmtemp/wmtemp.c similarity index 97% rename from wmtempnv/wmtempnv.c rename to wmtemp/wmtemp.c index c154731..4e23a80 100644 --- a/wmtempnv/wmtempnv.c +++ b/wmtemp/wmtemp.c @@ -1,11 +1,11 @@ /* - * wmtempnv: a temperature monitor for WindowMaker. This little app is mainly + * wmtemp: a temperature monitor for WindowMaker. This little app is mainly * based on wmsensormon and other simple dockapps, although it doesn't use * lmsensors, just provided information from kernel via /sys filesystem. * * version = 0.5 * - * licence: gpl + * licence: GPL2 */ #include @@ -26,8 +26,8 @@ #include "../wmgeneral/wmgeneral.h" #include "../wmgeneral/misc.h" #include "../wmgeneral/misc.h" -#include "wmtempnv_master.xpm" -#include "wmtempnv_mask.xbm" +#include "wmtemp_master.xpm" +#include "wmtemp_mask.xbm" #define MAXLEN 200 #define MAXFNAME 70 @@ -111,8 +111,8 @@ int main(int argc, char **argv){ } } - openXwindow(argc, argv, wmtempnv_master, wmtempnv_mask_bits, - wmtempnv_mask_width, wmtempnv_mask_height); + openXwindow(argc, argv, wmtemp_master, wmtemp_mask_bits, + wmtemp_mask_width, wmtemp_mask_height); while(TRUE){ if (counter < 1){ diff --git a/wmtempnv/wmtempnv_mask.xbm b/wmtemp/wmtemp_mask.xbm similarity index 96% rename from wmtempnv/wmtempnv_mask.xbm rename to wmtemp/wmtemp_mask.xbm index 52e6b16..8e869c7 100644 --- a/wmtempnv/wmtempnv_mask.xbm +++ b/wmtemp/wmtemp_mask.xbm @@ -1,6 +1,6 @@ -#define wmtempnv_mask_width 64 -#define wmtempnv_mask_height 64 -static char wmtempnv_mask_bits[] = { +#define wmtemp_mask_width 64 +#define wmtemp_mask_height 64 +static char wmtemp_mask_bits[] = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, diff --git a/wmtempnv/wmtempnv_master.xpm b/wmtemp/wmtemp_master.xpm similarity index 99% rename from wmtempnv/wmtempnv_master.xpm rename to wmtemp/wmtemp_master.xpm index 78c8e33..0622a0e 100644 --- a/wmtempnv/wmtempnv_master.xpm +++ b/wmtemp/wmtemp_master.xpm @@ -1,5 +1,5 @@ /* XPM */ -static char *wmtempnv_master[] = { +static char *wmtemp_master[] = { /* columns rows colors chars-per-pixel */ "93 122 256 2 ", " c black", diff --git a/wmtemp_sample b/wmtemp_sample new file mode 100644 index 0000000..eb9e6f8 --- /dev/null +++ b/wmtemp_sample @@ -0,0 +1,17 @@ +# wmtemp conf file + +cpu1_path = /sys/devices/platform/coretemp.0/hwmon/hwmon2/temp2_input +cpu1_critical = 80 +cpu1_warning = 65 +cpu2_path = /sys/devices/platform/coretemp.0/hwmon/hwmon2/temp3_input +cpu2_critical = 80 +cpu2_warning = 65 +cpu3_path = /sys/devices/platform/coretemp.0/hwmon/hwmon2/temp4_input +cpu3_critical = 80 +cpu3_warning = 65 +cpu4_path = /sys/devices/platform/coretemp.0/hwmon/hwmon2/temp5_input +cpu4_critical = 80 +cpu4_warning = 65 +gpu_path = /sys/devices/virtual/hwmon/hwmon1/temp4_input +gpu_critical = 70 +gpu_warning = 60