From d8208d339023b3413614a0604d78dfaad5e3e131 Mon Sep 17 00:00:00 2001 From: Thomas Dehaeze Date: Mon, 9 Mar 2026 09:27:31 +0100 Subject: [PATCH] Update calendar and contacts config (vdirsyncer, khal, khard) --- calendar-contact.org | 59 ++++++++++++++++++++++++++++++++++++++------ 1 file changed, 51 insertions(+), 8 deletions(-) diff --git a/calendar-contact.org b/calendar-contact.org index 19d7d9c..e1e24de 100644 --- a/calendar-contact.org +++ b/calendar-contact.org @@ -14,7 +14,7 @@ status_path = "~/.config/vdirsyncer/status/" [pair radicale_calendar] a = "radicale_calendar_remote" b = "radicale_calendar_local" -collections = ["76bfc802-3186-e3af-f688-7e165115b4f8", "f78f1649-b54e-7bfe-488d-6a7005a5aa2f", "627e2bee-7d6a-49dc-128e-fc7a8aed1e8b"] +collections = ["76bfc802-3186-e3af-f688-7e165115b4f8", "627e2bee-7d6a-49dc-128e-fc7a8aed1e8b"] conflict_resolution = "a wins" [storage radicale_calendar_remote] @@ -45,6 +45,23 @@ type = "filesystem" path = "~/.local/share/calendars/esrf/" fileext = ".ics" +[pair google_calendar] +a = "google_calendar_remote" +b = "google_calendar_local" +collections = ["af20a7c01c81f7b39b68606db931d7fd9db7d61fe58033f96926107f95a59ae6@group.calendar.google.com"] +conflict_resolution = "a wins" + +[storage google_calendar_remote] +type = "google_calendar" +token_file = "~/.local/share/calendars/google/credentials.txt" +client_id = "188415318767-802h28ig8gromo0f72blrbg6cgcop6m8.apps.googleusercontent.com" +client_secret = <> + +[storage google_calendar_local] +type = "filesystem" +path = "~/.local/share/calendars/google/" +fileext = ".ics" + [pair radicale_contacts] a = "radicale_contacts_remote" b = "radicale_contacts_local" @@ -76,12 +93,8 @@ password.fetch = ["command", "~/.local/bin/get-pass", "radicale.tdehaeze.xyz/tde path = ~/.local/share/calendars/radicale/76bfc802-3186-e3af-f688-7e165115b4f8/ color = "#B8BB26" # Green -[[Orgmode]] -path = ~/.local/share/calendars/radicale/627e2bee-7d6a-49dc-128e-fc7a8aed1e8b/ -color = "#D3869B" # aqua - -[[Thesis]] -path = ~/.local/share/calendars/radicale/f78f1649-b54e-7bfe-488d-6a7005a5aa2f/ +[[Coloc]] +path = ~/.local/share/calendars/google/af20a7c01c81f7b39b68606db931d7fd9db7d61fe58033f96926107f95a59ae6@group.calendar.google.com/ color = "#FB4934" # Red [[ESRF]] @@ -93,8 +106,12 @@ path = ~/.local/share/contacts/98ee5e2c-afcf-70e0-c4a2-9fb9de2e97b7/ color = "#D3869B" # aqua type = birthdays +[view] +theme = dark + [highlight_days] -multiple = "#FABD2F" # Yellow +method = fg +multiple = "#FABD2F" [default] highlight_event_days = True @@ -197,3 +214,29 @@ if [[ -f $1 ]]; then fi fi #+end_src + +* =winmail-add= - Add =winmail.dat= files (Outlook) to Khal +:PROPERTIES: +:CUSTOM_ID: winmail-add +:header-args:bash: :comments both :mkdirp yes +:header-args:bash+: :shebang "#!/usr/bin/env bash" +:header-args:bash+: :tangle-mode (identity #o555) +:header-args:bash+: :tangle ~/.local/bin/winmail-add +:END: + +#+begin_src bash +if [[ -f $1 ]]; then + # Convert to ICS + icsfilename=`ytnef -f /tmp $1` + resp=$(echo -e "yes\nno" | rofi -i -only-match -dmenu -p "Would you like to add the event:" -mesg "`khal printics \"$icsfilename\" | tail -n +2`") + + if [[ "$resp" == "yes" ]]; then + calendar=$(echo "`khal printcalendars`" | rofi -i -only-match -dmenu -p "Save to:") + if [ -z "$calendar" ]; then + exit; + fi + khal import -a "$calendar" --batch "$icsfilename" && \ + dunstify "Calendar" "Even added"; + fi +fi +#+end_src