update wtf dashboard

This commit is contained in:
Ingolf Wagner 2021-11-20 14:52:37 +01:00
parent 5fdd506356
commit e7432aa37a
No known key found for this signature in database
GPG key ID: 76BF5F1928B9618B

View file

@ -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 {