From ea4fe76393a527eb4a754d0c8a8fa35de2bd20e5 Mon Sep 17 00:00:00 2001 From: jeschli Date: Tue, 10 Jul 2018 20:35:38 +0200 Subject: Reaktor: taskwarrior -> task-{add,delete,list} --- krebs/5pkgs/simple/Reaktor/plugins.nix | 32 ++++++++++++++++++++++---------- 1 file changed, 22 insertions(+), 10 deletions(-) (limited to 'krebs') diff --git a/krebs/5pkgs/simple/Reaktor/plugins.nix b/krebs/5pkgs/simple/Reaktor/plugins.nix index 7573c9256..96e0af2d7 100644 --- a/krebs/5pkgs/simple/Reaktor/plugins.nix +++ b/krebs/5pkgs/simple/Reaktor/plugins.nix @@ -141,16 +141,28 @@ rec { ''; }); - taskwarrior = buildSimpleReaktorPlugin "task" { - pattern = "^task: (?P.*)$$"; - script = let - taskrc = "$HOME/.taskrc"; - in - pkgs.writeDash "task-wrapper" '' - if [ -f ${taskrc} ] ; then - touch ${taskrc} - fi - ${pkgs.taskwarrior}/bin/task "$*" + taskrcFile = builtins.toFile "taskrc" '' + confirmation=no + ''; + + task-add = buildSimpleReaktorPlugin "task-add" { + pattern = "^task-add: (?P.*)$$"; + script = pkgs.writeDash "task-add" '' + ${pkgs.taskwarrior}/bin/task rc:${taskrcFile} add "$*" + ''; + }; + + task-list = buildSimpleReaktorPlugin "task-list" { + pattern = "^task-list"; + script = pkgs.writeDash "task-list" '' + ${pkgs.taskwarrior}/bin/task rc:${taskrcFile} list + ''; + }; + + task-delete = buildSimpleReaktorPlugin "task-delete" { + pattern = "^task-remove: (?P.*)$$"; + script = pkgs.writeDash "task-delete" '' + ${pkgs.taskwarrior}/bin/task rc:${taskrcFile} delete "$*" ''; }; -- cgit v1.2.3 From 9f9cd592c50911e49956cf47e8e385a8299ac410 Mon Sep 17 00:00:00 2001 From: jeschli Date: Tue, 10 Jul 2018 20:55:35 +0200 Subject: Reaktor: +plugins: task-{add, delete, list} -taskwarrior --- krebs/2configs/reaktor-krebs.nix | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'krebs') diff --git a/krebs/2configs/reaktor-krebs.nix b/krebs/2configs/reaktor-krebs.nix index d80fd0eb1..2e63f1385 100644 --- a/krebs/2configs/reaktor-krebs.nix +++ b/krebs/2configs/reaktor-krebs.nix @@ -13,7 +13,9 @@ with import ; }; plugins = with pkgs.ReaktorPlugins; [ sed-plugin - taskwarrior + task-add + task-delete + task-list ] ++ (attrValues (todo "agenda")) ; -- cgit v1.2.3