I was recently diagnosed with Type 2 Diabetes, and I wanted a way to keep a close eye on my blood glucose levels while working. Since I am an avid user of tmux and have been using the dracula-tmux theme for a while, I thought it would be a great idea to integrate a script that displays my glucose levels directly in tmux. This script helps me manage my diabetes more effectively by keeping this vital information always visible.
Features
Fetches glucose data from the LibreView API
Caches data to minimize the number of API requests
Displays the latest glucose level along with a trend indicator in the tmux status bar
Manages log files by rotating them when they exceed a specified size
How It Works
The script loads configuration settings from ~/.tmuxlibre.conf.
If the configuration file does not exist, it creates a default one and exits, prompting the user to configure it.
The script checks the cache for recent data.
If the cache is outdated, it logs into the LibreView API and fetches new data.
The script parses the data and determines the glucose trend.
Finally, it outputs the glucose level and trend for display in the tmux status bar.
Dependencies
curl
jq
bc
gzip
Note: This script uses an unofficial API to fetch glucose data from LibreView.
Add Script to Monitor Blood Glucose Levels
Motivation
I was recently diagnosed with Type 2 Diabetes, and I wanted a way to keep a close eye on my blood glucose levels while working. Since I am an avid user of tmux and have been using the dracula-tmux theme for a while, I thought it would be a great idea to integrate a script that displays my glucose levels directly in tmux. This script helps me manage my diabetes more effectively by keeping this vital information always visible.
Features
How It Works
~/.tmuxlibre.conf
.Dependencies
Note: This script uses an unofficial API to fetch glucose data from LibreView.