module polybar nightscout

This commit is contained in:
Michael Grote 2021-06-08 14:39:33 +02:00
parent 18022adfd9
commit e97d5df4d2
2 changed files with 9 additions and 1 deletions

View file

@ -40,7 +40,7 @@ font-1 = unifont:fontformat=truetype:size=8:antialias=false;0
font-2 = siji:pixelsize=10;1
modules-left = i3
modules-center =
modules-right = backlight alsa memory cpu wlan eth_intern eth_dock battery temp_cpu temp_gpu temp_nvme date powermenu
modules-right = nightscout_script backlight alsa memory cpu wlan eth_intern eth_dock battery temp_cpu temp_gpu temp_nvme date powermenu
tray-position = right
tray-padding = 2
tray-background = #888888
@ -51,6 +51,12 @@ tray-background = #888888
cursor-click = pointer
cursor-scroll = ns-resize
[module/nightscout_script]
type = custom/script
exec = /home/mg/dotfiles/polybar/nightscout_cgm.sh
interval = 120
format-prefix = "BG"
[module/xwindow]
type = internal/xwindow
label = %title:0:30:...%

View file

@ -0,0 +1,2 @@
#!/bin/bash
curl -s -X GET "https://nightscout.mgrote.net/api/v1/entries/sgv?count=1&token=polybar-2f9359a0c396444a" | awk '{print $3 * 0.055}'