• About Us
  • Privacy Policy
  • Disclaimer
  • Contact Us
TechTrendFeed
  • Home
  • Tech News
  • Cybersecurity
  • Software
  • Gaming
  • Machine Learning
  • Smart Home & IoT
No Result
View All Result
  • Home
  • Tech News
  • Cybersecurity
  • Software
  • Gaming
  • Machine Learning
  • Smart Home & IoT
No Result
View All Result
TechTrendFeed
No Result
View All Result

A Nightscout Section for OhMyPosh reveals my realtime Blood Sugar readings in my Git Immediate

Admin by Admin
May 17, 2025
Home Software
Share on FacebookShare on Twitter



I’ve talked about how I really like a pleasant fairly immediate in my Home windows Terminal and made movies exhibiting intimately do it. I’ve additionally labored with my buddy TooTallNate to place my real-time blood sugar right into a bash or PowerShell immediate, however this was again in 2017.

Now that I am “Staff OhMyPosh” I’ve been which means to put in writing a Nightscout “phase” for my immediate. Nightscout is an open supply self-hosted (there are business hosts additionally like T1Pal) web site and API for distant show of real-time and near-real-time glucose readings for Diabetics like myself.

Since my physique has an energetic REST API the place I can simply do an HTTP GET (by way of curl or no matter) and see my blood sugar, it clearly belongs in a spot of honor, similar to my present Git Department!

My blood sugar in my Prompt!

Oh My Posh helps configurable “segments” and now there is a beta (nonetheless wants mmol and off readings assist) Nightscout phase that you would be able to setup in only a few minutes!

This immediate works in ANY shell on ANY os! You are able to do this in zsh, PowerShell, Bash, no matter makes you content.

Here’s a YouTube of Jan from OhMyPosh and I coding the phase LIVE in Go.

If in case you have an current OhMyPosh json config, you’ll be able to simply add one other phase like this. Be sure that your Nightscout URL features a safe Token or is public (as much as you). Be aware additionally that I setup “if/then” guidelines in my background_templates. These are non-obligatory and as much as you to alter to your style. I set my background colours to purple, yellow, inexperienced relying on sugar numbers. I even have a foreground template that isn’t actually used, as you’ll be able to see it all the time evaluates to black #000, but it surely reveals you ways you might set it to white textual content on a darker background if you happen to needed.

{
"kind": "nightscout",
"model": "diamond",
"foreground": "#ffffff",
"background": "#ff0000",
"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",
"properties": {
"url": "https://YOURNIGHTSCOUTAPP.herokuapp.com/api/v1/entries.json?depend=1&token=APITOKENFROMYOURADMIN",
"http_timeout": 1500,
"template": " {{.Sgv}}{{.TrendIcon}}"
}
},

By default we are going to solely exit and hit your Nightscout occasion each 5 min, solely when the immediate is repainted, and we’ll solely wait 1500ms earlier than giving up. You may set that “http_timeout” (how lengthy earlier than we surrender) if you happen to really feel this slows you down. It will be cached for five min so it is unlikely  to b one thing you may discover. The good thing about this new OhMyPosh phase over the earlier resolution is that it requires no further providers/chron jobs and will be setup extraordinarily rapidly. Be aware additionally that you would be able to customise your template with NerdFonts. I’ve included a tiny syringe!

What a lovely prompt with Blood Sugar!

Subsequent I am going to hope to enhance the phase with mmol assist in addition to strikeout model for “stale” (over 15 min outdated) outcomes. You are additionally welcome to assist out by watching our YouTube and submitting a PR!


Sponsor: Make login Auth0’s drawback. Not yours. Present the handy login options your prospects need, like social login, multi-factor authentication, single sign-on, passwordless, and extra. Get began free of charge.




About Scott

Scott Hanselman is a former professor, former Chief Architect in finance, now speaker, marketing consultant, father, diabetic, and Microsoft worker. He’s a failed stand-up comedian, a cornrower, and a ebook writer.

facebook
bluesky
subscribe
About   Publication

Internet hosting By
Hosted on Linux using .NET in an Azure App Service








Tags: BloodGitNightscoutOhMyPoshPromptreadingsrealtimeSegmentshowsSugar
Admin

Admin

Next Post
Apollo joins the Works With House Assistant Program

Apollo joins the Works With House Assistant Program

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

Trending.

Discover Vibrant Spring 2025 Kitchen Decor Colours and Equipment – Chefio

Discover Vibrant Spring 2025 Kitchen Decor Colours and Equipment – Chefio

May 17, 2025
Reconeyez Launches New Web site | SDM Journal

Reconeyez Launches New Web site | SDM Journal

May 15, 2025
Safety Amplified: Audio’s Affect Speaks Volumes About Preventive Safety

Safety Amplified: Audio’s Affect Speaks Volumes About Preventive Safety

May 18, 2025
Apollo joins the Works With House Assistant Program

Apollo joins the Works With House Assistant Program

May 17, 2025
Flip Your Toilet Right into a Good Oasis

Flip Your Toilet Right into a Good Oasis

May 15, 2025

TechTrendFeed

Welcome to TechTrendFeed, your go-to source for the latest news and insights from the world of technology. Our mission is to bring you the most relevant and up-to-date information on everything tech-related, from machine learning and artificial intelligence to cybersecurity, gaming, and the exciting world of smart home technology and IoT.

Categories

  • Cybersecurity
  • Gaming
  • Machine Learning
  • Smart Home & IoT
  • Software
  • Tech News

Recent News

How authorities cyber cuts will have an effect on you and your enterprise

How authorities cyber cuts will have an effect on you and your enterprise

July 9, 2025
Namal – Half 1: The Shattered Peace | by Javeria Jahangeer | Jul, 2025

Namal – Half 1: The Shattered Peace | by Javeria Jahangeer | Jul, 2025

July 9, 2025
  • About Us
  • Privacy Policy
  • Disclaimer
  • Contact Us

© 2025 https://techtrendfeed.com/ - All Rights Reserved

No Result
View All Result
  • Home
  • Tech News
  • Cybersecurity
  • Software
  • Gaming
  • Machine Learning
  • Smart Home & IoT

© 2025 https://techtrendfeed.com/ - All Rights Reserved