From e37815736000185c9d1268894c0a35a91b7ebae4 Mon Sep 17 00:00:00 2001 From: Justine Smithies Date: Tue, 4 Nov 2025 20:35:38 +0000 Subject: Initial commit --- .config/polybar/scripts/date-time.sh | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100755 .config/polybar/scripts/date-time.sh (limited to '.config/polybar/scripts/date-time.sh') diff --git a/.config/polybar/scripts/date-time.sh b/.config/polybar/scripts/date-time.sh new file mode 100755 index 0000000..a84d54c --- /dev/null +++ b/.config/polybar/scripts/date-time.sh @@ -0,0 +1,14 @@ +#!/bin/sh +DaySuffix() { + case $day in + 1|21|31) echo "st";; + 2|22) echo "nd";; + 3|23) echo "rd";; + *) echo "th";; + esac +} + +day=$(date +%d | sed 's/^0*//') +text=$(date "+%A $day$(DaySuffix) %B %Y - %H:%M") + +echo "$text " -- cgit v1.2.3