docs: segment nightscout template for mmol display

This commit is contained in:
Dynasign 2021-12-02 22:24:00 +01:00 committed by Jan De Dobbeleer
parent e7d83637a8
commit aed4a87fd6

View file

@ -13,10 +13,12 @@ OhMyPosh segments on the command line!
## Sample Configuration ## Sample Configuration
This example is using mg/dl, you'll want change the numbers for mmol. Your idea This example is using mg/dl by default because the Nightscout API sends the sugar
of "high" or "low" is different from others. You'll also want to think about glucose value (.Sgv) in mg/dl format. Below is also a template for displaying the
your background and foreground colors. Don't use white text on a yellow glucose value in mmol/L. When using different color ranges you should multiply your
background, for example. high and low range glucose values by 18 and use these values in the templates.
You'll also want to think about your background and foreground colors. Don't use
white text on a yellow background, for example.
The foreground_templates example below could be set to just a single color, The foreground_templates example below could be set to just a single color,
if that color is visible against any of your backgrounds. if that color is visible against any of your backgrounds.
@ -48,6 +50,12 @@ if that color is visible against any of your backgrounds.
}, },
``` ```
Or display in mmol/l (instead of the default mg/dl) with the following template:
```json
"template": " {{divf (floor (mulf 10 (divf .Sgv 18))) 10}} {{.TrendIcon}}"
```
## Properties ## Properties
- url: `string` - Your Nightscout URL, inclding the full path to entries.json - url: `string` - Your Nightscout URL, inclding the full path to entries.json