From 3bac1dc0fea8597308c924fb3357dae3a45e5f6b Mon Sep 17 00:00:00 2001 From: coolneng Date: Wed, 23 Mar 2022 13:03:34 +0100 Subject: [PATCH] Add mail sync script --- scripts/.local/share/scripts/mail-sync | 9 +++++++++ scripts/.local/share/scripts/recurrent-actions | 2 +- 2 files changed, 10 insertions(+), 1 deletion(-) create mode 100755 scripts/.local/share/scripts/mail-sync diff --git a/scripts/.local/share/scripts/mail-sync b/scripts/.local/share/scripts/mail-sync new file mode 100755 index 0000000..c679ff5 --- /dev/null +++ b/scripts/.local/share/scripts/mail-sync @@ -0,0 +1,9 @@ +#!/bin/sh + +if [ $# -lt 1 ]; then + echo "Usage: mail-sync " + exit 1 +fi + +mbsync "$1" +notmuch new diff --git a/scripts/.local/share/scripts/recurrent-actions b/scripts/.local/share/scripts/recurrent-actions index cd135c4..fbe5a4a 100755 --- a/scripts/.local/share/scripts/recurrent-actions +++ b/scripts/.local/share/scripts/recurrent-actions @@ -30,7 +30,7 @@ execute_action() { "Sync doom emacs") execute_command "$HOME/.emacs.d/bin/doom sync" ;; "Start videocall") execute_command "$script_folder/pulseaudio-mic-mute" && execute_command "$script_folder/videocall start" ;; "Stop videocall") execute_command "$script_folder/pulseaudio-mic-mute" && execute_command "$script_folder/videocall stop" ;; - "Sync mail") execute_command "mbsync -a" && execute_command "notmuch new" ;; + "Sync mail") execute_command "/home/coolnengs/.local/share/scripts/mail-sync" ;; esac }