Display Date with GeekTool

Joined
Apr 21, 2011
Messages
2
Reaction score
0
Points
1
I'm trying to display a custom version of my iCal on my desktop via GeekTool that will show what I have going for the next seven days. Then only thing I'm having trouble with is displaying the date for any day other than today.

the code to display for today is

date '+%a %e %B'

that produces Thu 21 April

for the next day I would like "Fri 22 April" coded in a way so that it will update as the day changes.

I'll attach a picture of what I'm trying to accomplish
Picture 2.png

Notice the second Thu 21 April I would like to change
 
Joined
May 19, 2009
Messages
8,428
Reaction score
295
Points
83
Location
Waiting for a mate . . .
Your Mac's Specs
21" iMac 2.9Ghz 16GB RAM - 10.11.3, iPhone6s & iPad Air 2 - iOS 9.2.1, ATV 4Th Gen tvOS, ATV3
Hi and welcome to the forums E11

Edit : miss information.

Another possibility is to use 'echo' which when executed produces all characters after echo
echo Thu 21 April
echo Fri 22 April
echo Sat 23 April
echo Sun 24 April
echo Mon 25 April
echo Tue 26 April
echo Wed 27 April

The only problem though only small for you is to then set and change the dates every week, but now the way geek tool is so easy to use that shouldnt be a problem


Cheers
 

vansmith

Senior Member
Joined
Oct 19, 2008
Messages
19,924
Reaction score
559
Points
113
Location
Queensland
Your Mac's Specs
Mini (2014, 2018, 2020), MBA (2020), iPad Pro (2018), iPhone 13 Pro Max, Watch (S6)
Give this a try:
Code:
date -v+1d +"%a %e %B"
The -v switch adjusts the output value. Given that, the command I just wrote adjusts the output by one day (+1d).
 
Joined
May 19, 2009
Messages
8,428
Reaction score
295
Points
83
Location
Waiting for a mate . . .
Your Mac's Specs
21" iMac 2.9Ghz 16GB RAM - 10.11.3, iPhone6s & iPad Air 2 - iOS 9.2.1, ATV 4Th Gen tvOS, ATV3
^^^^ And there you go. I knew if i wrote some untruths van would pipe in with correct code lol



Cheers
 

vansmith

Senior Member
Joined
Oct 19, 2008
Messages
19,924
Reaction score
559
Points
113
Location
Queensland
Your Mac's Specs
Mini (2014, 2018, 2020), MBA (2020), iPad Pro (2018), iPhone 13 Pro Max, Watch (S6)
No worries TM - it took a bit of hunting around the man pages to figure that one out. ;)
 
OP
E
Joined
Apr 21, 2011
Messages
2
Reaction score
0
Points
1
Awesome vansmith that appears to be doing exactly what I want it to do.

Yeah TattooedMac the reason I didn't want it that way is exactly like you said I would have to go in and change it every week.

The way I have it set up now (hopefully) today will always be displayed in the far left column and the days will just cycle through the list so I will always be able to see 6 days ahead without ever editing anything besides my iCal.

This is for my terrible memory ;P
 

Shop Amazon


Shop for your Apple, Mac, iPhone and other computer products on Amazon.
We are a participant in the Amazon Services LLC Associates Program, an affiliate program designed to provide a means for us to earn fees by linking to Amazon and affiliated sites.
Top