aboutsummaryrefslogtreecommitdiff
path: root/.config/khard/config_gen
blob: 75f59b13f154b5dd11708b5755079273f63e44b1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
#!/bin/sh
EXPORT_LIB=y . "$XDG_CONFIG_HOME/vdirsyncer/config_gen"

cat << EOF
[addressbooks]

EOF

_cfg_dav() {
	[ "$DAV_TYPE" != "carddav" ] && return
	jq --raw-output '.collections[][0]' "$VDIRSYNCER_STATUS_PATH/$ID.collections" | while read -r collection ; do
		collection_path="$XDG_DATA_HOME/vdirsyncer/$ID/$collection"
		displayname_path="$collection_path/displayname"
		NAME="$(cat "$displayname_path")"
		cat << EOF
[[$NAME]]
path = "$collection_path"
EOF
		echo
	done
}

. "$CONFIG_FILE"

printf '# %s:%s=%s\n' vim ft dosini