SketchyBar/plugins/githubIndicator.sh

10 lines
303 B
Bash
Raw Normal View History

2021-08-09 17:06:10 +00:00
#!/usr/bin/env bash
COUNT=$(curl https://github.com/users/FelixKratz/contributions | grep $(date '+%Y-%m-%d') | sed -nr 's/.*data-count=\"([^"]+).*/\1/p')
if [ $COUNT -gt 0 ]; then
spacebar -m set githubIndicator icon_color 0xaa48aa2a
else
spacebar -m set githubIndicator icon_color 0xaaffffff
fi