1
0
Fork 0

Watch and sync taskwarrior changes quickly

This commit is contained in:
Malte Brandy 2021-07-15 14:11:07 +02:00
parent 1543d57979
commit 6b8da5e295
No known key found for this signature in database
GPG key ID: 226A2D41EF5378C9

View file

@ -4,6 +4,20 @@
enable = true;
frequency = "*:0/1";
};
systemd.user.services.watch-tasks = {
Unit.Description = "Watch tasks for changes and trigger sync";
Service = {
ExecStart = toString (
pkgs.writeShellScript "watch-vdir" ''
while sleep 1s; do
${pkgs.taskwarrior}/bin/task sync
${pkgs.inotify-tools}/bin/inotifywait -e move,create,delete,modify -r ${config.home.homeDirectory}/.task
done
''
);
};
Install.WantedBy = [ "default.target" ];
};
home.file = {
"add-kassandra-notification" = {
target = ".task/hooks/on-add.kassandra-notification";