reaktor2 task: define env in hook
This commit is contained in:
parent
f608351da1
commit
06b23af29d
@ -18,39 +18,23 @@ let
|
|||||||
activate = "match";
|
activate = "match";
|
||||||
command = 1;
|
command = 1;
|
||||||
arguments = [2];
|
arguments = [2];
|
||||||
|
env.TASKDATA = "${stateDir}/${name}";
|
||||||
commands = {
|
commands = {
|
||||||
add = {
|
add.filename = pkgs.writeDash "${name}-task-add" ''
|
||||||
env = {
|
${pkgs.taskwarrior}/bin/task rc:${rcFile} add "$1"
|
||||||
TASKDATA = "${stateDir}/${name}";
|
'';
|
||||||
};
|
list.filename = pkgs.writeDash "${name}-task-list" ''
|
||||||
filename = pkgs.writeDash "${name}-task-add" ''
|
${pkgs.taskwarrior}/bin/task rc:${rcFile} export \
|
||||||
${pkgs.taskwarrior}/bin/task rc:${rcFile} add "$*"
|
| ${pkgs.jq}/bin/jq -r '
|
||||||
'';
|
.[] | select(.id != 0) | "\(.id) \(.description)"
|
||||||
};
|
'
|
||||||
list = {
|
'';
|
||||||
env = {
|
delete.filename = pkgs.writeDash "${name}-task-delete" ''
|
||||||
TASKDATA = "${stateDir}/${name}";
|
${pkgs.taskwarrior}/bin/task rc:${rcFile} delete "$1"
|
||||||
};
|
'';
|
||||||
filename = pkgs.writeDash "${name}-task-list" ''
|
done.filename = pkgs.writeDash "${name}-task-done" ''
|
||||||
${pkgs.taskwarrior}/bin/task rc:${rcFile} export | ${pkgs.jq}/bin/jq -r '.[] | select(.id != 0) | "\(.id) \(.description)"'
|
${pkgs.taskwarrior}/bin/task rc:${rcFile} done "$1"
|
||||||
'';
|
'';
|
||||||
};
|
|
||||||
delete = {
|
|
||||||
env = {
|
|
||||||
TASKDATA = "${stateDir}/${name}";
|
|
||||||
};
|
|
||||||
filename = pkgs.writeDash "${name}-task-delete" ''
|
|
||||||
${pkgs.taskwarrior}/bin/task rc:${rcFile} delete "$*"
|
|
||||||
'';
|
|
||||||
};
|
|
||||||
done = {
|
|
||||||
env = {
|
|
||||||
TASKDATA = "${stateDir}/${name}";
|
|
||||||
};
|
|
||||||
filename = pkgs.writeDash "${name}-task-done" ''
|
|
||||||
${pkgs.taskwarrior}/bin/task rc:${rcFile} done "$*"
|
|
||||||
'';
|
|
||||||
};
|
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user