diff --git a/system/desktop/wtf.nix b/system/desktop/wtf.nix index e0b0d63..7dfc43c 100644 --- a/system/desktop/wtf.nix +++ b/system/desktop/wtf.nix @@ -3,6 +3,14 @@ let unstable = import { }; + 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" '' ${pkgs.taskwarrior}/bin/task export +checklist status:pending +READY | \ ${pkgs.jq}/bin/jq \ @@ -120,7 +128,7 @@ let }; grid = { - columns = [ 33 40 36 0 ]; + columns = [ 33 12 28 36 0 ]; rows = [ 9 3 7 6 0 ]; }; @@ -141,6 +149,7 @@ let top = resourceusage { top = 0; left = 1; + width = 2; }; power = power { @@ -155,11 +164,12 @@ let title = "rates"; rates.NZD = [ "EUR" ]; rates.EUR = [ "NZD" ]; + refreshInterval = 3600; }; weather = prettyweather { top = 0; - left = 2; + left = 3; }; calendar = cmdRunner { @@ -169,7 +179,7 @@ let top = 1; left = 1; height = 2; - width = 2; + width = 3; refreshInterval = 3600; }; @@ -179,14 +189,14 @@ let top = 3; left = 1; height = 1; - width = 2; + width = 3; }; active-users = cmdRunner { title = "users"; cmd = activeUsers; top = 0; - left = 3; + left = 4; height = 4; width = 1; refreshInterval = 30; @@ -196,9 +206,19 @@ let title = "active tasks"; cmd = activeTasks; top = 4; + left = 2; + height = 1; + width = 3; + refreshInterval = 60; + }; + + next-week-tasks = cmdRunner { + title = "upcoming"; + cmd = taskNextWeek; + top = 4; left = 0; height = 1; - width = 4; + width = 2; refreshInterval = 60; }; };