aboutsummaryrefslogtreecommitdiff
path: root/bin/mailcfg
diff options
context:
space:
mode:
authorEuAndreh <eu@euandre.org>2022-11-06 20:36:00 -0300
committerEuAndreh <eu@euandre.org>2022-11-06 20:36:03 -0300
commit185517bc659e671d32b22ae5afe678594c84c692 (patch)
treef02103e65c9e1fd4276375ee45ee45b3d25629b2 /bin/mailcfg
parentetc/guix/home.scm: Include many alternative shells (diff)
downloaddotfiles-185517bc659e671d32b22ae5afe678594c84c692.tar.gz
dotfiles-185517bc659e671d32b22ae5afe678594c84c692.tar.xz
bin/m: Run mbsync in parallel, with one process per account
Get the accounts from the list generated by `mailcfg list`.
Diffstat (limited to 'bin/mailcfg')
-rwxr-xr-xbin/mailcfg15
1 files changed, 14 insertions, 1 deletions
diff --git a/bin/mailcfg b/bin/mailcfg
index e31ab67..f77355e 100755
--- a/bin/mailcfg
+++ b/bin/mailcfg
@@ -22,6 +22,7 @@ help() {
- notmuchcfg
- notmuchhook
- alot
+ - list
Emit the generated configuration file for the chosen email
@@ -57,6 +58,11 @@ help() {
Get the alot configuration file:
$ mailcfg alot
+
+
+ List the existing account labels:
+
+ $ mailcfg list
EOF
}
@@ -271,9 +277,16 @@ alot() {
done
}
+list() {
+ for env in "$CFGDIR"/*.env; do
+ . "$env"
+ printf '%s\n' "$LABEL"
+ done
+}
+
case "$ACTION" in
- mbsync|msmtp|notmuchcfg|notmuchhook|alot)
+ mbsync|msmtp|notmuchcfg|notmuchhook|alot|list)
"$1"
;;
*)