From e7432aa37a7e8cb3391bb59df1493904ca46e9b8 Mon Sep 17 00:00:00 2001 From: Ingolf Wagner Date: Sat, 20 Nov 2021 14:52:37 +0100 Subject: [PATCH] update wtf dashboard --- nixos/system/desktop/wtf.nix | 28 ++++++---------------------- 1 file changed, 6 insertions(+), 22 deletions(-) diff --git a/nixos/system/desktop/wtf.nix b/nixos/system/desktop/wtf.nix index acb0afd..c2a1b3a 100644 --- a/nixos/system/desktop/wtf.nix +++ b/nixos/system/desktop/wtf.nix @@ -37,14 +37,13 @@ let taskNextWeek = pkgs.writers.writeDash "taskweek" '' ${pkgs.taskwarrior}/bin/task \ - export \ - status:pending and \( due.before:7days and due.after:today \) \ + export "(due.before:today+7days and due.after:today)" \ | ${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.taskwarrior}/bin/task export status:pending and "( +ACTIVE or +DUETODAY or +TODAY or +OVERDUE )" | \ ${pkgs.jq}/bin/jq \ --raw-output ' sort_by(.description) | reverse | @@ -52,9 +51,6 @@ let "[ \( .id ) ] \( .description )" ' echo - ${pkgs.taskwarrior}/bin/task export \ - +ACTIVE status:pending \ - | ${pkgs.jq}/bin/jq --raw-output '.[] | "⇒ \(.id) \(.description)"' ''; userHighlight = map ({ user, ... }: user) @@ -96,17 +92,6 @@ let modules = { inherit cmdRunner; - # not working: had no time to investigate - #digitalclock = args@{ top, left, ... }: - # wtfModule ({ - # type = "digitalclock"; - # title = ""; - # color = "white"; - # font = "bigfont"; - # hourFormat = 24; - # refreshInterval = 1; - # } // args); - digitalclock = args@{ top, left, ... }: cmdRunner ({ cmd = pkgs.writers.writeDash "clock" '' @@ -128,7 +113,7 @@ let }; locations = { Berlin = "Europe/Berlin"; - Brazil = "America/Fortaleza"; + India = "Asia/Kolkata"; Wellington = "Pacific/Auckland"; }; sort = "alphabetical"; @@ -305,13 +290,12 @@ let }; rates = wtfModule { - type = "exchangerates"; + type = "yfinance"; top = 3; left = 0; title = "rates"; - rates.IDR = [ "EUR" ]; - rates.EUR = [ "IDR" ]; - refreshInterval = 3600; + symbols = [ "EURUSD=X" "EURNZD=X" ]; + refreshInterval = 60; }; weather = prettyweather {