diff options
| author | Thomas Voss <mail@thomasvoss.com> | 2025-11-08 21:31:13 +0100 |
|---|---|---|
| committer | Thomas Voss <mail@thomasvoss.com> | 2025-11-08 21:31:13 +0100 |
| commit | 1545fb3601d69fb38e233c4da12e5da981ed65f4 (patch) | |
| tree | 264505e314ba548b6f344b155fa0de6c7746a8d5 /.config/eww/scripts | |
| parent | b4c2ab3aec75f683ddc2886f308c25d59c280df9 (diff) | |
Diffstat (limited to '.config/eww/scripts')
| -rwxr-xr-x | .config/eww/scripts/datetime-listener | 20 |
1 files changed, 16 insertions, 4 deletions
diff --git a/.config/eww/scripts/datetime-listener b/.config/eww/scripts/datetime-listener index b7c7fbd..47d7031 100755 --- a/.config/eww/scripts/datetime-listener +++ b/.config/eww/scripts/datetime-listener @@ -1,9 +1,21 @@ #!/bin/sh -stdbuf -oL -- tiktok \ - '%A, %-d %B %Y — %T %Z' \ - TZ=Europe/Helsinki ' (%H:%M %Z,' \ - TZ=Pacific/Auckland ' %H:%M %Z)' \ +veckaord() +{ + case "${LANG:-LC_ALL}" in + sv_*.*) + echo vecka ;; + pt_*.*) + echo semana ;; + *) + echo Week ;; + esac +} + +stdbuf -oL -- tiktok \ + "%A, %-d %B %Y, $(veckaord) %V — %T %Z" \ + TZ=Europe/Helsinki ' (%H:%M %Z,' \ + TZ=Pacific/Auckland ' %H:%M %Z)' \ | while read line do echo "$line" | ordinal -p '^\w+, (\d+)' |