• About Us
  • Privacy Policy
  • Disclaimer
  • Contact Us
AimactGrow
  • Home
  • Technology
  • AI
  • SEO
  • Coding
  • Gaming
  • Cybersecurity
  • Digital marketing
No Result
View All Result
  • Home
  • Technology
  • AI
  • SEO
  • Coding
  • Gaming
  • Cybersecurity
  • Digital marketing
No Result
View All Result
AimactGrow
No Result
View All Result

A Nightscout Phase for OhMyPosh exhibits my realtime Blood Sugar readings in my Git Immediate

Admin by Admin
April 16, 2025
Home Coding
Share on FacebookShare on Twitter



I’ve talked about how I like a pleasant fairly immediate in my Home windows Terminal and made movies exhibiting intimately the right way to 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 that means to write down a Nightscout “section” 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 lively 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 rancid readings help) Nightscout section which you can 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 cheerful.

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

In case you have an current OhMyPosh json config, you may simply add one other section like this. Make certain your Nightscout URL features a safe Token or is public (as much as you). Word additionally that I setup “if/then” guidelines in my background_templates. These are optionally available 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’s not actually used, as you may see it at all times evaluates to black #000, however it exhibits you the way you might set it to white textual content on a darker background in case you 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?rely=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 hand over) in case you really feel this slows you down. It’s going to be cached for five min so it is unlikely  to b one thing you may discover. The good thing about this new OhMyPosh section over the earlier answer is that it requires no extra companies/chron jobs and might be setup extraordinarily rapidly. Word additionally which you can customise your template with NerdFonts. I’ve included a tiny syringe!

What a lovely prompt with Blood Sugar!

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


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




About Scott

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

facebook
bluesky
subscribe
About   Publication

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








Tags: BloodGitNightscoutOhMyPoshPromptreadingsrealtimeSegmentshowsSugar
Admin

Admin

Next Post
Genshin Affect codes for April 2025

Genshin Affect codes for April 2025

Leave a Reply Cancel reply

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

Recommended.

Netgear EX6200 Flaw Permits Distant Entry and Information Theft

Netgear EX6200 Flaw Permits Distant Entry and Information Theft

May 1, 2025
Salesforce AI Analysis Releases VoiceAgentRAG: A Twin-Agent Reminiscence Router that Cuts Voice RAG Retrieval Latency by 316x

Salesforce AI Analysis Releases VoiceAgentRAG: A Twin-Agent Reminiscence Router that Cuts Voice RAG Retrieval Latency by 316x

March 30, 2026

Trending.

Nsfw Chatgpt Options – Examples I’ve Used

Nsfw Chatgpt Options – Examples I’ve Used

October 13, 2025
Digital Detox & Display Time Statistics 2025

Digital Detox & Display Time Statistics 2025

March 28, 2026
How creators and entrepreneurs are utilizing AI to hurry up & succeed [data]

How creators and entrepreneurs are utilizing AI to hurry up & succeed [data]

June 17, 2025
What’s a Ahead Deployed Engineer: The AI Position OpenAI, Anthropic, and Google Are Hiring in 2026

What’s a Ahead Deployed Engineer: The AI Position OpenAI, Anthropic, and Google Are Hiring in 2026

May 21, 2026
All Overwatch 2 Dokiwatch Skins, Title Playing cards, And Cosmetics

All Overwatch 2 Dokiwatch Skins, Title Playing cards, And Cosmetics

April 24, 2025

AimactGrow

Welcome to AimactGrow, your ultimate source for all things technology! Our mission is to provide insightful, up-to-date content on the latest advancements in technology, coding, gaming, digital marketing, SEO, cybersecurity, and artificial intelligence (AI).

Categories

  • AI
  • Coding
  • Cybersecurity
  • Digital marketing
  • Gaming
  • SEO
  • Technology

Recent News

Oracle shares slide on $15B improve in knowledge heart spending

PeopleSoft 0-day affecting lots of of organizations steals gigabytes of information

June 12, 2026
Google Sues Chinese language Phishing Service Over Gemini Abuse

Google Sues Chinese language Phishing Service Over Gemini Abuse

June 12, 2026
  • About Us
  • Privacy Policy
  • Disclaimer
  • Contact Us

© 2025 https://blog.aimactgrow.com/ - All Rights Reserved

No Result
View All Result
  • Home
  • Technology
  • AI
  • SEO
  • Coding
  • Gaming
  • Cybersecurity
  • Digital marketing

© 2025 https://blog.aimactgrow.com/ - All Rights Reserved