I'm looking for help with a little project of mine. I'm looking to modify the cal command that I've seen used for calendars in GeekTool to create a horizontal calendar. I don't care about days of the week so much, I just think it would be interesting to have all of the days of the week listed out in order at the bottom of my screen, with the current one marked.
So, I need two things:
I need to strip out of the cal command the days of the week at the top (or repeat them the appropriate number of times, but I imagine that will be far more difficult) and the line breaks at the end of each week. This is the most important part.
Secondly, I'd like to find a way to add bars (like this: |) on either side of the current date without replacing the numbers as most of the calendars I've seen have done it.
Here's the code I've seen:
If I can just modify that to get what I want, that's fine, if I have to use something completely different, that's fine. I just would love to have a horizontal calendar.
jW
So, I need two things:
I need to strip out of the cal command the days of the week at the top (or repeat them the appropriate number of times, but I imagine that will be far more difficult) and the line breaks at the end of each week. This is the most important part.
Secondly, I'd like to find a way to add bars (like this: |) on either side of the current date without replacing the numbers as most of the calendars I've seen have done it.
Here's the code I've seen:
Code:
cal | sed "s/^/ /;s/$/ /;s/ $(date +%e) / $(date +%e | sed 's/././g') /"
If I can just modify that to get what I want, that's fine, if I have to use something completely different, that's fine. I just would love to have a horizontal calendar.
jW