Use github token for requesting zen

This commit is contained in:
2021-11-15 18:53:36 +03:00
parent 2e0a339231
commit cc6ca6045e

View File

@@ -80,7 +80,10 @@ cal -m
date +"%d %B %Y - %H:%M:%S, %A"
# GitHub zen
echo
echo -n 'Zen: "'
curl https://api.github.com/zen
echo '"'
githubToken=$(cat "$HOME/.config/github-token.secret")
if [[ "$githubToken" != "" ]] ; then
echo
echo -n 'Zen: "'
curl -H "Authorization: token $githubToken" https://api.github.com/zen
echo '"'
fi