diff options
author | Justine Smithies <justine@smithies.me.uk> | 2025-06-15 12:38:40 +0100 |
---|---|---|
committer | Justine Smithies <justine@smithies.me.uk> | 2025-06-15 12:38:40 +0100 |
commit | b90ad8355b4b71ad328aba0943a62a123fb5b88d (patch) | |
tree | 58d8bba26b6a2a866af4abe138961adb2c32e9d3 /.config/waybar/scripts/date-time.sh | |
parent | d029adec94282882510be0d4398709a818b880ad (diff) |
Initial commit for MaomaoWM - Still a WIP
Diffstat (limited to '.config/waybar/scripts/date-time.sh')
-rwxr-xr-x | .config/waybar/scripts/date-time.sh | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/.config/waybar/scripts/date-time.sh b/.config/waybar/scripts/date-time.sh new file mode 100755 index 0000000..6ce5e30 --- /dev/null +++ b/.config/waybar/scripts/date-time.sh @@ -0,0 +1,12 @@ +#!/bin/sh +DaySuffix() { + case `date +%-d` in + 1|21|31) echo "st";; + 2|22) echo "nd";; + 3|23) echo "rd";; + *) echo "th";; + esac +} +text=$(date "+%A %-d`DaySuffix` %B %Y - %H:%M ") + +echo "{\"text\":\""$text"\", \"tooltip\":\""$tooltip"\"}" |