diff --git a/aerc-compose-neovim.sh b/mail/aerc-compose-neovim.sh similarity index 100% rename from aerc-compose-neovim.sh rename to mail/aerc-compose-neovim.sh diff --git a/notify-mail.hy b/mail/notify-mail.hy similarity index 100% rename from notify-mail.hy rename to mail/notify-mail.hy diff --git a/notmuch-post.sh b/mail/notmuch-post.sh similarity index 82% rename from notmuch-post.sh rename to mail/notmuch-post.sh index 6bd6248..9e5c3bb 100755 --- a/notmuch-post.sh +++ b/mail/notmuch-post.sh @@ -8,4 +8,4 @@ notmuch tag +spam folder:Spam notmuch tag -starred not folder:Starred -hy ~/scripts/notify-mail.hy +hy "${HOME}/scripts/mail/notify-mail.hy" diff --git a/notmuch-mbsync-refresh.sh b/notmuch-mbsync-refresh.sh deleted file mode 100755 index 56d7cfb..0000000 --- a/notmuch-mbsync-refresh.sh +++ /dev/null @@ -1,5 +0,0 @@ -#!/usr/bin/env zsh - -mbsync -a -notmuch new -~/scripts/notmuch-post.sh diff --git a/systemd/copy-keepassxc-db@.service b/systemd/copy-keepassxc-db@.service index adf5688..2a46acc 100644 --- a/systemd/copy-keepassxc-db@.service +++ b/systemd/copy-keepassxc-db@.service @@ -1,7 +1,6 @@ [Unit] Description=Copy KeePassXC database file to Nextcloud for backup -Wants=default.target [Service] Type=oneshot -ExecStart=/home/zander/scripts/backup-keepassxc-db.sh %i +ExecStart=%h/scripts/backup-keepassxc-db.sh %i diff --git a/systemd/sync-mail.service b/systemd/sync-mail.service new file mode 100644 index 0000000..17c4edf --- /dev/null +++ b/systemd/sync-mail.service @@ -0,0 +1,11 @@ +[Unit] +Description=Sync mail with mbsync and notmuch + +[Service] +Type=oneshot +ExecStart=-mbsync -a ; notmuch new +RuntimeMaxSec=3m +Restart=on-failure + +[Install] +WantedBy=default.target diff --git a/systemd/sync-mail.timer b/systemd/sync-mail.timer new file mode 100644 index 0000000..e5e6ee0 --- /dev/null +++ b/systemd/sync-mail.timer @@ -0,0 +1,12 @@ +[Unit] +Description=Sync mail every minute with mbsync and notmuch + +[Timer] +OnCalendar=*-*-* *:*:00 +FixedRandomDelay=true +AccuracySec=10s +RandomizedDelaySec=45m +Persistent=yes + +[Install] +WantedBy=default.target diff --git a/systemd/vdirsyncer@.service b/systemd/vdirsyncer@.service index 3732007..b27bba9 100644 --- a/systemd/vdirsyncer@.service +++ b/systemd/vdirsyncer@.service @@ -1,6 +1,5 @@ [Unit] Description=Sync calendar %i with vdirsyncer -Wants=default.target [Service] Type=simple