]> git.rmz.io Git - dotfiles.git/commitdiff
vdirsyncer: initial config
authorSamir Benmendil <me@rmz.io>
Mon, 18 Jul 2022 11:55:09 +0000 (12:55 +0100)
committerSamir Benmendil <me@rmz.io>
Mon, 18 Jul 2022 11:56:12 +0000 (12:56 +0100)
Makefile
vdirsyncer/config [new file with mode: 0644]

index 1a9c315681786b4291fde5a692e7873c3358a1e3..d59f59a6d7d5863180d9fe6a5c57aa0ea48297c2 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -129,6 +129,11 @@ urxvt: $(XDG_CONFIG_HOME)
        ln -sfT $(APATH)/urxvt $(XDG_CONFIG_HOME)/urxvt
 .PHONY: urxvt
 
+vdirsyncer: $(XDG_CACHE_HOME)
+       ln -sfT $(APATH)/$@ $(XDG_CONFIG_HOME)/$@
+       mkdir -p $(XDG_DATA_HOME)/vdirsyncer/{contacts,calendars}
+.PHONY: vdirsyncer
+
 vim: $(XDG_CONFIG_HOME)
        ln -sfT $(APATH)/vim $(XDG_CONFIG_HOME)/vim
        mkdir -p $(XDG_DATA_HOME)/vim
diff --git a/vdirsyncer/config b/vdirsyncer/config
new file mode 100644 (file)
index 0000000..e0eb9c9
--- /dev/null
@@ -0,0 +1,64 @@
+# An example configuration for vdirsyncer.
+#
+# Move it to ~/.vdirsyncer/config or ~/.config/vdirsyncer/config and edit it.
+# Run `vdirsyncer --help` for CLI usage.
+#
+# Optional parameters are commented out.
+# This file doesn't document all available parameters, see
+# http://vdirsyncer.pimutils.org/ for the rest of them.
+
+[general]
+# A folder where vdirsyncer can store some metadata about each pair.
+status_path = "~/.local/share/vdirsyncer/"
+
+# CARDDAV
+[pair contacts]
+# A `[pair <name>]` block defines two storages `a` and `b` that should be
+# synchronized. The definition of these storages follows in `[storage <name>]`
+# blocks. This is similar to accounts in OfflineIMAP.
+a = "contacts_remote"
+b = "contacts_local"
+
+# [ name, remote-dir, local-dir]
+collections = [["mailfence", "contacts", "mailfence"]]
+
+# Synchronize the "display name" property into a local file (~/.contacts/displayname).
+metadata = ["displayname"]
+
+# To resolve a conflict the following values are possible:
+#   `null` - abort when collisions occur (default)
+#   `"a wins"` - assume a's items to be more up-to-date
+#   `"b wins"` - assume b's items to be more up-to-date
+#conflict_resolution = null
+
+[storage contacts_remote]
+type = "carddav"
+url = "https://mailfence.com/dav/samirbenmendil/private/contacts"
+username = "samirbenmendil"
+password.fetch = ["command", "pass", "mailfence.com/xdav"]
+
+[storage contacts_local]
+type = "filesystem"
+path = "~/.local/share/contacts/"
+fileext = ".vcf"
+
+# CALDAV
+[pair calendar]
+a = "calendar_remote"
+b = "calendar_local"
+collections = ["from a", "from b"]
+
+# Calendars also have a color property
+metadata = ["displayname", "color"]
+
+[storage calendar_remote]
+type = "caldav"
+url = "https://mailfence.com/dav/samirbenmendil/private/events"
+username = "samirbenmendil"
+password.fetch = ["command", "pass", "mailfence.com/xdav"]
+
+[storage calendar_local]
+type = "filesystem"
+path = "~/.local/share/calendars/"
+fileext = ".ics"
+