1
0
Fork 0
mirror of https://github.com/Horhik/dotfiles.git synced 2024-11-27 02:21:32 +00:00
Dotfiles/.config/polybar/polybar-scripts/notification-github/notification-github.sh

13 lines
257 B
Bash
Raw Normal View History

2020-07-27 04:59:00 +00:00
#!/bin/sh
USER=""
TOKEN="1234567890"
notifications=$(echo "user = \"$USER:$TOKEN\"" | curl -sf -K- https://api.github.com/notifications | jq ".[].unread" | grep -c true)
if [ "$notifications" -gt 0 ]; then
echo "# $notifications"
else
echo ""
fi