#+TITLE:Calendar and Contact Configuration #+SETUPFILE: ./setup/org-setup-file.org * =vdirsyncer= - Synchronize calendars and contacts :PROPERTIES: :header-args: :tangle ~/.config/vdirsyncer/config :header-args+: :comments both :mkdirp yes :noweb no-export :END: #+BEGIN_SRC conf [general] status_path = "~/.config/vdirsyncer/status/" [pair radicale_calendar] a = "radicale_calendar_remote" b = "radicale_calendar_local" collections = ["76bfc802-3186-e3af-f688-7e165115b4f8", "627e2bee-7d6a-49dc-128e-fc7a8aed1e8b"] conflict_resolution = "a wins" [storage radicale_calendar_remote] type = "caldav" url = "https://radicale.tdehaeze.xyz/tdehaeze/" username = "tdehaeze" password.fetch = ["command", "~/.local/bin/get-pass", "radicale.tdehaeze.xyz/tdehaeze"] [storage radicale_calendar_local] type = "filesystem" path = "~/.local/share/calendars/radicale/" fileext = ".ics" [pair esrf_calendar] a = "esrf_calendar_remote" b = "esrf_calendar_local" collections = ["calendar"] conflict_resolution = "a wins" [storage esrf_calendar_remote] type = "caldav" url = "https://calendar.esrf.fr/egroupware/groupdav.php/calendar" username = "dehaeze" password.fetch = ["command", "~/.local/bin/get-pass", "esrf.fr/dehaeze"] [storage esrf_calendar_local] 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" collections = ["98ee5e2c-afcf-70e0-c4a2-9fb9de2e97b7"] conflict_resolution = "a wins" [storage radicale_contacts_local] type = "filesystem" path = "~/.local/share/contacts/" fileext = ".vcf" [storage radicale_contacts_remote] type = "carddav" url = "https://radicale.tdehaeze.xyz/tdehaeze/" username = "tdehaeze" password.fetch = ["command", "~/.local/bin/get-pass", "radicale.tdehaeze.xyz/tdehaeze"] #+END_SRC * =khal= - CLI calendar application :PROPERTIES: :header-args: :tangle ~/.config/khal/config :header-args+: :comments both :mkdirp yes :END: #+BEGIN_SRC conf [calendars] [[Home]] path = ~/.local/share/calendars/radicale/76bfc802-3186-e3af-f688-7e165115b4f8/ color = "#B8BB26" # Green [[Coloc]] path = ~/.local/share/calendars/google/af20a7c01c81f7b39b68606db931d7fd9db7d61fe58033f96926107f95a59ae6@group.calendar.google.com/ color = "#FB4934" # Red [[ESRF]] path = ~/.local/share/calendars/esrf/calendar/ color = "#83A598" # Blue [[Birthdays]] path = ~/.local/share/contacts/98ee5e2c-afcf-70e0-c4a2-9fb9de2e97b7/ color = "#D3869B" # aqua type = birthdays [view] theme = dark [highlight_days] method = fg multiple = "#FABD2F" [default] highlight_event_days = True [locale] local_timezone= Europe/Berlin default_timezone= Europe/Berlin weeknumbers= left timeformat= %H:%M dateformat= %d.%m. longdateformat= %d.%m.%Y datetimeformat= %d.%m. %H:%M longdatetimeformat= %d.%m.%Y %H:%M [keybindings] delete = d today = . new = c #+END_SRC * =khard= - CLI contact application :PROPERTIES: :header-args: :tangle ~/.config/khard/khard.conf :header-args+: :comments both :mkdirp yes :END: #+BEGIN_SRC conf [addressbooks] [[contacts]] path = ~/.local/share/contacts//98ee5e2c-afcf-70e0-c4a2-9fb9de2e97b7/ [general] debug = no default_action = list editor = vim merge_editor = vimdiff [contact table] # display names by first or last name: first_name / last_name display = first_name # group by address book: yes / no group_by_addressbook = no # reverse table ordering: yes / no reverse = no # append nicknames to name column: yes / no show_nicknames = no # show uid table column: yes / no show_uids = no # sort by first or last name: first_name / last_name sort = last_name # localize dates: yes / no localize_dates = yes # set a comma separated list of preferred phone number types in descending priority # or nothing for non-filtered alphabetical order preferred_phone_number_type = pref, cell, home # set a comma separated list of preferred email address types in descending priority # or nothing for non-filtered alphabetical order preferred_email_address_type = pref, work, home [vcard] # extend contacts with your own private objects # these objects are stored with a leading "X-" before the object name in the vcard files # every object label may only contain letters, digits and the - character # example: # private_objects = Jabber, Skype, Twitter private_objects = Jabber, Skype, Twitter # preferred vcard version: 3.0 / 4.0 preferred_version = 3.0 # Look into source vcf files to speed up search queries: yes / no search_in_source_files = no # skip unparsable vcard files: yes / no skip_unparsable = no #+END_SRC * =ics-add= - Add ICS file to Khal :PROPERTIES: :CUSTOM_ID: ics-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/ics-add :END: This function is useful to easily add an event to =khal=. It is for instance used in the =mutt= configuration. To share an event by email, the currently best way to proceed is to first find the event on =khal=, press =e= to export it to a file, and then add this file as an attachment. #+begin_src bash if [[ -f $1 ]]; then resp=$(echo -e "yes\nno" | rofi -i -only-match -dmenu -p "Would you like to add the event:" -mesg "`khal printics \"$1\" | 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 "$1" && \ dunstify "Calendar" "Even added"; 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