wtf: add taskweek with upcoming events
This commit is contained in:
parent
7b319051db
commit
c7ee7d395a
1 changed files with 26 additions and 6 deletions
|
@ -3,6 +3,14 @@ let
|
||||||
|
|
||||||
unstable = import <nixpkgs-unstable> { };
|
unstable = import <nixpkgs-unstable> { };
|
||||||
|
|
||||||
|
taskNextWeek = pkgs.writers.writeDash "taskweek" ''
|
||||||
|
${pkgs.taskwarrior}/bin/task \
|
||||||
|
export \
|
||||||
|
status:pending and \( due.before:6days \) \
|
||||||
|
| ${pkgs.jq}/bin/jq '[.[] | { Day: .due, ID: .id, Description: .description | sub("\n.*";"")} ] | sort_by(.Day)' \
|
||||||
|
| ${pkgs.miller}/bin/mlr --ijson --opprint put '$Day = strftime(strptime($Day,"%Y%m%dT%H%M%SZ")'$(date +%z)'00,"%a")'
|
||||||
|
'';
|
||||||
|
|
||||||
activeTasks = pkgs.writers.writeBash "active-tasks" ''
|
activeTasks = pkgs.writers.writeBash "active-tasks" ''
|
||||||
${pkgs.taskwarrior}/bin/task export +checklist status:pending +READY | \
|
${pkgs.taskwarrior}/bin/task export +checklist status:pending +READY | \
|
||||||
${pkgs.jq}/bin/jq \
|
${pkgs.jq}/bin/jq \
|
||||||
|
@ -120,7 +128,7 @@ let
|
||||||
};
|
};
|
||||||
|
|
||||||
grid = {
|
grid = {
|
||||||
columns = [ 33 40 36 0 ];
|
columns = [ 33 12 28 36 0 ];
|
||||||
rows = [ 9 3 7 6 0 ];
|
rows = [ 9 3 7 6 0 ];
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -141,6 +149,7 @@ let
|
||||||
top = resourceusage {
|
top = resourceusage {
|
||||||
top = 0;
|
top = 0;
|
||||||
left = 1;
|
left = 1;
|
||||||
|
width = 2;
|
||||||
};
|
};
|
||||||
|
|
||||||
power = power {
|
power = power {
|
||||||
|
@ -155,11 +164,12 @@ let
|
||||||
title = "rates";
|
title = "rates";
|
||||||
rates.NZD = [ "EUR" ];
|
rates.NZD = [ "EUR" ];
|
||||||
rates.EUR = [ "NZD" ];
|
rates.EUR = [ "NZD" ];
|
||||||
|
refreshInterval = 3600;
|
||||||
};
|
};
|
||||||
|
|
||||||
weather = prettyweather {
|
weather = prettyweather {
|
||||||
top = 0;
|
top = 0;
|
||||||
left = 2;
|
left = 3;
|
||||||
};
|
};
|
||||||
|
|
||||||
calendar = cmdRunner {
|
calendar = cmdRunner {
|
||||||
|
@ -169,7 +179,7 @@ let
|
||||||
top = 1;
|
top = 1;
|
||||||
left = 1;
|
left = 1;
|
||||||
height = 2;
|
height = 2;
|
||||||
width = 2;
|
width = 3;
|
||||||
refreshInterval = 3600;
|
refreshInterval = 3600;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -179,14 +189,14 @@ let
|
||||||
top = 3;
|
top = 3;
|
||||||
left = 1;
|
left = 1;
|
||||||
height = 1;
|
height = 1;
|
||||||
width = 2;
|
width = 3;
|
||||||
};
|
};
|
||||||
|
|
||||||
active-users = cmdRunner {
|
active-users = cmdRunner {
|
||||||
title = "users";
|
title = "users";
|
||||||
cmd = activeUsers;
|
cmd = activeUsers;
|
||||||
top = 0;
|
top = 0;
|
||||||
left = 3;
|
left = 4;
|
||||||
height = 4;
|
height = 4;
|
||||||
width = 1;
|
width = 1;
|
||||||
refreshInterval = 30;
|
refreshInterval = 30;
|
||||||
|
@ -196,9 +206,19 @@ let
|
||||||
title = "active tasks";
|
title = "active tasks";
|
||||||
cmd = activeTasks;
|
cmd = activeTasks;
|
||||||
top = 4;
|
top = 4;
|
||||||
|
left = 2;
|
||||||
|
height = 1;
|
||||||
|
width = 3;
|
||||||
|
refreshInterval = 60;
|
||||||
|
};
|
||||||
|
|
||||||
|
next-week-tasks = cmdRunner {
|
||||||
|
title = "upcoming";
|
||||||
|
cmd = taskNextWeek;
|
||||||
|
top = 4;
|
||||||
left = 0;
|
left = 0;
|
||||||
height = 1;
|
height = 1;
|
||||||
width = 4;
|
width = 2;
|
||||||
refreshInterval = 60;
|
refreshInterval = 60;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in a new issue