DWM Status Bar
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 

15 lines
259 B

/*
* gettemperature("/sys/class/hwmon/hwmon0/device", "temp1_input");
*/
char *
gettemperature(char *base, char *sensor)
{
char *co;
co = readfile(base, sensor);
if (co == NULL)
return smprintf("");
return smprintf("%02.0f°C", atof(co) / 1000);
}