From 2cc3d8de7e658e694f3b856ac7d9d78e6032ce58 Mon Sep 17 00:00:00 2001 From: Arpit Chakladar Date: Wed, 23 Sep 2026 22:50:24 +0530 Subject: feat(office/calcurse): setup the notifications for upcoming events --- modules/office/calcurse/conf | 4 ++-- modules/office/calcurse/default.nix | 9 ++++++--- 2 files changed, 8 insertions(+), 5 deletions(-) (limited to 'modules/office/calcurse') diff --git a/modules/office/calcurse/conf b/modules/office/calcurse/conf index 393fab6..1868cc6 100644 --- a/modules/office/calcurse/conf +++ b/modules/office/calcurse/conf @@ -15,7 +15,7 @@ appearance.todoview=show-completed appearance.headingpos=right-justified # Daemon -daemon.enable=no +daemon.enable=yes daemon.log=no # Format @@ -38,5 +38,5 @@ general.systemevents=yes # Notification notification.warning=300 -notification.command=printf '\a' +notification.command=notify-send -a calcurse -i "@@CALCURSE_ICON@@" -u critical "Calcurse" "$(calcurse -n | tail -1 | cut -d ' ' -f5-)" notification.notifyall=flagged-only diff --git a/modules/office/calcurse/default.nix b/modules/office/calcurse/default.nix index 90e4699..6e3e855 100644 --- a/modules/office/calcurse/default.nix +++ b/modules/office/calcurse/default.nix @@ -8,11 +8,12 @@ let calcurseSync = pkgs.writeShellScriptBin "calcurse-sync" (builtins.readFile ./calcurse-sync.sh); - calcursePackage = pkgs.symlinkJoin { + calcurse = pkgs.symlinkJoin { name = "calcurse-wrapped"; paths = [ config.terminal.bash.package pkgs.calcurse + pkgs.libnotify ] ++ lib.optionals config.development.nixvim.enable [ config.development.nixvim.package ] ++ lib.optionals config.office.calcurse.sync.enable [ calcurseSync ]; @@ -48,7 +49,7 @@ in package = lib.mkOption { type = lib.types.package; readOnly = true; - default = calcursePackage; + default = calcurse; description = "The calcurse package to use."; }; sync = { @@ -81,7 +82,9 @@ in home.packages = [ config.office.calcurse.package ]; xdg.configFile."calcurse/conf" = { - source = ./conf; + text = + builtins.replaceStrings [ "@@CALCURSE_ICON@@" ] [ "${../../../assets/icons/apps/calcurse.svg}" ] + (builtins.readFile ./conf); force = true; }; xdg.configFile."calcurse/keys" = { -- cgit v1.2.3