Improve khal notification

Ensure all dependencies are declared.
Also update calendar to reflect latest module changes
This commit is contained in:
Daniel Siepmann 2023-06-16 06:18:07 +02:00
parent 3b1bf7f698
commit 23d3d8f576
Signed by: Daniel Siepmann
GPG key ID: 33D6629915560EF4
2 changed files with 9 additions and 2 deletions

Binary file not shown.

View file

@ -7,14 +7,21 @@ let
notificationScript = pkgs.writeShellApplication {
name = "khal-notification";
runtimeInputs = [
pkgs.coreutils-full
pkgs.khal
pkgs.libnotify
];
text = ''
date=$(date "+%H:%M:00")
events=$(${pkgs.khal}/bin/khal list --notstarted "$date" "$1")
events=$(khal list --notstarted "$date" "$1")
if [ -z "$events" ]; then
exit 0;
fi
${pkgs.libnotify}/bin/notify-send \
notify-send \
--urgency=critical \
--expire-time=90000 \
--icon="${config.gtk.iconTheme.package}/share/icons/${config.gtk.iconTheme.name}/32/apps/office-calendar.svg" \