Add khalel and config to sync ics files into org-agenda

Updage khal format strings to work with khalel

Remove syncing display name as contact birthdays messes with khalel
tagging (because of the space)
This commit is contained in:
Evie Litherland-Smith 2023-10-30 07:03:37 +00:00
parent e3f5714001
commit fee71e703c
3 changed files with 19 additions and 3 deletions

View file

@ -3,7 +3,16 @@
{ {
programs = { programs = {
vdirsyncer.enable = true; vdirsyncer.enable = true;
khal.enable = true; khal = {
enable = true;
locale = {
timeformat = "%H:%M";
dateformat = "%Y-%m-%d";
longdateformat = "%Y-%m-%d %a";
datetimeformat = "%Y-%m-%d %H:%M";
longdatetimeformat = "%Y-%m-%d %H:%M";
};
};
}; };
services.vdirsyncer.enable = true; services.vdirsyncer.enable = true;
accounts.calendar = { accounts.calendar = {
@ -32,7 +41,7 @@
vdirsyncer = { vdirsyncer = {
enable = lib.mkDefault true; enable = lib.mkDefault true;
collections = [ "from a" ]; collections = [ "from a" ];
metadata = [ "color" "displayname" ]; metadata = [ "color" ];
}; };
khal = { khal = {
inherit (vdirsyncer) enable; inherit (vdirsyncer) enable;
@ -52,7 +61,6 @@
vdirsyncer = { vdirsyncer = {
enable = lib.mkDefault emailConfig.mbsync.enable; enable = lib.mkDefault emailConfig.mbsync.enable;
collections = [ "Work" "Operations" ]; collections = [ "Work" "Operations" ];
metadata = [ "displayname" ];
}; };
khal = { khal = {
inherit (vdirsyncer) enable; inherit (vdirsyncer) enable;

View file

@ -49,4 +49,11 @@
:emptry-lines 1) :emptry-lines 1)
)) ))
(when (require 'khalel nil :noerror)
(setq khalel-import-org-file-read-only nil
khalel-import-org-file (expand-file-name "calendar.org" org-directory)
khalel-import-start-date "-30d"
khalel-import-end-date "+30d")
(khalel-add-capture-template "e"))
(provide 'custom-org-config) (provide 'custom-org-config)

View file

@ -55,6 +55,7 @@
org-cliplink org-cliplink
org-journal org-journal
org-modern org-modern
khalel
# project-packages # project-packages
magit magit