From a53ded5d708f6eb7868f252de3ec907a2891d37e Mon Sep 17 00:00:00 2001 From: mxmehl Date: Mon, 10 Jul 2017 14:14:04 +0200 Subject: [PATCH] switch contact integration to khard/vdirsyncer --- khard/khard.conf | 41 ++++++++++++++++++++++++++++++++++++ vdirsyncer/config | 50 ++++++++++++++++++++++++++++++++++++++++++++ vim/.vim/astroid.vim | 2 +- 3 files changed, 92 insertions(+), 1 deletion(-) create mode 100644 khard/khard.conf create mode 100644 vdirsyncer/config diff --git a/khard/khard.conf b/khard/khard.conf new file mode 100644 index 0000000..fd6fa54 --- /dev/null +++ b/khard/khard.conf @@ -0,0 +1,41 @@ +# example configuration file for khard version >= 0.11.0 +# place it under $HOME/.config/khard/khard.conf + +[addressbooks] +[[fsfe]] +path = ~/.contacts/fsfe + +[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 = yes +# reverse table ordering: yes / no +reverse = no +# append nicknames to name column: yes / no +show_nicknames = yes +# show uid table column: yes / no +show_uids = no +# sort by first or last name: first_name / last_name +sort = last_name + +[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 + diff --git a/vdirsyncer/config b/vdirsyncer/config new file mode 100644 index 0000000..f874472 --- /dev/null +++ b/vdirsyncer/config @@ -0,0 +1,50 @@ +# 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 = "~/.vdirsyncer/status/" + +# CARDDAV +[pair fsfe] +# A `[pair ]` block defines two storages `a` and `b` that should be +# synchronized. The definition of these storages follows in `[storage ]` +# blocks. This is similar to accounts in OfflineIMAP. +a = "fsfe_local" +b = "fsfe_remote" + +# Synchronize all collections that can be found. +# You need to run `vdirsyncer discover` if new calendars/addressbooks are added +# on the server. + +collections = ["from a", "fsfe"] + +# 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 fsfe_local] +# A storage references actual data on a remote server or on the local disk. +# Similar to repositories in OfflineIMAP. +type = "filesystem" +path = "~/.contacts/" +fileext = ".vcf" + +[storage fsfe_remote] +type = "carddav" +url = "https://d.mehl.mx/baikal/html/dav.php/addressbooks" +username = "mxmehl" +# The password can also be fetched from the system password storage, netrc or a +# custom command. See http://vdirsyncer.pimutils.org/en/stable/keyring.html +password.fetch = ["command", "pass", "DAV/Baikal-mxmehl"] diff --git a/vim/.vim/astroid.vim b/vim/.vim/astroid.vim index 28860b7..a52ee0e 100644 --- a/vim/.vim/astroid.vim +++ b/vim/.vim/astroid.vim @@ -19,7 +19,7 @@ execute "call append(line('.')-1, '')" execute "call append(line('.')-1, '')" " Email auto completion for headers -let g:qcc_query_command='abook --datafile ~/DAV/CardDAV/mxmehl-fsfe.abook --mutt-query' +let g:qcc_query_command='khard email --parsable --search-in-source-files' setlocal omnifunc=QueryCommandComplete " Functions