dotfiles

configuration files for shell, text editor, graphical environment, etc.
git clone git://src.adamsgaard.dk/dotfiles
Log | Files | Refs | README | LICENSE Back to index

commit 8019304606c655a41948d86d0ac42d45222fc064
parent 1c816b3b20df1e3049fec56656888040b437e7d4
Author: Anders Damsgaard <anders@adamsgaard.dk>
Date:   Thu, 13 Jun 2019 08:31:46 +0200

Clean up muttrc

Diffstat:
M.config/mutt/muttrc | 126++++++++++++++++++++++++++++---------------------------------------------------
1 file changed, 45 insertions(+), 81 deletions(-)

diff --git a/.config/mutt/muttrc b/.config/mutt/muttrc @@ -3,8 +3,6 @@ source "~/.config/mutt/mailboxes" set spoolfile = "+adamsgaard/INBOX" set mbox_type=Maildir -unset move # do not move messages from IMAP folders if Mutt is used for IMAP - # Account-specific settings folder-hook adamsgaard 'set \ from="Anders Damsgaard <anders@adamsgaard.dk> "\ @@ -13,20 +11,6 @@ folder-hook adamsgaard 'set \ postponed=+adamsgaard/Drafts\ sendmail = "msmtp -a adamsgaard"' -folder-hook geodatahub 'set \ - from="Anders Damsgaard <anders@geodatahub.dk> "\ - realname="Anders Damsgaard"\ - record=+adamsgaard/Sent\ - postponed=+adamsgaard/Drafts\ - sendmail = "msmtp -a adamsgaard"' - -folder-hook riseup 'set \ - from="Anders Damsgaard <andersd@riseup.net> "\ - realname="Anders Damsgaard"\ - record=+riseup/Sent\ - postponed=+riseup/Drafts\ - sendmail = "msmtp -a riseup"' - folder-hook geomail 'set \ from="Anders Damsgaard <anders.damsgaard@geo.au.dk> "\ realname="Anders Damsgaard"\ @@ -34,20 +18,6 @@ folder-hook geomail 'set \ postponed=+geomail/Drafts\ sendmail = "msmtp -a geomail"' -folder-hook ucsd 'set \ - from="Anders Damsgaard <adamsgaard@ucsd.edu> "\ - realname="Anders Damsgaard"\ - record=+ucsd/Sent\ Items\ - postponed=+ucsd/Drafts\ - sendmail = "msmtp -a ucsd"' - -folder-hook gmail 'set \ - from="Anders Damsgaard <andersdc@gmail.com> "\ - realname="Anders Damsgaard"\ - record=+gmail/[Gmail].Sent\ Mail\ - postponed=+gmail/[Gmail].Drafts\ - sendmail = "msmtp -a gmail"' - folder-hook princeton 'set \ from="Anders Damsgaard <andersd@princeton.edu> "\ realname="Anders Damsgaard"\ @@ -55,14 +25,6 @@ folder-hook princeton 'set \ postponed=+princeton/Drafts\ sendmail = "msmtp -a princeton"' -folder-hook noaa 'set \ - from="Anders Damsgaard <anders.damsgaard@noaa.gov> "\ - realname="Anders Damsgaard"\ - record=+noaa/[Gmail].Sent\ Mail\ - postponed=+noaa/[Gmail].Drafts\ - sendmail = "msmtp -a noaa"' - - # ignore own e-mail addresses from group-reply alternates anders@adamsgaard.dk|anders@andersdamsgaard.com|anders@andersdamsgaard.dk|prints@andersdamsgaard.com|prints@andersdamsgaard.dk|adamsgaard@ucsd.edu|adamsgaard@mail.ucsd.edu|andersd@risuep.net|andersdc@gmail.com|adc@geo.au.dk|anders.damsgaard@au.dk|anders.damsgaard@geo.au.dk|andersd@princeton.edu|andersd@exchange.Princeton.EDU|anders.damsgaard@noaa.gov @@ -106,10 +68,9 @@ set noconfirmappend # Just append, don't hassle me. set pager_stop=yes # Stop at end of mail instead of displaying next mail set smart_wrap=yes # wrap long lines at a word boundary set markers=no # show + symbol at the start of wrapped lines -#set wrap=-1 # wrap lines 1 character from right boundary set user_agent=no # do not add "User-Agent:" header to outgoing messages -# What we consider to be a quote. +# What we consider to be a quote set quote_regexp="^( {0,4}[>|:#%]| {0,4}[a-z0-9]+[>|]+)+" set to_chars=" +TCF " # Drop the "L". @@ -121,7 +82,6 @@ set pager_index_lines=5 # Mail check interval set timeout = 15 -set mail_check = 5 # how often (in seconds) mutt should look for new mail (default = 5 sec) set alias_file=~/.config/mutt/aliases # Save aliases here set sort_alias = alias # sort alias list when displayed in mutt @@ -182,63 +142,67 @@ macro index \ 6 "<change-folder>=riseup/INBOX/<enter>" "Go to Riseup inbox" macro index \ ^ "<change-folder>=riseup/Sent/<enter>" "Go to Riseup sent" -# mutt-sidebar -set sidebar_visible = no -macro index \ S '<enter-command>toggle sidebar_visible<enter><refresh>' -macro pager \ S '<enter-command>toggle sidebar_visible<enter><redraw-screen>' -bind index,pager \CP sidebar-prev -bind index,pager \CN sidebar-next -bind index,pager \CO sidebar-open -#set sidebar_sort = yes # fix order of sidebar entries - # abook address book set query_command= "abook --mutt-query '%s'" -macro index,pager A "!$EDITOR ~/.config/mutt/aliases\n:source ~/.config/mutt/aliases\n" "Edit aliases file and reload it" +macro index,pager A "!$EDITOR ~/.config/mutt/aliases\n:\ +source ~/.config/mutt/aliases\n" "Edit aliases file and reload it" + macro pager a "<create-alias>" "create an alias from the message sender" macro index Y "<next-unread-mailbox>" "go to next mailbox with unread mails" +macro index U "<limit>all\n" "show all messages (undo limit)" -#macro index,pager S "<enter-command>unset wait_key<enter>\ -#<pipe-entry>bogofilter -l -s<enter>\ -#<enter-command>set wait_key<enter>\ -#<bounce-message>me@rescam.org<enter>\ -#<save-message>=riseup/Spam<enter>" "mark as spam" -macro index,pager S "<enter-command>unset wait_key<enter>\ -<pipe-entry>bogofilter -l -s<enter>\ -<enter-command>set wait_key<enter>\ -<save-message>=adamsgaard/Spam<enter>" "mark as spam" +# mark as spam (S) or ham (H) +macro index,pager S "<save-message>=adamsgaard/Spam<enter>" "mark as spam" +macro index,pager H "<save-message>=adamsgaard/INBOX<enter>" "mark as non-spam" # sync all accounts -#macro index O "<enter-command>unset wait_key<enter><shell-escape>mbsync -a<enter><enter-command>set wait_key<enter>" -macro index O "<enter-command>unset wait_key<enter><shell-escape>tmux split-window -l 1 \"mbsync -a\"; tmux select-pane -l<enter><enter-command>set wait_key<enter>" +macro index O "<enter-command>unset wait_key<enter>\ +<shell-escape>tmux split-window -l 1 \"mbsync -a\"; tmux select-pane -l<enter>\ +<enter-command>set wait_key<enter>" # sync current inbox -folder-hook adamsgaard 'macro index o "<enter-command>unset wait_key<enter><shell-escape>tmux split-window -l 1 \"mbsync adamsgaard:INBOX\"; tmux select-pane -l<enter><enter-command>set wait_key<enter>"' -folder-hook princeton 'macro index o "<enter-command>unset wait_key<enter><shell-escape>tmux split-window -l 1 \"mbsync princeton:INBOX\"; tmux select-pane -l<enter><enter-command>set wait_key<enter>"' -folder-hook geomail 'macro index o "<enter-command>unset wait_key<enter><shell-escape>tmux split-window -l 1 \"mbsync geomail:INBOX\"; tmux select-pane -l<enter><enter-command>set wait_key<enter>"' +folder-hook adamsgaard 'macro index o "<enter-command>unset wait_key<enter>\ +<shell-escape>tmux split-window -l 1 \"mbsync adamsgaard:INBOX\";\ +tmux select-pane -l<enter>\ +<enter-command>set wait_key<enter>"' -macro index U "<limit>all\n" "show all messages (undo limit)" - -# notmuch-mutt integration, from `man notmuch-mutt` -macro index L "<enter-command>set my_old_pipe_decode=\$pipe_decode my_old_wait_key=\$wait_key nopipe_decode nowait_key<enter> <shell-escape>notmuch-mutt -r --prompt search<enter><change-folder-readonly>`echo ${XDG_CACHE_HOME:-$HOME/.cache}/notmuch/mutt/results`<enter><enter-command>set pipe_decode=\$my_old_pipe_decode wait_key=\$my_old_wait_key<enter>" "notmuch: search all mail" +folder-hook princeton 'macro index o "<enter-command>unset wait_key<enter>\ +<shell-escape>tmux split-window -l 1 \"mbsync princeton:INBOX\";\ +tmux select-pane -l<enter>\ +<enter-command>set wait_key<enter>"' -macro index <F9> "<enter-command>set my_old_pipe_decode=\$pipe_decode my_old_wait_key=\$wait_key nopipe_decode nowait_key<enter><pipe-message>notmuch-mutt -r thread<enter><change-folder-readonly>`echo ${XDG_CACHE_HOME:-$HOME/.cache}/notmuch/mutt/results`<enter><enter-command>set pipe_decode=\$my_old_pipe_decode wait_key=\$my_old_wait_key<enter>" "notmuch: reconstruct thread" +folder-hook geomail 'macro index o "<enter-command>unset wait_key<enter>\ +<shell-escape>tmux split-window -l 1 \"mbsync geomail:INBOX\";\ +tmux select-pane -l<enter>\ +<enter-command>set wait_key<enter>"' -macro index <F6> "<enter-command>set my_old_pipe_decode=\$pipe_decode my_old_wait_key=\$wait_key nopipe_decode nowait_key<enter><pipe-message>notmuch-mutt tag -- -inbox<enter><enter-command>set pipe_decode=\$my_old_pipe_decode wait_key=\$my_old_wait_key<enter>" "notmuch: remove message from inbox" +# notmuch-mutt integration, from `man notmuch-mutt` +macro index L "<enter-command>set my_old_pipe_decode=\$pipe_decode \ +my_old_wait_key=\$wait_key nopipe_decode nowait_key<enter>\ +<shell-escape>notmuch-mutt -r --prompt search<enter>\ +<change-folder-readonly>`echo \ +${XDG_CACHE_HOME:-$HOME/.cache}/notmuch/mutt/results`<enter>\ +<enter-command>set pipe_decode=\$my_old_pipe_decode \ +wait_key=\$my_old_wait_key<enter>" "notmuch: search all mail" + +macro index <F9> "<enter-command>set my_old_pipe_decode=\$pipe_decode \ +my_old_wait_key=\$wait_key nopipe_decode nowait_key<enter>\ +<pipe-message>notmuch-mutt -r thread<enter>\ +<change-folder-readonly>`echo \ +${XDG_CACHE_HOME:-$HOME/.cache}/notmuch/mutt/results`<enter>\ +<enter-command>set pipe_decode=\$my_old_pipe_decode \ +wait_key=\$my_old_wait_key<enter>" "notmuch: reconstruct thread" + +macro index <F6> "<enter-command>set my_old_pipe_decode=\$pipe_decode \ +my_old_wait_key=\$wait_key nopipe_decode nowait_key<enter>\ +<pipe-message>notmuch-mutt tag -- -inbox<enter>\ +<enter-command>set pipe_decode=\$my_old_pipe_decode \ +wait_key=\$my_old_wait_key<enter>" "notmuch: remove message from inbox" # show recipient instead of sender in "Sent" folder view set date_format='%b %d %k:%M' set index_format="%2C %Z [%D] %-22.22F (%?l?%4l&%4c?) %s" -# mark as spam (S) or ham (H) -macro index,pager S "<enter-command>unset wait_key<enter>\ -<pipe-entry>bogofilter -l -s<enter>\ -<enter-command>set wait_key<enter>\ -<save-message>=adamsgaard/Spam<enter>" "mark as spam" -macro index,pager H "<enter-command>unset wait_key<enter>\ -<pipe-entry>bogofilter -l -n<enter>\ -<enter-command>set wait_key<enter>\ -<save-message>=adamsgaard/INBOX<enter>" "mark as ham (non-spam)" - # convert to pdf for printing set print_command="$HOME/.config/mutt/muttprint-groff.sh"