all repos — slstatus @ 3fc2872d1b3e62903a4af49326d42c97c11911d5

my build of slstatus (tools.suckless.org/slstatus/)

Fix temperature reporting on OpenBSD

On OpenBSD although the formula is correct due to integer division a
temperature of for example 54 celsius appears as 5. this patch first
treats it as a floating point op before retaining the non decimal digits
dsp dsp@2f30.org
Thu, 31 Oct 2019 22:50:32 -0600
commit

3fc2872d1b3e62903a4af49326d42c97c11911d5

parent

3ac985eb0338773cfb1d1446fc0751f1f2afea94

1 files changed, 1 insertions(+), 1 deletions(-)

jump to
M components/temperature.ccomponents/temperature.c

@@ -45,7 +45,7 @@ return NULL;

} /* kelvin to celsius */ - return bprintf("%d", (temp.value - 273150000) / 1E6); + return bprintf("%d", (int)((float)(temp.value-273150000) / 1E6)); } #elif defined(__FreeBSD__) #include <stdio.h>