dotfiles/unprocessed/config/polybar/todo
Geoffrey Frogeye ee178b7d57
nix: Make nix the root
Which means now I'll have to think about real prefixes in commit names.
2023-11-26 23:58:22 +01:00

22 lines
475 B
Bash
Executable file

#!/usr/bin/env bash
CALDIR="$HOME/.vdirsyncer/currentCalendars"
function status() {
ls "$CALDIR" | while read account
do
displayname="$(cat "$CALDIR/$account/displayname")"
color="$(cat "$CALDIR/$account/color")"
nb="$(todo list "$displayname" | grep -v "^$" | wc -l)"
if [ $nb -gt 0 ]
then
echo -n " %{F$color}$nb%{F-}"
fi
done
# Newline to tell polybar to update in any case
echo
}
status