From bf7565e9168e2af7516bdae2458a51bd273f0c41 Mon Sep 17 00:00:00 2001 From: stupidcomputer Date: Mon, 21 Oct 2024 16:57:10 -0500 Subject: [PATCH] move sync to synchron --- .config/isync/phone-config | 21 +++++++++++++++++++++ builds/utils/{sync => synchron} | 9 +++++++-- 2 files changed, 28 insertions(+), 2 deletions(-) create mode 100644 .config/isync/phone-config rename builds/utils/{sync => synchron} (60%) diff --git a/.config/isync/phone-config b/.config/isync/phone-config new file mode 100644 index 0000000..1b36029 --- /dev/null +++ b/.config/isync/phone-config @@ -0,0 +1,21 @@ +IMAPStore main-remote +Host mail.beepboop.systems +Port 993 +User ryan@beepboop.systems +PassCmd "rbw get mail.beepboop.systems" +SSLType IMAPS +# termux is weird +CertificateFile /data/data/com.termux/files/usr/etc/tls + +MaildirStore main-local +Path ~/Mail/main/ +Inbox ~/Mail/main/INBOX +Subfolders Verbatim + +Channel main +Far :main-remote: +Near :main-local: +Create Both +Expunge Both +Patterns * +SyncState * diff --git a/builds/utils/sync b/builds/utils/synchron similarity index 60% rename from builds/utils/sync rename to builds/utils/synchron index 4bc8b6c..4cde79b 100755 --- a/builds/utils/sync +++ b/builds/utils/synchron @@ -1,5 +1,10 @@ -is_school && echo "enable the vpn" -mbsync --config=$HOME/.config/isync/config main +if [ "$(hostname)" = "localhost" ]; then + mbsync --config=$HOME/.config/isync/phone-config +else + is_school && echo "enable the vpn" + mbsync --config=$HOME/.config/isync/config main +fi + vdirsyncer sync rbw sync