summaryrefslogtreecommitdiff
path: root/.config/eww/scripts/datetime-listener
diff options
context:
space:
mode:
Diffstat (limited to '.config/eww/scripts/datetime-listener')
-rwxr-xr-x.config/eww/scripts/datetime-listener15
1 files changed, 7 insertions, 8 deletions
diff --git a/.config/eww/scripts/datetime-listener b/.config/eww/scripts/datetime-listener
index b10f4a5..b7c7fbd 100755
--- a/.config/eww/scripts/datetime-listener
+++ b/.config/eww/scripts/datetime-listener
@@ -1,11 +1,10 @@
#!/bin/sh
-while :
+stdbuf -oL -- tiktok \
+ '%A, %-d %B %Y — %T %Z' \
+ TZ=Europe/Helsinki ' (%H:%M %Z,' \
+ TZ=Pacific/Auckland ' %H:%M %Z)' \
+| while read line
do
- # {
- # date +'%A, %-d of %B %Y — %T %Z'
- # TZ='Asia/Kolkata' date +'(%T %Z)'
- # } | paste -sd ' '
- date +'%A, %-d of %B %Y — %T %Z'
- sleep "$(date +'%s.%N' | dc -e '? d 1 + 1 / r - p')"
-done | ordinal -p1
+ echo "$line" | ordinal -p '^\w+, (\d+)'
+done | sed 's/^./\U&/g'