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!

blankWas this post helpful or insightful? Buy me a coffee here or here and share this post with others!

Popular posts:

  • The difference between boundaries and rules
  • Two Ways to get CMYK Separation Using GIMP Instead of Photoshop in 2022
  • Word Porn Quotes
  • Weekend Project: Whole House and Streaming Audio for Free with MPD
  • Organizing and Tiling Your Windows on #Openbox Using Only... Openbox
  • Odds and Ends: Optimizing SSHFS, moving files into subdirectories, and getting placeholder images

Recent Posts