diff options
| author | Justine Smithies <justine@smithies.me.uk> | 2025-11-04 20:35:38 +0000 |
|---|---|---|
| committer | Justine Smithies <justine@smithies.me.uk> | 2025-11-04 20:35:38 +0000 |
| commit | e37815736000185c9d1268894c0a35a91b7ebae4 (patch) | |
| tree | 3eae1dfc79aad9e8ee516c626dd2458394ea9dd3 /.config/polybar/scripts/date-time.sh | |
| parent | b74a7ba7009505ce71373833ccc20bdc54801158 (diff) | |
Initial commit
Diffstat (limited to '.config/polybar/scripts/date-time.sh')
| -rwxr-xr-x | .config/polybar/scripts/date-time.sh | 14 |
1 files changed, 14 insertions, 0 deletions
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 " |
