diff options
| author | tv <tv@krebsco.de> | 2023-01-29 13:13:19 +0100 | 
|---|---|---|
| committer | tv <tv@krebsco.de> | 2023-01-29 13:13:19 +0100 | 
| commit | 2b38d03b4a1c939c5c961c4d6c979f7b11f532d8 (patch) | |
| tree | eb22c21753bfd64da5c5ba5f901437d1c77a685e | |
| parent | cae35fec418b5d7c80acd699ae9c3a15bca368c6 (diff) | |
tv q: streamline dates and use RGB
| -rw-r--r-- | tv/5pkgs/simple/q/default.nix | 22 | 
1 files changed, 10 insertions, 12 deletions
| diff --git a/tv/5pkgs/simple/q/default.nix b/tv/5pkgs/simple/q/default.nix index eb8462d..a7a149d 100644 --- a/tv/5pkgs/simple/q/default.nix +++ b/tv/5pkgs/simple/q/default.nix @@ -34,22 +34,20 @@ let      '    ''; -  q-isodate = /* sh */ '' +  q-isodate = TZ: color: /* sh */ '' +    TZ=${shell.escape TZ} \      ${pkgs.coreutils}/bin/date \ -        '+[1m%Y-%m-%d[;30mT[;38;5;085m%H:%M[m:%S%:z' +        '+[m%Y-%m-%d[38;5;243mT[;'${shell.escape color}'m%H:%M[38;5;243m:[m%S%:z'    ''; +  q-deudate = q-isodate "Europe/Berlin" "38;5;085"; +    # Singapore's red is #ED2E38 -  q-sgtdate = /* sh */ '' -    TZ=Asia/Singapore \ -    ${pkgs.coreutils}/bin/date \ -        '+[1m%Y-%m-%d[;30mT[;38;5;088m%H:%M[m:%S%:z' -  ''; +  q-sgtdate = q-isodate "Asia/Singapore" "38;2;237;46;56"; -  q-utcdate = /* sh */ '' -    ${pkgs.coreutils}/bin/date -u \ -        '+[1m%Y-%m-%d[;30mT[;38;5;065m%H:%M[m:%S%:z' -  ''; +  q-thadate = q-isodate "Asia/Bangkok" "38;5;226"; + +  q-utcdate = q-isodate "UTC" "38;5;065";    q-gitdir = /* sh */ ''      if test -d .git; then @@ -148,7 +146,7 @@ pkgs.writeBashBin "q" ''    export PATH=/var/empty    ${q-cal}    ${q-utcdate} -  ${q-isodate} +  ${q-deudate}    ${q-sgtdate}    (${q-gitdir}) &    (${q-intel_backlight}) & | 
