From 651a2956646c5baf94d3efbc1ab02c1acbeaf9b0 Mon Sep 17 00:00:00 2001 From: Robert Günzler Date: Tue, 17 Jan 2023 00:41:31 +0100 Subject: bin/mailsync: use standalone clear-notification script MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Robert Günzler --- bin/mailsync | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'bin') diff --git a/bin/mailsync b/bin/mailsync index 0fcb43b..75a7376 100755 --- a/bin/mailsync +++ b/bin/mailsync @@ -125,11 +125,12 @@ run_sync() { # persistent notification id=$(notifysend "${acct}: fetching new mail..." "running mbsync" -i "$(iconez -sn email-sync-outline)" --print-id --expire-time=0) + trap '{ clear-notification "$id"; }' EXIT mbsync_args= [ -n "${verbose}" ] && mbsync_args="--verbose" mbsync $mbsync_args --config="$HOME/.config/mbsyncrc" "$acct" - clear-notification "$id" + # create cachefile touch "${cachefile}.${acct}" -- cgit 1.4.1