diff options
Diffstat (limited to 'krebs')
-rw-r--r-- | krebs/2configs/reaktor-krebs.nix | 4 | ||||
-rw-r--r-- | krebs/5pkgs/simple/Reaktor/plugins.nix | 32 |
2 files changed, 25 insertions, 11 deletions
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 <stockholm/lib>; }; plugins = with pkgs.ReaktorPlugins; [ sed-plugin - taskwarrior + task-add + task-delete + task-list ] ++ (attrValues (todo "agenda")) ; diff --git a/krebs/5pkgs/simple/Reaktor/plugins.nix b/krebs/5pkgs/simple/Reaktor/plugins.nix index c303f9fb3..db578c457 100644 --- a/krebs/5pkgs/simple/Reaktor/plugins.nix +++ b/krebs/5pkgs/simple/Reaktor/plugins.nix @@ -146,16 +146,28 @@ rec { ''; }); - taskwarrior = buildSimpleReaktorPlugin "task" { - pattern = "^task: (?P<args>.*)$$"; - 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<args>.*)$$"; + 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<args>.*)$$"; + script = pkgs.writeDash "task-delete" '' + ${pkgs.taskwarrior}/bin/task rc:${taskrcFile} delete "$*" ''; }; |