summaryrefslogtreecommitdiff
path: root/.config/eww/scripts
diff options
context:
space:
mode:
Diffstat (limited to '.config/eww/scripts')
-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+)'