refactor: nixify / clean remaining dots scripts

This commit is contained in:
hektor committed 2026-11-06 21:00:20 +01:00
1 parent 9030f33842
commit 9110789527
53 files changed
+265 -655

No files matched your search

+15
View File
@@ -0,0 +1,15 @@
# Anki review percentage for statusbar
num_to_review=200
# Get current card count from Anki
count=$(curl -s 127.0.0.1:8765 -X POST -d '{"action": "getNumCardsReviewedToday", "version": 6}' | jq '.result') || count=
if [ -n "$count" ]; then
echo "$count" > "$ANKI_REVIEWS"
elif [ ! -s "$ANKI_REVIEWS" ]; then
echo "-1" > "$ANKI_REVIEWS"
fi
num_reviews=$(cat "$ANKI_REVIEWS")
echo -n " Reviews: $(awk -v n="$num_reviews" -v t="$num_to_review" 'BEGIN { printf "%.2f%%", 100 * n / t }') "
+2
View File
@@ -0,0 +1,2 @@
pomo="${XDG_DATA_HOME:-$HOME/.local/share}/pomo"
if [ -f "$pomo" ]; then cat "$pomo"; fi
+2
View File
@@ -0,0 +1,2 @@
# Render contents of $HOME/.project if present
if [ -f "$HOME/.project" ]; then cat "$HOME/.project"; fi
+5
View File
@@ -0,0 +1,5 @@
num_done="$(task end.after:today status:completed count)"
num_pending="$(($(task count status:pending) + num_done))"
num_waiting="$(task count status:waiting)"
echo "Tasks: $num_done/$num_pending+$num_waiting"