insanum / gcalcli

Google Calendar Command Line Interface
MIT License
3.31k stars 311 forks source link

Question: Can I remove certain calendars? #597

Closed jason-mehmel closed 2 weeks ago

jason-mehmel commented 3 years ago

There's one calendar that my account is linked to that I don't want to see when I use gcalcli.

I don't want to delete the calendar entirely, just remove it from the ones gcalcli lists when I run it.

Can I do that from the gcalcli command line?

Do I need to do it at the authorization level between Google Calendar and gcalcli?

jason-mehmel commented 3 years ago

I think I may have found what I'm looking for in the--calendar command, but I'm still not sure about usage.

Right now I can see all of the calendars that gcalci has access to, and I really only want to remove one.

Do I need to use --calendar and list every calendar I want to display, just omitting the one I'm not interested in?

Or is there a usage where I can hide or remove the calendar I don't want to see?

jason-mehmel commented 3 years ago

With the help of a redditor, I was able to find a command format that worked in terms of controlling which calendars the agenda shows: gcalcli --default-calendar 'EXAMPLE CALENDAR' --default-calendar 'EXAMPLE CALENDAR 2' --default-calendar 'EXAMPLE CALENDAR 3' agenda

What I did notice is that it stripped out the default colours of the agenda for some reason?

I am still having trouble trying to get that into the conky file to display inside that conky window. I've also tried adding them as details in the .gcalclirc file, to no avail. Again, I might be having a command format problem here.

Still working on this, but I did find one other solution: the --nostarted agenda option.

Part of what was happening was that I've got calendars logging my phone calls and articles I read in Pocket, which makes the agenda messy. But since most of these things are logged as they happen, the --nostarted feature only shows me things still ahead, so I'm not seeing the clutter.

(I'd still love to figure out a way to control the default calendars, particularly in my conky usage, in the situation where seeing my whole agenda for the day can still be valuable.)

The reddit post where I got some help: https://old.reddit.com/r/commandline/comments/n73fp1/any_gcalcli_tipssupport_looking_to_control_which/

dbarnett commented 2 weeks ago

Now you can! (From the latest repo version, or once I publish a 4.5 release)

See config examples at https://github.com/insanum/gcalcli?tab=readme-ov-file#configuration. This setting would look like:

[calendars]
ignore-calendars = ["Boring stuff", "Holidays"]