Tiny C program that formats your latest Nightscout BGL reading for use in your terminal prompt (a.k.a $PS1). It's written in C to be as fast as possible, since it gets executed every time the prompt is rendered, so latency is critical.
You will need to set up nightscout-ps1-daemon
which is responsible for
connecting to your Nightscout server and creating the INI file that this
program reads.
The trend and target high/low values are also provided, so that you may render arrows and colors as desired:
Preferred installation is by downloading a pre-compiled binary for your platform:
If there is no binary for your platform, or you would simply like to install
from source, invoke the make
command:
# build the `nightscout-ps1` binary
$ git submodule update --init
$ make
$ ./out/Default/nightscout-ps1
# install to /usr/local by default, set PREFIX for a custom dir
$ make install
Add this to your .bashrc
file:
export PS1="\$(nightscout-ps1) $ "
Be sure to add further customizations to your $PS1
from there!
Looking for the Windows version that was mentioned on Scott Hanselman's blog? For now use version 1.1.4 here and those instructions will work.