2021-04-25 19:10:57 +02:00
#+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", "f78f1649-b54e-7bfe-488d-6a7005a5aa2f"]
conflict_resolution = "a wins"
[storage radicale_calendar_remote]
type = "caldav"
url = "https://radicale.tdehaeze.xyz/tdehaeze/ "
username = "tdehaeze"
2022-02-06 21:41:58 +01:00
password.fetch = ["command", "get-pass", "radicale.tdehaeze.xyz/tdehaeze"]
2021-04-25 19:10:57 +02:00
[storage radicale_calendar_local]
type = "filesystem"
path = "~/.calendars/radicale/ "
fileext = ".ics"
2021-04-27 15:45:51 +02:00
[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"
2022-02-06 21:41:58 +01:00
password.fetch = ["command", "get-pass", "esrf.fr/dehaeze"]
2021-04-27 15:45:51 +02:00
[storage esrf_calendar_local]
type = "filesystem"
path = "~/.calendars/esrf/ "
fileext = ".ics"
2021-04-25 19:10:57 +02:00
[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 = "~/.contacts/ "
fileext = ".vcf"
[storage radicale_contacts_remote]
type = "carddav"
url = "https://radicale.tdehaeze.xyz/tdehaeze/ "
username = "tdehaeze"
2022-02-06 21:41:58 +01:00
password.fetch = ["command", "get-pass", "radicale.tdehaeze.xyz/tdehaeze"]
2021-04-25 19:10:57 +02:00
#+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 = ~/.calendars/radicale/76bfc802-3186-e3af-f688-7e165115b4f8/
2021-04-27 15:45:51 +02:00
color = "#B8BB26" # Green
2021-04-25 19:10:57 +02:00
[[Thesis ]]
path = ~/.calendars/radicale/f78f1649-b54e-7bfe-488d-6a7005a5aa2f/
2021-04-27 15:45:51 +02:00
color = "#FB4934" # Red
[[ESRF ]]
path = ~/.calendars/esrf/calendar/
color = "#83A598" # Blue
2021-04-25 19:10:57 +02:00
2021-05-02 11:27:39 +02:00
[[Birthdays ]]
path = ~/.contacts/98ee5e2c-afcf-70e0-c4a2-9fb9de2e97b7/
color = "#D3869B" # aqua
type = birthdays
2021-04-25 19:10:57 +02:00
[highlight_days]
2021-04-27 15:45:51 +02:00
multiple = "#FABD2F" # Yellow
2021-04-25 19:10:57 +02:00
[default]
highlight_event_days = True
[locale]
local_timezone= Europe/Berlin
default_timezone= Europe/Berlin
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 = ~/.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 = yes
# 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
2021-10-25 14:23:15 +02:00
* =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 && \
2022-02-06 21:45:41 +01:00
notify-send --hint=string:x-dunst-stack-tag:fJeNG8gc "Calendar" "Even added";
2021-10-25 14:23:15 +02:00
fi
fi
#+end_src