From 964a5a3c30e100b800709cbd7476acd41ec2e14e Mon Sep 17 00:00:00 2001 From: Bruno Carlin Date: Fri, 12 Jun 2020 10:46:35 +0200 Subject: [PATCH] add conf for vdirsyncer and khal --- bin/.local/bin/syncagenda | 3 ++ khal/.config/khal/config | 29 ++++++++++++++ .../.config/systemd/user/syncagenda.service | 6 +++ systemd/.config/systemd/user/syncagenda.timer | 11 ++++++ .../user/timers.target.wants/syncagenda.timer | 1 + vdirsyncer/.config/vdirsyncer/config | 38 +++++++++++++++++++ 6 files changed, 88 insertions(+) create mode 100755 bin/.local/bin/syncagenda create mode 100644 khal/.config/khal/config create mode 100644 systemd/.config/systemd/user/syncagenda.service create mode 100644 systemd/.config/systemd/user/syncagenda.timer create mode 120000 systemd/.config/systemd/user/timers.target.wants/syncagenda.timer create mode 100644 vdirsyncer/.config/vdirsyncer/config diff --git a/bin/.local/bin/syncagenda b/bin/.local/bin/syncagenda new file mode 100755 index 0000000..f248db9 --- /dev/null +++ b/bin/.local/bin/syncagenda @@ -0,0 +1,3 @@ +#!/usr/bin/env bash + +vdirsyncer sync diff --git a/khal/.config/khal/config b/khal/.config/khal/config new file mode 100644 index 0000000..8f4cfe3 --- /dev/null +++ b/khal/.config/khal/config @@ -0,0 +1,29 @@ +[calendars] + +[[waarp]] + path = ~/.local/share/agendas/waarp/bruno.carlin@waarp.org + color = yellow + priority = 20 + +[[perso]] + path = ~/.local/share/agendas/perso/default + color = dark green + priority = 20 + +[[driss]] + path = ~/.local/share/agendas/waarp/driss.demiray@waarp.org + color = light gray + priority = 20 + +[locale] +timeformat = %H:%M +dateformat = %Y-%m-%d +longdateformat = %Y-%m-%d +datetimeformat = %Y-%m-%d %H:%M +longdatetimeformat = %Y-%m-%d %H:%M + +[default] +highlight_event_days = True + +[view] +frame = color diff --git a/systemd/.config/systemd/user/syncagenda.service b/systemd/.config/systemd/user/syncagenda.service new file mode 100644 index 0000000..bb36189 --- /dev/null +++ b/systemd/.config/systemd/user/syncagenda.service @@ -0,0 +1,6 @@ +[Unit] +Description=Synchronize local cache for remote agendas + +[Service] +Type=oneshot +ExecStart=/home/bca/.local/bin/syncagenda diff --git a/systemd/.config/systemd/user/syncagenda.timer b/systemd/.config/systemd/user/syncagenda.timer new file mode 100644 index 0000000..bf78dc2 --- /dev/null +++ b/systemd/.config/systemd/user/syncagenda.timer @@ -0,0 +1,11 @@ +[Unit] +Description=Calendars synchronization timer + +[Timer] +OnBootSec=2m +OnUnitActiveSec=5m +Persistent=true +Unit=syncagenda.service + +[Install] +WantedBy=timers.target diff --git a/systemd/.config/systemd/user/timers.target.wants/syncagenda.timer b/systemd/.config/systemd/user/timers.target.wants/syncagenda.timer new file mode 120000 index 0000000..c3b5d8b --- /dev/null +++ b/systemd/.config/systemd/user/timers.target.wants/syncagenda.timer @@ -0,0 +1 @@ +/home/bca/.config/systemd/user/syncagenda.timer \ No newline at end of file diff --git a/vdirsyncer/.config/vdirsyncer/config b/vdirsyncer/.config/vdirsyncer/config new file mode 100644 index 0000000..e5c7e18 --- /dev/null +++ b/vdirsyncer/.config/vdirsyncer/config @@ -0,0 +1,38 @@ +[general] +# A folder where vdirsyncer can store some metadata about each pair. +status_path = "~/.local/share/vdirsyncer/status/" + +[pair waarp_agenda] +a = "waarp_agenda_local" +b = "waarp_agenda_remote" +collections = ["from a", "from b"] +conflict_resolution = "b wins" + +[storage waarp_agenda_remote] +type = "google_calendar" +token_file = "~/.local/share/vdirsyncer/tokens/waarp" +client_id = "948686879514-65efku96birv6u1l48kpajfvaevat51s.apps.googleusercontent.com" +client_secret = "YQWLblQIWPK62lDmkyRRXWOz" + +[storage waarp_agenda_local] +type = "filesystem" +path = "~/.local/share/agendas/waarp/" +fileext = ".ics" + +[pair perso_agenda] +a = "perso_agenda_local" +b = "perso_agenda_remote" +collections = ["from a", "from b"] +conflict_resolution = "b wins" + +[storage perso_agenda_remote] +type = "caldav" +url = "https://files.bcarlin.xyz" +#https://files.bcarlin.xyz/remote.php/dav +username = "bcarlin" +password.fetch = ["command", "secret-tool", "lookup", "khal", "persopw"] + +[storage perso_agenda_local] +type = "filesystem" +path = "~/.local/share/agendas/perso/" +fileext = ".ics"