anufrievroman / calcure

Modern TUI calendar and task manager with minimal and customizable UI.
https://anufrievroman.gitbook.io/calcure
MIT License
1.55k stars 44 forks source link

Automatic reloading #92

Closed CyanMonkey closed 10 months ago

CyanMonkey commented 10 months ago

I have a cron job that runs vdirsyncer every 30 minutes to sync with a caldav server. However any new events/changes that are downloaded to my computer are not updated in calcure. I have to quit calcure and then reopen calcure for the new events to propagate.

I am planning to leave calcure running indefinitely in a tmux session with my MUA, neomutt, and detach and attach the session as needed.

Does anyone have any suggestions?

anufrievroman commented 10 months ago

I think it can be implemented. Would you prefer auto-reload every N minutes or reload upon key press? The little problem is that for some users it takes a long time to load huge ics files so it is not a default behavior.

Actually, I have exactly the same setup with tmux, neomutt etc, but most programs need to reloaded anyway, especially neomutt. But hopefully calcure will be more stable for long runs.

CyanMonkey commented 10 months ago

I think the reload every N minutes would be best for me but I would be happy with any implementation you can come up with.

Perhaps add in both but give the user the option to toggle the reload after N minutes?

anufrievroman commented 10 months ago

The most minimal implementation I could think of I just made in 4b44f3b5345373ccc5d01bf0c9527a344c71af59 Now pressing Q will reload ics user data. This will appear in the next version, or you can try by installing from main branch.

pipx install git+https://github.com/anufrievroman/calcure

About periodic reload I am not sure, I'll see how to better make it, because now we don't really measure past time in the program.

CyanMonkey commented 10 months ago

That will work for me, Thanks a bunch :)

anufrievroman commented 10 months ago

Okay, then I'll close the issue, thank you for your suggestion.