2021-08-09 17:06:10 +00:00
|
|
|
#!/usr/bin/env bash
|
|
|
|
|
2021-08-13 13:58:00 +00:00
|
|
|
COUNT=0
|
2021-08-09 17:06:10 +00:00
|
|
|
COUNT=$(curl https://github.com/users/FelixKratz/contributions | grep $(date '+%Y-%m-%d') | sed -nr 's/.*data-count=\"([^"]+).*/\1/p')
|
|
|
|
|
2021-08-13 13:58:00 +00:00
|
|
|
echo $COUNT
|
2021-08-09 17:06:10 +00:00
|
|
|
if [ $COUNT -gt 0 ]; then
|
2022-04-20 21:47:28 +00:00
|
|
|
sketchybar --set $NAME icon.color=0xff48aa2a label.padding_left=4 label="$COUNT"
|
2021-08-09 17:06:10 +00:00
|
|
|
else
|
2022-04-20 21:47:28 +00:00
|
|
|
sketchybar --set $NAME icon.color=0xaaffffff label.padding_left=0 label=""
|
2021-08-09 17:06:10 +00:00
|
|
|
fi
|