Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Set colors for different calendars #40

Closed
ghost opened this issue Feb 21, 2023 · 6 comments
Closed

Set colors for different calendars #40

ghost opened this issue Feb 21, 2023 · 6 comments
Labels
Feature request New feature or request

Comments

@ghost
Copy link

ghost commented Feb 21, 2023

Just started to try out calcure, now that it supports .ics files.
I don't seem to find an option to configure specific colors for different calendars, i.e. green for my personal calendar, yellow for the shared family calendar.

@anufrievroman
Copy link
Owner

Welcome :)
It is not possible right now, but I'll implement it in the next version.

There was a small issue that the user would need to specify a list of colors, which must correspond to the list of files, and there should be some fool-proof algorithm what to do if something it not right. But I'll figure it out eventually.

Some thoughts about it:
I was thinking also that the issue is that color in calcure typically indicated the priority, like important/unimportant event. The solution I found so far is that there will be a parameter to sequentially assign colors to your calendars, but this will only be for the "normal" priority events (which are all events, as the priority is not implemented for events from ics yet). If priority is different from normal, it will still change the color to the corresponding color (like red for important).
The other solution would be to indicate calendar by some icon, or conversely indicate the priority with an icon.

@anufrievroman anufrievroman added the Feature request New feature or request label Feb 21, 2023
@anufrievroman anufrievroman changed the title request: set colors for different calendars Set colors for different calendars Feb 21, 2023
@ghost
Copy link
Author

ghost commented Feb 21, 2023

Thanks for sharing your thoughts! Here's mine: My usecase is that usually I look at my various personal, work and shared calendars on one mobile device or another. The "default" way to distingquish entries from multiple calendars in one view seems to be color. So having the same color assigned to the same calendar across all devices makes sense to me.

I get what you're saying about priorities though. If priority colors is what your users are used to, I wouldn't change it. But from a UX perspective, I wouldn't mix them up as well. Maybe do one with colors and the other with icons, consequently.

my 2 cents :)

@anufrievroman
Copy link
Owner

Note to myself

I tried to rewrite by parsing ics calendars into a list of object of class Collection instead of all into one Collection. The problem arises later when the entire program expects an object of class Collection at every View, not a list of them. Rewriting this way will require lots of (rather dirty) fixes everywhere, so I abandoned this approach.

Future plan

A better way might be just to add a property to each item indicating from which calendar it was imported, and coloring it accordingly. That could be a much easier fix, but might still require a rewrite in the future.

@anufrievroman
Copy link
Owner

Roughly implemented different colors for different ics calendars in 6cd24c0
Please update pip install --upgrade calcure and it should work out of the box. In your config, in Colors section, you can set your colors like:

color_ics_calendars = 2,4,6,3

i.e. list of colors for your ics calendars (not more than 10).

image

@ghost
Copy link
Author

ghost commented Mar 1, 2023

Ooooh that sounds great, thanks! I'll check it out in the next couple of days and get back to you

@ghost
Copy link
Author

ghost commented Mar 3, 2023

Seems to work fine :) thanks!

@ghost ghost closed this as completed Mar 3, 2023
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Feature request New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant