#FIXME: Install khal calendar support in mutt NOT TESTED YET

apt install -y khal


# khal integration
# https://khal.readthedocs.io/en/latest/
# Khal is a standards based CLI (console) calendar program, able to synchronize with CalDAV servers through vdirsyncer.

TARGET="${1:-/etc/skel}"

cat <<-EOF sudo tee "${TARGET}/.config/khal/config"
[default]

default_calendar = Personligt
highlight_event_days = true

[view]

dynamic_days= false

[locale]

unicode_symbols = false
local_timezone = Europe/London
default_timezone = Europe/London
timeformat = %H:%M
dateformat = %d.%m
longdateformat = %d.%m.%Y

[calendars]

[[Personligt]]
  path = "${TARGET}"/.config/vdirsyncer/calendars/personligt/
  color = light cyan

[[Födelsedagar]]
  path = "${TARGET}"/.config/vdirsyncer/calendars/fdelsedagar/
  color = dark blue

[[Helgdagar]]
  path = "${TARGET}"/.config/vdirsyncer/calendars/helgdagar
  color = yellow
EOF
