Add CGM value to Waybar
This commit is contained in:
parent
554b794ad2
commit
f3943e8022
|
@ -0,0 +1,6 @@
|
||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
CGM_VALUE=$(curl -s -H 'api-secret: 48380073c2e46d673ab40c764d160976eb1150eb' -H "accept: application/json" \
|
||||||
|
"https://nightscout.coolneng.duckdns.org/api/v1/entries?count=1" |
|
||||||
|
grep -o '"sgv":[0-9]*' | cut -d ":" -f 2)
|
||||||
|
echo "$CGM_VALUE"
|
|
@ -2,7 +2,7 @@
|
||||||
"layer": "top",
|
"layer": "top",
|
||||||
"height": 25,
|
"height": 25,
|
||||||
"modules-left": ["sway/workspaces" ],
|
"modules-left": ["sway/workspaces" ],
|
||||||
"modules-center": ["custom/org-pomodoro", "clock"],
|
"modules-center": ["custom/org-pomodoro", "clock", "custom/cgm-value"],
|
||||||
"modules-right": ["mpd", "network", "pulseaudio", "battery", "battery#bat2"],
|
"modules-right": ["mpd", "network", "pulseaudio", "battery", "battery#bat2"],
|
||||||
"mpd": {
|
"mpd": {
|
||||||
"format": "<span foreground='#88C0D0'>{stateIcon}</span> {title}",
|
"format": "<span foreground='#88C0D0'>{stateIcon}</span> {title}",
|
||||||
|
@ -78,5 +78,10 @@
|
||||||
"format": "<span foreground='#88C0D0'></span> {}",
|
"format": "<span foreground='#88C0D0'></span> {}",
|
||||||
"exec": "$HOME/.local/share/scripts/org-clock-status",
|
"exec": "$HOME/.local/share/scripts/org-clock-status",
|
||||||
"interval": 2
|
"interval": 2
|
||||||
|
},
|
||||||
|
"custom/cgm-value": {
|
||||||
|
"format": "<span foreground='#88C0D0'></span> {}",
|
||||||
|
"exec": "$HOME/.local/share/scripts/cgm-value",
|
||||||
|
"interval": 2
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue