SketchyBar/plugins/githubIndicator.sh
2021-08-09 19:06:10 +02:00

9 lines
303 B
Bash
Executable file

#!/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