summaryrefslogtreecommitdiff
path: root/.config/eww/scripts
diff options
context:
space:
mode:
Diffstat (limited to '.config/eww/scripts')
-rwxr-xr-x.config/eww/scripts/datetime-listener17
1 files changed, 12 insertions, 5 deletions
diff --git a/.config/eww/scripts/datetime-listener b/.config/eww/scripts/datetime-listener
index 53bcf9e..5fda3b3 100755
--- a/.config/eww/scripts/datetime-listener
+++ b/.config/eww/scripts/datetime-listener
@@ -1,9 +1,16 @@
#!/bin/sh
+# while true {
+# {
+# date +'%A, %-d of %B %Y — %T %Z'
+# env TZ=Asia/Kolkata date +'(%H:%M %Z)'
+# }
+# | paste -sd' '
+# sleep `date +%s.%N | dc -e '? d 1 + 1 / r - p'
+# } | ordinal -p1
+
while :
do
- date +"pretty='%A, %-d of %B %Y — %T %Z' month='%m'" \
- | ordinal -p1 \
- | xargs jo
- date +%s.%N | dc -e "? d 1 + 1 / r - p" | xargs sleep
-done
+ date +'%A, %-d of %B %Y — %T %Z' | paste -sd' '
+ sleep "$(date +'%s.%N' | dc -e '? d 1 + 1 / r - p')"
+done | ordinal -p1