From 786f9c22fab19de866566de4c7933aef416a1462 Mon Sep 17 00:00:00 2001 From: Justine Smithies Date: Wed, 11 Oct 2023 18:21:52 +0100 Subject: Switched to River --- .config/yambar/scripts/dater.sh | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100755 .config/yambar/scripts/dater.sh (limited to '.config/yambar/scripts/dater.sh') diff --git a/.config/yambar/scripts/dater.sh b/.config/yambar/scripts/dater.sh new file mode 100755 index 0000000..00d4b7e --- /dev/null +++ b/.config/yambar/scripts/dater.sh @@ -0,0 +1,26 @@ +#!/bin/sh + + +while true; do +number=$(date +'%d') + +case $number in + 1*)extension=th;; + *1)extension=st;; + *2)extension=nd;; + *3)extension=rd;; + *)extension=th;; +esac + +date=$(date +"%A $(printf ${number##0}$extension) %B %Y -") + +echo "date|string|$date" +echo "" + +hour=$(date +'%H') +minute=$(date +'%M') + +second=$(expr $hour \* 3600 + $minute \* 60) + +sleep "$second" +done -- cgit v1.2.3