mirror of
https://github.com/JanDeDobbeleer/oh-my-posh.git
synced 2024-12-28 04:19:41 -08:00
docs: segment nightscout template for mmol display
This commit is contained in:
parent
e7d83637a8
commit
aed4a87fd6
|
@ -13,10 +13,12 @@ OhMyPosh segments on the command line!
|
|||
|
||||
## Sample Configuration
|
||||
|
||||
This example is using mg/dl, you'll want change the numbers for mmol. Your idea
|
||||
of "high" or "low" is different from others. You'll also want to think about
|
||||
your background and foreground colors. Don't use white text on a yellow
|
||||
background, for example.
|
||||
This example is using mg/dl by default because the Nightscout API sends the sugar
|
||||
glucose value (.Sgv) in mg/dl format. Below is also a template for displaying the
|
||||
glucose value in mmol/L. When using different color ranges you should multiply your
|
||||
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,
|
||||
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
|
||||
|
||||
- url: `string` - Your Nightscout URL, inclding the full path to entries.json
|
||||
|
|
Loading…
Reference in a new issue