neomutt: modularized everything and added gmail account

This commit is contained in:
dogeystamp 2023-03-05 12:49:00 -05:00
parent d3a2f84a39
commit 52459f36a5
Signed by: dogeystamp
GPG Key ID: 7225FE3592EFFA38
9 changed files with 91 additions and 65 deletions

View File

@ -23,8 +23,9 @@ function pdfr
pdftotext $argv - | nvim
end
# Neomutt local config
# Neomutt configs
alias neomutt.local='neomutt -F .config/neomutt/neomuttrc.local'
alias neomutt.disroot='neomutt -F .config/neomutt/neomuttrc.disroot'
# Specific to my Gentoo system
alias genlop='doas -u portage /usr/bin/genlop'

View File

@ -0,0 +1,15 @@
# vim: filetype=muttrc
bind attach,index,pager \CD next-page
bind attach,index,pager \CU previous-page
bind pager g noop
bind pager gg top
bind pager G bottom
bind attach,index g noop
bind attach,index gg first-entry
bind attach,index G last-entry
bind index,pager \CP sidebar-prev
bind index,pager \CN sidebar-next
bind index,pager \CO sidebar-open
bind index,pager \CB sidebar-toggle-visible

View File

@ -0,0 +1,13 @@
# vim: filetype=muttrc
source ~/.config/neomutt/colors.muttrc
source ~/.config/neomutt/binds.muttrc
set sleep_time=0
set beep=no
set editor="nvim"
set sort=reverse-date
set sidebar_visible
set sidebar_format="%B%?F? [%F]?%* %?N?%N/?%S"
set mail_check_stats

View File

@ -0,0 +1,24 @@
# vim: filetype=muttrc
set from="dogeystamp@disroot.org"
set realname="dogeystamp"
set imap_user="dogeystamp"
set imap_pass="`keepassxc-cli show -s -a password \"$KEEPASSDB\" msg/disroot`"
set smtp_url="smtps://$ID_EMAIL_USER@disroot.org/"
set smtp_pass="$imap_pass"
set smtp_authenticators = 'login'
set folder="imaps://disroot.org/"
set spoolfile=+INBOX
set record="+Sent"
set postponed="+Drafts"
mailboxes =INBOX =Sent =Drafts =Junk =Trash
macro index gd "<change-folder>=Drafts<enter>" "Go to drafts"
macro index gi "<change-folder>=INBOX<enter>" "Go to inbox"
macro index gS "<change-folder>=Sent<enter>" "Go to sent messages"
macro index gt "<change-folder>=Trash<enter>" "Go to trash"
macro index,pager d "<save-message>=Trash<enter><enter>" "Trash"
macro index,pager y "<save-message>=~/dox/mail/arc/<enter><enter>" "Archive"

View File

@ -0,0 +1,26 @@
# vim: filetype=muttrc
set from="$ID_EMAIL"
set realname="$ID_REALNAME"
set imap_user="$ID_EMAIL"
set imap_pass="`keepassxc-cli show -s -a neomutt \"$KEEPASSDB\" meta/gmail`"
set smtp_url="smtps://$ID_EMAIL_USER@smtp.gmail.com/"
set smtp_pass="$imap_pass"
set smtp_authenticators = 'login'
set folder="imaps://imap.gmail.com/"
set spoolfile=+INBOX
set record="+[Gmail]/Sent Mail"
set postponed="+[Gmail]/Drafts"
mailboxes =INBOX =[Gmail]/Sent\ Mail =[Gmail]/Starred =[Gmail]/Drafts =[Gmail]/Spam =[Gmail]/Trash
macro index ga "<change-folder>=[Gmail]/All Mail<enter>" "Go to all mail"
macro index gd "<change-folder>=[Gmail]/Drafts<enter>" "Go to drafts"
macro index gi "<change-folder>=INBOX<enter>" "Go to inbox"
macro index gs "<change-folder>=[Gmail]/Starred<enter>" "Go to starred messages"
macro index gS "<change-folder>=[Gmail]/Sent Mail<enter>" "Go to sent messages"
macro index gt "<change-folder>=[Gmail]/Trash<enter>" "Go to trash"
macro index,pager d "<save-message>=[Gmail]/Trash<enter><enter>" "Trash"
macro index,pager y "<save-message>=[Gmail]/All Mail<enter><enter>" "Archive"

