From 1e802d9107c7c4b832be8f4414bc0ae18b7dc403 Mon Sep 17 00:00:00 2001 From: Felix Van der Jeugt Date: Wed, 8 Jan 2020 12:08:26 +0100 Subject: [PATCH] Better keybinds and use correct tag variable --- config/alot/config | 8 ++++---- notmuch-hooks/post-new | 6 ++++-- 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/config/alot/config b/config/alot/config index 9129d73..3ef4a32 100644 --- a/config/alot/config +++ b/config/alot/config @@ -84,8 +84,8 @@ theme = "mutt" [[search]] x = toggletags spam,inbox - a = untag inbox - A = tag inbox + a = toggletags inbox + A = toggletags inbox,muted 1 = call hooks.delay(ui,1) 2 = call hooks.delay(ui,2) 3 = call hooks.delay(ui,3) @@ -98,8 +98,8 @@ theme = "mutt" i = call hooks.spam(ui) [[thread]] - a = untag inbox ; fold - A = tag inbox ; unfold + a = toggletags inbox ; fold + A = toggletags inbox,muted ; fold n = nextpart p = prevpart u = pipeto --background selecturl diff --git a/notmuch-hooks/post-new b/notmuch-hooks/post-new index 6409447..9aedacb 100755 --- a/notmuch-hooks/post-new +++ b/notmuch-hooks/post-new @@ -62,6 +62,7 @@ addtag github "from:notifications@github.com" archive tag:dodona subject:'Onderwijsinstelling aangemaakt voor .*' archive tag:dodona from:'logcheck system account' archive tag:dodona subject:'A request took' +archive tag:dodona subject:'Een gebruiker kon niet inloggen' archive tag:github thread:{from:dependabot} \ -subject:Security \ -to:mention@noreply.github.com \ @@ -69,8 +70,9 @@ archive tag:github thread:{from:dependabot} \ -to:review_requested@noreply.github.com \ -to:security_alert@noreply.github.com -# Muted threads stay muted. +# Muted threads stay muted for a month after arrival archive thread:{tag:muted} +notmuch tag -muted -- tag:muted and date:'..30_days' # Inbox remaining not-spam addtag inbox "not tag:spam" @@ -81,6 +83,6 @@ today="$(date +'%s')" for delaytag in $(notmuch search --output=tags tag:delay | grep 'delay/'); do until="$(date -d "${delaytag#*/}" +'%s')" if [ "$today" -gt "$until" ]; then - notmuch tag -delay -"$delay" +inbox -- tag:"$delay" + notmuch tag -delay -"$delaytag" +inbox -- tag:"$delaytag" fi done \ No newline at end of file