Sort common mailboxes before the rest

This commit is contained in:
Tunui Franken 2025-03-27 21:35:45 +01:00
parent c1aa4d1dec
commit 24b2d314f7

View file

@ -28,6 +28,11 @@ set record = "{{ account.other_vars.record | default('+Sent') }}"
set postponed = "{{ account.other_vars.postponed | default('+Drafts') }}"
set trash = "{{ account.other_vars.trash | default('+Trash') }}"
unmailboxes *
mailboxes `find ~/.local/share/mail/{{ account.fulladdress }} -type d -name cur -exec dirname {} \; | grep 'INBOX$' | sort | sed 's/ /\\ /g' | tr '\n' ' '`
mailboxes `find ~/.local/share/mail/{{ account.fulladdress }} -type d -name cur -exec dirname {} \; | grep 'Sent$' | sort | sed 's/ /\\ /g' | tr '\n' ' '`
mailboxes `find ~/.local/share/mail/{{ account.fulladdress }} -type d -name cur -exec dirname {} \; | grep 'Drafts$' | sort | sed 's/ /\\ /g' | tr '\n' ' '`
mailboxes `find ~/.local/share/mail/{{ account.fulladdress }} -type d -name cur -exec dirname {} \; | grep 'Junk$' | sort | sed 's/ /\\ /g' | tr '\n' ' '`
mailboxes `find ~/.local/share/mail/{{ account.fulladdress }} -type d -name cur -exec dirname {} \; | grep 'Trash$' | sort | sed 's/ /\\ /g' | tr '\n' ' '`
mailboxes `find ~/.local/share/mail/{{ account.fulladdress }} -type d -name cur -exec dirname {} \; | sort | sed 's/ /\\ /g' | tr '\n' ' '`
{% for folder, hook in account.other_vars.folder_hook.items() %}
folder-hook {{ folder }} "{{ hook }}"