Agendas, Google, and Zenity

technology.pngI really, really like Zenity. This guide – while a definite go-to resource – only hints at the power therein.

For example, there’s the GoogleCL interface. Once set up, you have a way to automatically get your agenda for the day. But I don’t want that to show up every time I open a terminal window… but I need it in my face. Enter two quick scripts. (WATCH FOR LINE WRAP)

This one gives you the agenda for any day you select on a graphically displayed calendar (defaults to the current day):

alias agenda2=’bob=$(zenity –calendar –text “Pick a day” –title “Google Agenda” –date-format=%Y-%m-%d); agenda=$(google calendar list –date “$bob”);zenity –info –title “Agenda” –text “Events for that day:n$agenda”‘

It gets the date from the zenity calendar dialog and returns an info box with that day’s events. If you’re slick, you could put in a quick test for nothing being returned, but hey.

Here’s one that’s appropriate for being called upon login:

alias agenda=’bob=`date +%Y-%m-%d`;daytwo=`date –date=”-2 days ago” +%Y-%m-%d`; agenda=$(google calendar list –date “$bob”,”$daytwo”);zenity –info –title “Your Life” –text “$agenda”‘

This gives you two day’s worth of agenda items from your default calendar (that’s what the “daytwo” bit is). Play with them and see what you can come up with!

Popular posts:

  • Link Salad: References From The Digital Publishing Talk
  • Who Knew - A 100 Word Story
  • Quantity, quality, and Alliteration Ink's increased publication schedule for 2014
  • Are You Built For Monogamy, Or Should You Trust An Expert Outside of Their Field? (ATTN @drroshiniraj )
  • Gods - A 100 Word Story
  • A Mess of Reviewing Going On
  • The Only Thing That Needs To Be Said About A Gay Character In Beauty And The Beast