From ef2b9ac3449cdb067e66fe32af1d6a8b64b502d4 Mon Sep 17 00:00:00 2001 From: Baptiste Grenier Date: Wed, 11 Dec 2024 12:21:23 +0100 Subject: [PATCH] mutt/neomutt: reorganise conf to separete non compatible bits --- home/private_dot_config/neomutt/index-color | 14 +++++++------- .../private_dot_config/neomutt/mutt-common.rc | 12 ------------ home/private_dot_config/neomutt/muttrc | 19 +++++++++++++++++++ home/private_dot_config/neomutt/neomuttrc | 11 +++++++++-- .../neomutt/profile-maildir.egi | 7 ------- 5 files changed, 35 insertions(+), 28 deletions(-) diff --git a/home/private_dot_config/neomutt/index-color b/home/private_dot_config/neomutt/index-color index 0911ba93..86799efb 100644 --- a/home/private_dot_config/neomutt/index-color +++ b/home/private_dot_config/neomutt/index-color @@ -1,12 +1,12 @@ # Index color # http://www.neomutt.org/feature/index-color/ -# color index_author default color234 '.*' -# color index_flags default red '~F' -# color index_collapsed default brightblue -# color index_date green default -# color index_label default brightgreen -# color index_number red default -# color index_size cyan default +color index_author default color234 '.*' +color index_flags default red '~F' +color index_collapsed default brightblue +color index_date green default +color index_label default brightgreen +color index_number red default +color index_size cyan default # vim: set ft=muttrc: diff --git a/home/private_dot_config/neomutt/mutt-common.rc b/home/private_dot_config/neomutt/mutt-common.rc index 875e652a..c89ad0bc 100644 --- a/home/private_dot_config/neomutt/mutt-common.rc +++ b/home/private_dot_config/neomutt/mutt-common.rc @@ -79,17 +79,6 @@ unset mark_old # read/new is good enough unset strict_threads set sort_re set reply_regexp = "^(([Rr][Ee]?(\[[0-9]+\])?: *)?(\[[^]]+\] *)?)*" -# Sort by threads -set sort = threads -# Sort threads, having the most recent at the top -# XXX: not available in neomutt -set sort_thread_groups = reverse-last-date-received -# Sort within threads, last message at the bottom -set sort_aux = last-date-received -# Ensure that INBOX is always using appropriate thread-based sort -folder-hook Inbox 'set sort=threads sort_aux=last-date-received sort_thread_groups=reverse-last-date-received ' -# Ensure that Sent folder is first showing messages last sent -folder-hook Sent 'set sort=reverse-date-sent' # collapse threads with unread mails # set collapse_unread @@ -131,7 +120,6 @@ source ~/.config/neomutt/forgotten-attachment # Colors source ~/.config/neomutt/colors -source ~/.config/neomutt/index-color # Key bindings, macros source ~/.config/neomutt/bindings diff --git a/home/private_dot_config/neomutt/muttrc b/home/private_dot_config/neomutt/muttrc index 391b1326..863a7904 100644 --- a/home/private_dot_config/neomutt/muttrc +++ b/home/private_dot_config/neomutt/muttrc @@ -4,4 +4,23 @@ source ~/.config/neomutt/mutt-common.rc # Notmuch support without patched mutt source ~/.config/neomutt/notmuch-mutt.rc +# http://www.mutt.org/doc/manual/#bgedit +# XXX not available on neomutt +set background_edit +set editor = "bgedit-screen-tmux.sh nvim" +# set editor = "nvim-qt" +# set editor = "subl -n -w" + +# Sort by threads +set sort = threads +# Ensure that Sent folder is first showing messages last sent +folder-hook Sent set sort=reverse-date-sent +# Sort threads, having the most recent at the top +# XXX: not available in neomutt +set sort_thread_groups = reverse-last-date-received +# Sort within threads, last message at the bottom +set sort_aux = last-date-received +# Ensure that INBOX is always using appropriate thread-based sort +folder-hook Inbox set sort=threads sort_aux=last-date-received sort_thread_groups=reverse-last-date-received + # vim: set ft=muttrc: diff --git a/home/private_dot_config/neomutt/neomuttrc b/home/private_dot_config/neomutt/neomuttrc index 01b5daa5..74227d7b 100644 --- a/home/private_dot_config/neomutt/neomuttrc +++ b/home/private_dot_config/neomutt/neomuttrc @@ -5,9 +5,14 @@ source ~/.config/neomutt/mutt-common.rc # https://neomutt.org/feature/use-threads # set use_threads=reverse sort=date sort_aux=date set use_threads=threads sort=reverse-last-date sort_aux=reverse-last-date -folder-hook Inbox 'set use_threads=threads sort=reverse-last-date sort_aux=reverse-last-date' +folder-hook Inbox set use_threads=threads sort=reverse-last-date sort_aux=reverse-last-date +# Ensure that Sent folder is first showing messages last sent +folder-hook Sent set sort=reverse-date-sent -set editor='neomutt-compose.sh' +# Workaround for lack of background_edit support in Neomutt +# https://github.com/neomutt/neomutt/discussions/4145 +# https://github.com/neomutt/neomutt/issues/2713 +set editor="neomutt-compose.sh" # Source neomutt-specific configuration # Colors @@ -16,4 +21,6 @@ source ~/.config/neomutt/progress-color # Not supported in mutt without notmuch patch source ~/.config/neomutt/notmuch-neomutt.rc +source ~/.config/neomutt/index-color + # vim: set ft=muttrc: diff --git a/home/private_dot_config/neomutt/profile-maildir.egi b/home/private_dot_config/neomutt/profile-maildir.egi index 00d696a4..54742118 100644 --- a/home/private_dot_config/neomutt/profile-maildir.egi +++ b/home/private_dot_config/neomutt/profile-maildir.egi @@ -1,12 +1,5 @@ # Mutt sender profile: egi -# http://www.mutt.org/doc/manual/#bgedit -# XXX not available on neomutt -set background_edit -set editor = "bgedit-screen-tmux.sh nvim" -# set editor = "nvim-qt" -# set editor = "subl -n -w" - set folder = ~/Mail/EGI # Copy sent message to this folder