Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Added plugin to show CGM data from libeview api #275

Merged
merged 4 commits into from
Aug 18, 2024

Conversation

steinbrueckri
Copy link
Contributor

@steinbrueckri steinbrueckri commented Jul 19, 2024

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

  • 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

  1. The script loads configuration settings from ~/.tmuxlibre.conf.
  2. If the configuration file does not exist, it creates a default one and exits, prompting the user to configure it.
  3. The script checks the cache for recent data.
  4. If the cache is outdated, it logs into the LibreView API and fetches new data.
  5. The script parses the data and determines the glucose trend.
  6. 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.

@steinbrueckri
Copy link
Contributor Author

Bump: @danerwilliams @ethancedwards8 can you may be take a look at this PR?

@ethancedwards8
Copy link
Member

Wow. Let me just say, thank you for all your work into this PR. Thank you for bumping this.

@ethancedwards8 ethancedwards8 merged commit eec7354 into dracula:master Aug 18, 2024
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants