From 705c726b06813f81ed3f36d06304cb6056878087 Mon Sep 17 00:00:00 2001 From: crater2150 Date: Wed, 7 Jul 2021 21:43:09 +0200 Subject: [PATCH] Add custom prompt for open todos --- zshrc | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/zshrc b/zshrc index 096170d..bbdb8d2 100644 --- a/zshrc +++ b/zshrc @@ -80,3 +80,9 @@ if exists stack; then fi exists thefuck && eval $(thefuck --alias) + +_prompt_todos() { + local todos=$(rg -l '^STATUS:NEEDS-ACTION' $HOME/.calendars | wc -l) + [[ $todos -gt 0 ]] && echo "Todos: $todos" +} +__chromaz_extra_left+=_prompt_todos