gcalcli icon indicating copy to clipboard operation
gcalcli copied to clipboard

How do I change the length of time in 'agenda?'

Open jason-mehmel opened this issue 4 years ago • 4 comments

Loving this program! I've got it set up to show my agenda in a Conky on my desktop, and it's great!

One thing I could use is the ability to see more than 5 days ahead. Looking at the man page, I see you can set dates for the agenda, but not (as far as I can see) the length of time. Is there a command I'm missing?

(I'd love to have a full 7 days ahead at any time.)

jason-mehmel avatar Apr 14 '21 20:04 jason-mehmel

Yes, add [start] [stop] arguments to the agenda command using one of the accepted structures for a date.

e.g. gcalcli agenda 'May 5 2021 12:00am' 'May 13 2021 12:00am' would give you eight days.

This page describes how to use the [start] [stop] arguments to get 7 days https://manpages.ubuntu.com/manpages/xenial/man1/gcalcli.1.html

tyleraclark avatar May 05 '21 18:05 tyleraclark

Is there a non-date-specific way to do it?

For example --eightdayagenda instead of specific dates?

Because I've got this running in my conky, I would love for it to ALWAYS be looking a certain amount of days ahead, not just 5. And I can imagine a use-case where you'd want less, too! Like just one day, for 'today's agenda.'

jason-mehmel avatar May 05 '21 18:05 jason-mehmel

I don't believe so. I am trying to "hack" a similar solution where I only want to see events in the next hour. I am not familiar with conky, but here is CLI invocation I am working with:

gcalcli agenda "$(date '+%b %d %Y %H:%m')" "$(date -d "$date +1 hour" '+%b %d %Y %H:%m')"

which makes [start] the current time and [end] exactly one hour from now. i am sure you could deploy similar Tactics to get 8 days

tyleraclark avatar May 05 '21 18:05 tyleraclark

There is already a function that takes an agenda_length argument of 5, could we just expose this through the cli arguments?

dstengle avatar Dec 15 '23 15:12 dstengle