From 708bd9c891cd58a840236b3d77340fa25f197281 Mon Sep 17 00:00:00 2001 From: Quantenzitrone <74491719+Quantenzitrone@users.noreply.github.com> Date: Sun, 21 Aug 2022 19:10:48 +0200 Subject: [PATCH] feat(temperature): %temperature-k% token for Kelvin (#2784) * added kelvin option for module/temperature * changelog for the changes i made * fixed typos * fixed the temperature conversion to be more precise * Update CHANGELOG.md Co-authored-by: Patrick Ziegler * changed the calculation of the different temperatures it now uses float as a initial value and makes m_temp temp_k and temp_f by converting and rounding with std::round * std::lround makes more sense to use than std::round Co-authored-by: Patrick Ziegler --- CHANGELOG.md | 1 + src/modules/temperature.cpp | 9 +++++++-- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index cfd265b0..62557462 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -19,6 +19,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - `custom/text`: The `content` setting and all its properties are deprecated in favor of `format` with the same functionality. ([`#2676`](https://github.com/polybar/polybar/pull/2676)) ### Added +- `internal/temperature`: `%temperature-k%` token displays the temperature in kelvin ([`#2774`](https://github.com/polybar/polybar/discussions/2774), [`#2784`](https://github.com/polybar/polybar/pull/2784)) - `internal/pulseaudio`: `reverse-scroll` option ([`#2664`](https://github.com/polybar/polybar/pull/2664)) - `custom/script`: Repeat interval for script failure (`interval-fail`) and `exec-if` (`interval-if`) ([`#943`](https://github.com/polybar/polybar/issues/943), [`#2606`](https://github.com/polybar/polybar/issues/2606), [`#2630`](https://github.com/polybar/polybar/pull/2630)) - `custom/text`: Loads the `format` setting, which supports the `