summaryrefslogtreecommitdiff
path: root/.config
diff options
context:
space:
mode:
authorThomas Voss <mail@thomasvoss.com> 2025-11-08 21:31:13 +0100
committerThomas Voss <mail@thomasvoss.com> 2025-11-08 21:31:13 +0100
commit1545fb3601d69fb38e233c4da12e5da981ed65f4 (patch)
tree264505e314ba548b6f344b155fa0de6c7746a8d5 /.config
parentb4c2ab3aec75f683ddc2886f308c25d59c280df9 (diff)
eww: Add the week number to the clockHEADmaster
Diffstat (limited to '.config')
-rwxr-xr-x.config/eww/scripts/datetime-listener20
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+)'