From dd73533565e7fd2cdc16ccfaf63c6605940ac6a7 Mon Sep 17 00:00:00 2001
From: Luke Smith <luke@lukesmith.xyz>
Date: Sat, 1 Jun 2019 17:59:47 -0400
Subject: only sync active mbsync accounts

---
 bin/mailsync | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

(limited to 'bin/mailsync')

diff --git a/bin/mailsync b/bin/mailsync
index 8b98d42..b59c8e3 100755
--- a/bin/mailsync
+++ b/bin/mailsync
@@ -38,7 +38,7 @@ syncandnotify() {
 
 # Sync accounts passed as argument or all.
 if [ "$#" -eq "0" ]; then
-    accounts="$(ls "$HOME/.local/share/mail")"
+    accounts="$(awk '/^Channel/ {print $2}' "$HOME/.mbsyncrc")"
 else
     accounts=$*
 fi
-- 
cgit v1.2.3