Rename mute to delay
This commit is contained in:
parent
b2a8a2e648
commit
9b6c220917
3 changed files with 27 additions and 27 deletions
|
@ -50,9 +50,9 @@ for mid in $(notmuch search --output=messages tag:new); do
|
|||
done
|
||||
done
|
||||
|
||||
# Unmute threads with new messages
|
||||
for mutetag in $(notmuch search --output=tags -- tag:muted and thread:{tag:new} | grep 'muted/'); do
|
||||
notmuch tag -muted -"$mutetag" +inbox -- tag:"$mutetag" and thread:{tag:new}
|
||||
# Undelay threads with new messages
|
||||
for delaytag in $(notmuch search --output=tags -- tag:delay and thread:{tag:new} | grep 'delay/'); do
|
||||
notmuch tag -delay -"$delaytag" +inbox -- tag:"$delaytag" and thread:{tag:new}
|
||||
done
|
||||
|
||||
# Github notifications
|
||||
|
@ -76,11 +76,11 @@ archive tag:github thread:{from:dependabot} \
|
|||
addtag inbox "not tag:spam"
|
||||
notmuch tag -new -- tag:new
|
||||
|
||||
# Unmute threads on their day of unmuting
|
||||
# Show threads after their delay
|
||||
today="$(date +'%s')"
|
||||
for mutetag in $(notmuch search --output=tags tag:muted | grep 'muted/'); do
|
||||
until="$(date -d "${mutetag#*/}" +'%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 -muted -"$mutetag" +inbox -- tag:"$mutetag"
|
||||
notmuch tag -delay -"$delay" +inbox -- tag:"$delay"
|
||||
fi
|
||||
done
|
Loading…
Add table
Add a link
Reference in a new issue