diff options
author | Tom Ryder <tom@sanctum.geek.nz> | 2020-05-17 17:19:35 +1200 |
---|---|---|
committer | Tom Ryder <tom@sanctum.geek.nz> | 2020-05-17 17:19:35 +1200 |
commit | 4744b463297577767170b185d1b042b33535b4f9 (patch) | |
tree | beb33726d608458c5e31316102100002b73662ad | |
parent | Merge branch 'release/v8.39.0' (diff) | |
parent | Bump VERSION (diff) | |
download | dotfiles-8.40.0.tar.gz (sig) dotfiles-8.40.0.zip |
Merge branch 'release/v8.40.0'v8.40.0
* release/v8.40.0:
Port some common personal macros into muttrc
Rehash plenv/pyenv on usage, not shell startup
-rw-r--r-- | VERSION | 4 | ||||
-rw-r--r-- | mutt/muttrc | 41 | ||||
-rw-r--r-- | plenv/shrc.d/plenv.sh | 5 | ||||
-rw-r--r-- | pyenv/shrc.d/pyenv.sh | 5 |
4 files changed, 51 insertions, 4 deletions
@@ -1,2 +1,2 @@ -tejr dotfiles v8.39.0 -Sun, 17 May 2020 03:45:25 +0000 +tejr dotfiles v8.40.0 +Sun, 17 May 2020 05:19:31 +0000 diff --git a/mutt/muttrc b/mutt/muttrc index e2356dd0..b91c66cd 100644 --- a/mutt/muttrc +++ b/mutt/muttrc @@ -138,5 +138,46 @@ macro generic,index,browser,pager \\R \ ':source ~/.config/mutt/muttrc<enter>:echo "Config reloaded!"<enter>' \ 'Reload muttrc' +# SpamAssassin spam tagging; Vim's muttrc syntax highlighting hates this, but +# it *is* valid +spam 'X-Spam-Flag: YES' 'SPAM' + +# Defaults for SpamAssassin training +set my_salearn = 'sa-learn' +set my_spam_folder = "$folder/spam" + # Machine or account specific settings source ~/.config/mutt/muttrc.d/src| + +# These hooks and macros go *after* we're done loading user options, as they +# bake in variables like $folder. Only hooks and macros dependent on these +# paths should be set after this point. + +# Shortcuts to jump to mailboxes +macro generic,index,browser,pager gi \ + "<change-folder>$spoolfile<enter>" \ + "Change to inbox" +macro generic,index,browser,pager gs \ + "<change-folder>$record<enter>" \ + "Change to sent" +macro generic,index,browser,pager gd \ + "<change-folder>$postponed<enter>" \ + "Change to drafts" + +# SpamAssassin spam tagging +folder-hook . \ + 'macro index,pager \Cs \ + "<pipe-message>$my_salearn --spam<enter><save-message>$my_spam_folder<enter>" \ + "Train as spam, move to spam"' +folder-hook . \ + 'macro index,pager \Ch \ + "<pipe-message>$my_salearn --ham<enter>" \ + "Retrain as ham"' +folder-hook $my_spam_folder \ + 'macro index,pager \Ch \ + "<pipe-message>$my_salearn --ham<enter><save-message>!<enter>" \ + "Train as ham, move to inbox"' +folder-hook $my_spam_folder \ + 'macro index,pager \Cs \ + "<pipe-message>$my_salearn --spam<enter>" \ + "Retrain as spam"' diff --git a/plenv/shrc.d/plenv.sh b/plenv/shrc.d/plenv.sh index 5848fd5b..bb52ffe2 100644 --- a/plenv/shrc.d/plenv.sh +++ b/plenv/shrc.d/plenv.sh @@ -6,13 +6,16 @@ plenv() { shift eval "$(plenv sh-rehash "$@")" ;; + sh-rehash) + command plenv "$@" + ;; shell) shift eval "$(plenv sh-shell "$@")" ;; *) command plenv "$@" + plenv rehash ;; esac } -plenv rehash diff --git a/pyenv/shrc.d/pyenv.sh b/pyenv/shrc.d/pyenv.sh index 1c90f8f2..0a946164 100644 --- a/pyenv/shrc.d/pyenv.sh +++ b/pyenv/shrc.d/pyenv.sh @@ -6,13 +6,16 @@ pyenv() { shift eval "$(pyenv sh-rehash "$@")" ;; + sh-rehash) + command pyenv "$@" + ;; shell) shift eval "$(pyenv sh-shell "$@")" ;; *) command pyenv "$@" + pyenv rehash ;; esac } -pyenv rehash |