{"id":2529,"date":"2025-05-17T03:27:27","date_gmt":"2025-05-17T03:27:27","guid":{"rendered":"https:\/\/techtrendfeed.com\/?p=2529"},"modified":"2025-05-17T03:27:27","modified_gmt":"2025-05-17T03:27:27","slug":"a-nightscout-section-for-ohmyposh-reveals-my-realtime-blood-sugar-readings-in-my-git-immediate","status":"publish","type":"post","link":"https:\/\/techtrendfeed.com\/?p=2529","title":{"rendered":"A Nightscout Section for OhMyPosh reveals my realtime Blood Sugar readings in my Git Immediate"},"content":{"rendered":"<p> <br \/>\n<\/p>\n<div id=\"\">&#13;<br \/>\n            &#13;<\/p>\n<p>I&#8217;ve talked about <a rel=\"nofollow\" target=\"_blank\" href=\"https:\/\/www.hanselman.com\/blog\/my-ultimate-powershell-prompt-with-oh-my-posh-and-the-windows-terminal\">how I really like a pleasant fairly immediate in my Home windows Terminal<\/a> and <a rel=\"nofollow\" target=\"_blank\" href=\"https:\/\/www.youtube.com\/watch?v=VT2L1SXFq9U\">made movies exhibiting intimately  do it<\/a>. I&#8217;ve additionally labored with my buddy <a rel=\"nofollow\" target=\"_blank\" href=\"https:\/\/www.hanselman.com\/blog\/visualizing-your-realtime-blood-sugar-values-and-a-git-prompt-on-windows-powershell-and-linux-bash\">TooTallNate to place my real-time blood sugar right into a bash or PowerShell immediate<\/a>, however this was again in 2017.<\/p>\n<p>Now that I am &#8220;Staff <a rel=\"nofollow\" target=\"_blank\" href=\"https:\/\/ohmyposh.dev\/\">OhMyPosh<\/a>&#8221; I&#8217;ve been which means to put in writing a Nightscout &#8220;phase&#8221; for my immediate. <a rel=\"nofollow\" target=\"_blank\" href=\"https:\/\/www.nightscoutfoundation.org\/how-you-can-help\">Nightscout<\/a> is an open supply self-hosted (there are <a rel=\"nofollow\" target=\"_blank\" href=\"https:\/\/www.t1pal.com\/\">business hosts additionally like T1Pal<\/a>) web site and API for distant show of real-time and near-real-time glucose readings for Diabetics like myself.<\/p>\n<p>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! <\/p>\n<figure><img loading=\"lazy\" decoding=\"async\" title=\"My blood sugar in my Prompt!\" style=\"border-left-width: 0px; border-right-width: 0px; background-image: none; border-bottom-width: 0px; padding-top: 0px; padding-left: 0px; display: inline; padding-right: 0px; border-top-width: 0px\" border=\"0\" alt=\"My blood sugar in my Prompt!\" src=\"https:\/\/images.hanselman.com\/blog\/Windows-Live-Writer\/a1ea1c6a57b0_119D3\/image_d14e0906-8932-44e0-a493-86eeac62c1ae.png\" width=\"999\" height=\"37\"\/> <\/p>\n<p><a rel=\"nofollow\" target=\"_blank\" href=\"https:\/\/ohmyposh.dev\/docs\/\">Oh My Posh helps configurable &#8220;segments&#8221;<\/a> and now there is a beta (nonetheless wants mmol and off readings assist) <a rel=\"nofollow\" target=\"_blank\" href=\"https:\/\/ohmyposh.dev\/docs\/nightscout\">Nightscout phase<\/a> that you would be able to setup in only a few minutes! <\/p>\n<\/figure>\n<p>This immediate works in ANY shell on ANY os! You are able to do this in zsh, PowerShell, Bash, no matter makes you content.<\/p>\n<p>Here&#8217;s a YouTube of Jan from OhMyPosh and I coding the phase LIVE in Go.<\/p>\n<p> <center> <\/p>\n<div class=\"jeg_video_container jeg_video_content\"><iframe loading=\"lazy\" title=\"Pair Programming with OhMyPosh&#039;s Jan De Dobbeleer - Together we code a Nightscout segment in Go!\" width=\"500\" height=\"281\" src=\"https:\/\/www.youtube.com\/embed\/_meKUIm9NwA?feature=oembed\" frameborder=\"0\" allow=\"accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share\" referrerpolicy=\"strict-origin-when-cross-origin\" allowfullscreen><\/iframe><\/div>\n<p><\/center> <\/p>\n<p>If in case you have an current OhMyPosh json config, you&#8217;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 &#8220;if\/then&#8221; 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&#8217;t actually used, as you&#8217;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. <\/p>\n<pre class=\"brush: js; gutter: false; toolbar: false; auto-links: false; smart-tabs: false;\">{<br\/>\"kind\": \"nightscout\",<br\/>\"model\": \"diamond\",<br\/>\"foreground\": \"#ffffff\",<br\/>\"background\": \"#ff0000\",<br\/>\"background_templates\": [<br\/>\"{{ if gt .Sgv 150 }}#FFFF00{{ end }}\",<br\/>\"{{ if lt .Sgv 60 }}#FF0000{{ end }}\",<br\/>\"#00FF00\"<br\/>],<br\/>\"foreground_templates\": [<br\/>\"{{ if gt .Sgv 150 }}#000000{{ end }}\",<br\/>\"{{ if lt .Sgv 60 }}#000000{{ end }}\",<br\/>\"#000000\"<br\/>],<p>\"leading_diamond\": \"\ue0b6\",<br\/>\"trailing_diamond\": \"uE0B0\",<br\/>\"properties\": {<br\/>\"url\": \"https:\/\/YOURNIGHTSCOUTAPP.herokuapp.com\/api\/v1\/entries.json?depend=1&amp;token=APITOKENFROMYOURADMIN\",<br\/>\"http_timeout\": 1500,<br\/>\"template\": \"\uf890 {{.Sgv}}{{.TrendIcon}}\"<br\/>}<br\/>},\n<\/p><\/pre>\n<p>By default we are going to solely exit and hit your Nightscout occasion each 5 min, solely when the immediate is repainted, and we&#8217;ll solely wait 1500ms earlier than giving up. You may set that &#8220;http_timeout&#8221; (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\u00a0 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 <a rel=\"nofollow\" target=\"_blank\" href=\"https:\/\/www.hanselman.com\/blog\/how-to-make-a-pretty-prompt-in-windows-terminal-with-powerline-nerd-fonts-cascadia-code-wsl-and-ohmyposh\">NerdFonts<\/a>. I&#8217;ve included a tiny syringe!<\/p>\n<figure><img loading=\"lazy\" decoding=\"async\" title=\"What a lovely prompt with Blood Sugar!\" style=\"border-left-width: 0px; border-right-width: 0px; background-image: none; border-bottom-width: 0px; padding-top: 0px; padding-left: 0px; display: inline; padding-right: 0px; border-top-width: 0px\" border=\"0\" alt=\"What a lovely prompt with Blood Sugar!\" src=\"https:\/\/images.hanselman.com\/blog\/Windows-Live-Writer\/a1ea1c6a57b0_119D3\/image_84db877d-82c9-4d16-8788-e2692ce7a7e9.png\" width=\"999\" height=\"111\"\/><\/figure>\n<p>Subsequent I am going to hope to enhance the phase with mmol assist in addition to strikeout model for &#8220;stale&#8221; (over 15 min outdated) outcomes. You are additionally welcome to assist out by watching <a rel=\"nofollow\" target=\"_blank\" href=\"https:\/\/www.youtube.com\/watch?v=_meKUIm9NwA\">our YouTube<\/a> and submitting a PR!\n<\/p>\n<hr\/>\n<p><strong>Sponsor: <\/strong>Make login Auth0\u2019s drawback. Not yours. Present the handy login options your prospects need, like social login, multi-factor authentication, single sign-on, passwordless, and extra. <a rel=\"nofollow\" target=\"_blank\" href=\"http:\/\/pubads.g.doubleclick.net\/gampad\/clk?id=5840349572&amp;iu=\/6839\/lqm.scotthanselman.site\">Get began free of charge.<\/a><\/p>\n<p>&#13;<br \/>\n&#13;<br \/>\n&#13;<br \/>\n&#13;<\/p>\n<div class=\"about-scott\">\n<div class=\"bioBox\">\n<h4>About Scott<\/h4>\n<div class=\"bioBoxInner\">\n<p>Scott Hanselman is a former professor, former Chief Architect in finance, now speaker, marketing consultant, father, diabetic, and Microsoft worker. He&#8217;s a failed stand-up comedian, a cornrower, and a ebook writer.<\/p>\n<p>                        <a rel=\"nofollow\" target=\"_blank\" href=\"https:\/\/facebook.com\/shanselman\" class=\"sm-link\"><img decoding=\"async\" src=\"http:\/\/images.hanselman.com\/main\/icon-fb.png\" alt=\"facebook\"\/><\/a><br \/>\n                        <a rel=\"nofollow\" target=\"_blank\" href=\"https:\/\/bsky.app\/profile\/scott.hanselman.com\" class=\"sm-link\"><img decoding=\"async\" src=\"http:\/\/images.hanselman.com\/main\/icon-bluesky.png\" alt=\"bluesky\"\/><\/a><br \/>\n                        <a rel=\"nofollow\" target=\"_blank\" href=\"http:\/\/feeds.hanselman.com\/ScottHanselman\" class=\"sm-link\"><img decoding=\"async\" src=\"http:\/\/images.hanselman.com\/main\/icon-rss.png\" alt=\"subscribe\"\/><\/a><br \/>\n                        <a rel=\"nofollow\" target=\"_blank\" href=\"http:\/\/hanselman.com\/about\">About<\/a> \u00a0 <a rel=\"nofollow\" target=\"_blank\" href=\"http:\/\/www.hanselman.com\/newsletter\">Publication<\/a>\n                    <\/div><\/div>\n<div class=\"ads-box\">\n<div class=\"ad-item\">\n                        <strong>Internet hosting By<\/strong><br \/>\n                        <a rel=\"nofollow\" target=\"_blank\" rel=\"nofollow\" href=\"https:\/\/azure.microsoft.com\/free\"><img loading=\"lazy\" decoding=\"async\" alt=\"Hosted on Linux using .NET in an Azure App Service\" class=\"ad\" border=\"0\" valign=\"top\" vspace=\"4\" width=\"125\" height=\"125\" src=\"http:\/\/images.hanselman.com\/main\/azure-250x250.png\"\/><\/a>\n                    <\/div><\/div><\/div>\n<p>&#13;<br \/>\n&#13;<br \/>\n            &#13;<br \/>\n&#13;<br \/>\n&#13;<br \/>\n            &#13;<br \/>\n&#13;<br \/>\n            &#13;\n        <\/p><\/div>\n\n","protected":false},"excerpt":{"rendered":"<p>&#13; &#13; I&#8217;ve talked about how I really like a pleasant fairly immediate in my Home windows Terminal and made movies exhibiting intimately do it. I&#8217;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 [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":2531,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[56],"tags":[878,2466,2461,2463,152,2465,1730,2462,518,2464],"class_list":["post-2529","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-software","tag-blood","tag-git","tag-nightscout","tag-ohmyposh","tag-prompt","tag-readings","tag-realtime","tag-segment","tag-shows","tag-sugar"],"_links":{"self":[{"href":"https:\/\/techtrendfeed.com\/index.php?rest_route=\/wp\/v2\/posts\/2529","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/techtrendfeed.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/techtrendfeed.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/techtrendfeed.com\/index.php?rest_route=\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/techtrendfeed.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=2529"}],"version-history":[{"count":1,"href":"https:\/\/techtrendfeed.com\/index.php?rest_route=\/wp\/v2\/posts\/2529\/revisions"}],"predecessor-version":[{"id":2530,"href":"https:\/\/techtrendfeed.com\/index.php?rest_route=\/wp\/v2\/posts\/2529\/revisions\/2530"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/techtrendfeed.com\/index.php?rest_route=\/wp\/v2\/media\/2531"}],"wp:attachment":[{"href":"https:\/\/techtrendfeed.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=2529"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/techtrendfeed.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=2529"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/techtrendfeed.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=2529"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}<!-- This website is optimized by Airlift. Learn more: https://airlift.net. Template:. Learn more: https://airlift.net. Template: 69d9690a190636c2e0989534. Config Timestamp: 2026-04-10 21:18:02 UTC, Cached Timestamp: 2026-05-13 17:35:58 UTC -->