Brief introduction to csensors

Csensors is (currently Linux only) package for visualization of hardware sensors.

Components

Requirements for source code build

Getting source code

cd  ~/mysrc/
git clone https://git.code.sf.net/p/csensors/code csensors
# code cloned to csensors sub-directory

See [*] for optional releases

Configuring and compiling

Csensors can be compiled in the source directory but this option is deprecated. The preferred way is build it in a separate build directory. For example, if you have unpacked/checkout/cloned csensors directory tree to /usr/src/csensors, create a directory /usr/src/csensors-build to put the object files in. This allows removing the whole build directory in case an error occurs, which is the safest way to get a fresh start and should always be done.

cd ~/mysrc/csensors
mkdir Build
cd Build

Configuring and building

From your object directory, run cmake -DOPTIONAL_DEFINES ../PATH-TO-UNPACKED-SOURCES :

Configuring and building with make

cd ~/mysrc/csensors/Build
cmake -DCMAKE_INSTALL_PREFIX=/usr -DCSENSORS_SYSTEM_CONFIG_DIR=/etc ..
make

Configuring and building with ninja

If you have ninja installed, you can save lot of milliseconds by running :

cd ~/mysrc/csensors/Build
cmake -GNinja -DCMAKE_INSTALL_PREFIX=/usr -DCSENSORS_SYSTEM_CONFIG_DIR=/etc ..
ninja

Development targets

  • small applet
  • ability to display basic battery and CPU information
  • easy integration to fvwm button bar (in my case), gnome panel, KDE panel, xfce panel or whatever else.

[*]<https://sourceforge.net/p/csensors/>
https:sourceforge.net/p/csensors/