From c056c86702755d966264fd52b25a293e7a822015 Mon Sep 17 00:00:00 2001 From: Caroline Larimore Date: Sat, 28 Jun 2025 23:24:11 -0700 Subject: polybar: add anki review module --- .../home/desktop/components/polybar/default.nix | 40 +++++++++++++++++++++- 1 file changed, 39 insertions(+), 1 deletion(-) (limited to 'modules') diff --git a/modules/home/desktop/components/polybar/default.nix b/modules/home/desktop/components/polybar/default.nix index f6b81db..468aacd 100644 --- a/modules/home/desktop/components/polybar/default.nix +++ b/modules/home/desktop/components/polybar/default.nix @@ -64,7 +64,7 @@ in { module.margin = 1; modules = { - left = "stat music"; + left = "stat music anki"; center = "i3"; right = "wlan eth filesystem keyboard xkeyboard pulseaudio date"; }; @@ -114,6 +114,44 @@ in { }; }; + "module/anki" = { + type = "custom/script"; + + interval = 600; + interval-fail = 10; + + exec = pkgs.writeShellScript "get-anki-status" '' + count="$(${pkgs.sqlite}/bin/sqlite3 --readonly ~/.local/share/Anki2/$(whoami)/collection.anki2 <