View File

@ -1,56 +1,2 @@
source ~/.config/neomutt/colors.muttrc
set folder = ~/dox/mail/disroot/
set spoolfile = "+Inbox"
set postponed = "+Drafts"
set record = "+Sent"
set trash = "+Trash"
set header_cache = ~/.cache/neomutt/headers
set message_cachedir = ~/.cache/neomutt/bodies
set certificate_file = /etc/ssl/certs/ca-certificates.crt
set tmpdir = .cache/neomutt/tmp
set wait_key = no
set mbox_type = Maildir
set use_from=yes
set ssl_starttls=yes
set ssl_force_tls=yes
set editor="nvim"
set rfc2047_parameters = yes
set sleep_time = 0 # Pause 0 seconds for informational messages
set markers = no # Disables the `+` displayed at line wraps
set mark_old = no # Unread mail stay unread until read
set mime_forward = yes # attachments are forwarded with mail
set wait_key = no # mutt won't ask "press key to continue"
set fast_reply # skip to compose when replying
set fcc_attach # save attachments with the body
set forward_format = "Fwd: %s" # format of subject when forwarding
set forward_quote # include message in forwards
set reverse_name # reply as whomever it was to
set include # include message in replies
set sidebar_visible = yes
set sidebar_width = 20
set sidebar_short_path = yes
set sidebar_next_new_wrap = yes
set mail_check_stats
set sidebar_format = '%B%?F? [%F]?%* %?N?%N/? %?S?%S?'
set charset = "utf-8"
mailboxes =Inbox
mailboxes =Archive =Sent =Drafts =Junk =Trash =../arc
set sendmail="/usr/bin/msmtp -a mail"
macro index O "<shell-escape>mbsync -c \"$XDG_CONFIG_HOME\"/isync/mbsyncrc disroot <enter>" "run offlineimap to sync all mail"
macro index,pager A "<save-message>=../arc<enter>" "Archive Message"
bind index,pager \CP sidebar-prev
# Ctrl-P Previous Mailbox
bind index,pager \CN sidebar-next
# Ctrl-N Next Mailbox
bind index,pager \CO sidebar-open
# Ctrl-O Open Highlighted Mailbox
set realname = "dogeystamp"
set signature = ~/dox/sig
source ~/.config/neomutt/common.muttrc
source ~/.config/neomutt/gmail.muttrc

View File

@ -0,0 +1,2 @@
source ~/.config/neomutt/common.muttrc
source ~/.config/neomutt/disroot.muttrc

View File

@ -1,10 +1,3 @@
# Configuration for reading local mail on servers
source ~/.config/neomutt/colors.muttrc
set header_cache = ~/.cache/neomutt/headers
set message_cachedir = ~/.cache/neomutt/bodies
set certificate_file = /etc/ssl/certs/ca-certificates.crt
set tmpdir = .cache/neomutt/tmp
set editor="nvim"
source ~/.config/neomutt/common.muttrc

View File

@ -51,4 +51,10 @@ export REALNAME="dogeystamp"
export EMAIL="dogeystamp@disroot.org"
export KEYID="A3A5FA72F8E5E54FBEE425057225FE3592EFFA38"
export KEEPASSDB="$HOME"/dox/sec/pass.kdbx
# Identity (see ~/.local/bin/identity.sh)
if [ -r "$XDG_CONFIG_HOME"/identity ]; then
source "$XDG_CONFIG_HOME"/identity
fi
source .config/bashrc