aboutsummaryrefslogtreecommitdiff
path: root/home/dot_config/khard/executable_config_gen
diff options
context:
space:
mode:
authorLoek Le Blansch <loek@pipeframe.xyz>2026-08-02 14:48:29 +0200
committerLoek Le Blansch <loek@pipeframe.xyz>2026-08-02 14:48:29 +0200
commite43eb1177872f52e949fb5f0f93396ed94b0d093 (patch)
tree78b73af6a989fa2996d71b112e161b70d35081ef /home/dot_config/khard/executable_config_gen
parent2f14a896e4b897bd747c24d7ad8e9e7bb3237d03 (diff)
move to chezmoi
Diffstat (limited to 'home/dot_config/khard/executable_config_gen')
-rw-r--r--home/dot_config/khard/executable_config_gen25
1 files changed, 25 insertions, 0 deletions
diff --git a/home/dot_config/khard/executable_config_gen b/home/dot_config/khard/executable_config_gen
new file mode 100644
index 0000000..75f59b1
--- /dev/null
+++ b/home/dot_config/khard/executable_config_gen
@@ -0,0 +1,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