diff --git a/.bin/get-anki-reviews b/.bin/get-anki-reviews index dfd1557..fa4ebc4 100755 --- a/.bin/get-anki-reviews +++ b/.bin/get-anki-reviews @@ -1,5 +1,7 @@ #!/usr/bin/env bash +# Anki review percentage for statusbar + # Get current card count from Anki count=$(curl -s localhost:8765 -X POST -d '{"action": "getNumCardsReviewedToday", "version": 6}' | jq '.result') diff --git a/.bin/get-anki-reviews-status b/.bin/get-anki-reviews-status index fcd9126..f43ac42 100755 --- a/.bin/get-anki-reviews-status +++ b/.bin/get-anki-reviews-status @@ -1,5 +1,7 @@ #!/usr/bin/env bash +# Get Anki review status from exit code + num_reviews="$(cat /tmp/anki-reviews)" if [ "$num_reviews" -ge "400" ] diff --git a/.bin/stremio b/.bin/stremio index 666169a..bca8d47 100755 --- a/.bin/stremio +++ b/.bin/stremio @@ -1,3 +1,5 @@ #!/usr/bin/env bash +# Only allow stremio when I have finished my Anki reviews + get-anki-reviews-status && stremio || $(echo "Do your reviews first" | notify-pipe)