A Nightscout Section for OhMyPosh reveals my realtime Blood sugar level readings in my Git Prompt

.
.

I have actually spoken about(* )how I enjoy a good lovely timely in my Windows Terminal and made videos displaying in information how to do it I have actually likewise dealt with my pal TooTallNate to put my real-time blood sugar level into a celebration or PowerShell trigger, however this was back in 2017. Now that I’m “Group

OhMyPosh” I have actually been indicating to compose a Nightscout “sector” for my timely. Nightscout is an open source self-hosted (there are business hosts likewise like T1Pal) site and API for remote display screen of real-time and near-real-time glucose readings for Diabetics like myself. Considering that my body has an active REST API where I can simply do an HTTP GET (through curl or whatever) and see my blood sugar level, it plainly belongs in a location of honor, similar to my existing Git Branch!

Oh My Chic assistances configurable “sectors”

My blood sugar in my Prompt!

and now there’s a beta (still requires mmol and stagnant readings support) Nightscout sector that you can setup in simply a couple of minutes! This timely operate in ANY shell on ANY os! You can do this in zsh, PowerShell, Celebration, whatever makes you pleased.

Here is a YouTube of Jan from OhMyPosh and I coding the sector reside in Go.

If you have an existing OhMyPosh json config, you can simply include another sector like this. Make certain your Nightscout URL consists of a safe Token or is public (as much as you). Keep in mind likewise that I setup "if/then" guidelines in my background_templates. These are optional and as much as you to alter to your taste. I set my background colors to red, yellow, green depending upon sugar numbers. I likewise have a foreground design template that is not actually utilized, as you can see it constantly examines to black # 000, however it reveals you how you might set it to white text on a darker background if you desired.

{

" type": "nightscout",
" design": "diamond",
" foreground": "#ffffff",
" background": "#ff 0000",
" background_templates":
,[
"{{ if gt .Sgv 150 }}#FFFF00{{ end }}",
"{{ if lt .Sgv 60 }}#FF0000{{ end }}",
"#00FF00"
]" foreground_templates":
,[
"{{ if gt .Sgv 150 }}#000000{{ end }}",
"{{ if lt .Sgv 60 }}#000000{{ end }}",
"#000000"
]" leading_diamond": "",

" trailing_diamond": "uE0B0",
" residential or commercial properties": {
" url": "https://YOURNIGHTSCOUTAPP.herokuapp.com/api/v1/entries.json?count=1&token=APITOKENFROMYOURADMIN",
" http_timeout": 1500,
" design template": "{{. Sgv}} {{. TrendIcon}} "
}
},.
By default we will just head out and strike your Nightscout circumstances every 5 minutes, just when the timely is repainted, and we'll just wait 1500ms prior to quiting. You can set that "http_timeout" (the length of time prior to we quit) if you feel this slows you down. It'll be cached for 5 minutes so it's not likely to b something you'll see. The advantage of this brand-new OhMyPosh sector over the previous option is that it needs no extra services/chron tasks and can be setup very rapidly. Keep in mind likewise that you can personalize your design template with

NerdFonts I have actually consisted of a small syringe! Next I’ll intend to enhance the sector with mmol assistance in addition to strikeout design for “stagnant” (over 15 minutes old) results. You’re likewise welcome to assist by enjoying

What a lovely prompt with Blood Sugar!

our YouTube and sending a PR!
Sponsor:


Make login Auth0’s issue. Not yours. Supply the hassle-free login functions your clients desire, like social login, multi-factor authentication, single sign-on, passwordless, and more. Get going totally free. .
.
. .

About Scott

Scott Hanselman is a previous teacher, previous Chief Designer in financing, now speaker, expert, daddy, diabetic, and Microsoft worker. He is an unsuccessful comic, a cornrower, and a book author.

About

facebook
twitter
subscribe
Newsletter Hosting By

.
.
.
.
.
. . .

Hosted in an Azure App Service

.

Like this post? Please share to your friends:
Leave a Reply

;-) :| :x :twisted: :smile: :shock: :sad: :roll: :razz: :oops: :o :mrgreen: :lol: :idea: :grin: :evil: :cry: :cool: :arrow: :???: :?: :!: