calendar now looks a little better

main
The_miro 2025-10-23 19:26:09 +02:00
parent feef445ea6
commit 6d3813498a
1 changed files with 27 additions and 0 deletions

View File

@ -0,0 +1,27 @@
#!/bin/bash
today=$(date +%-d)
weekdaynum=$(date +%u)
weekday=""
if [[ $weekdaynum -eq 1 ]]; then
weekday="Mo"
elif [[ $weekdaynum -eq 2 ]]; then
weekday="Tu"
elif [[ $weekdaynum -eq 3 ]]; then
weekday="We"
elif [[ $weekdaynum -eq 4 ]]; then
weekday="Th"
elif [[ $weekdaynum -eq 5 ]]; then
weekday="Fr"
elif [[ $weekdaynum -eq 6 ]]; then
weekday="Sa"
elif [[ $weekdaynum -eq 7 ]]; then
weekday="Su"
fi
#echo $weekday
cal -m | sed "s/\b $today \b/[$today]/" | sed "s/\b $weekday \b/[$weekday]/"