office: Rename mail module to office module

Reflecting the somewhat expanding scope of the module, renamed it to
office. Still keeps the old files and setups but also got a new README
file.
This commit is contained in:
Marty Oehme 2022-12-06 17:55:47 +01:00
parent 593628b81d
commit 03684ce29f
Signed by: Marty
GPG key ID: 73BA40D5AFAF49C9
27 changed files with 28 additions and 15 deletions

View file

@ -0,0 +1,16 @@
# Account settings
# local maildir settings
set mbox_type = Maildir
set folder = ~/documents/mail # This has the shortcut '+' or '='
set spoolfile = "+inbox" # This has the shortcut '!'
set postponed = "+drafts"
set trash = "+trash"
# Disable saving outgoing mail since Gmail saves them by default.
unset record
mailboxes ! \
"+important" \
"+sent" \
"+drafts" \
"+trash" \
"+archive"

View file

@ -0,0 +1,233 @@
# # taken from https://gideonwolfe.com/posts/workflow/neomutt/intro/
# # Header colors:
color header blue default ".*"
color header brightmagenta default "^(From)"
color header brightcyan default "^(Subject)"
color header brightwhite default "^(CC|BCC)"
# mono bold bold
# mono underline underline
# mono indicator reverse
# mono error bold
# color normal default default
# color indicator brightyellow default # currently selected message. default makes bar clear, disabled arrow to save space.
# color sidebar_highlight red default
# color sidebar_divider brightblack black
# color sidebar_flagged red black
# color sidebar_new green black
# color normal brightyellow default
# color error red default
# color tilde black default
# color message cyan default
# color markers red white
# color attachment white default
# color search brightmagenta default
# color status brightyellow black
# color hdrdefault brightgreen default
# color quoted green default
# color quoted1 blue default
# color quoted2 cyan default
# color quoted3 yellow default
# color quoted4 red default
# color quoted5 brightred default
# color signature brightgreen default
# color bold black default
# color underline black default
# color normal default default
color body brightred default "[\-\.+_a-zA-Z0-9]+@[\-\.a-zA-Z0-9]+" # Email addresses
color body brightblue default "(https?|ftp)://[\-\.,/%~_:?&=\#a-zA-Z0-9]+" # URL
color body green default "\`[^\`]*\`" # Green text between ` and `
color body brightblue default "^# \.*" # Headings as bold blue
color body brightcyan default "^## \.*" # Subheadings as bold cyan
color body brightgreen default "^### \.*" # Subsubheadings as bold green
color body yellow default "^(\t| )*(-|\\*) \.*" # List items as yellow
color body brightcyan default "[;:][-o][)/(|]" # emoticons
color body brightcyan default "[;:][)(|]" # emoticons
color body brightcyan default "[ ][*][^*]*[*][ ]?" # more emoticon?
color body brightcyan default "[ ]?[*][^*]*[*][ ]" # more emoticon?
color body red default "(BAD signature)"
color body cyan default "(Good signature)"
color body brightblack default "^gpg: Good signature .*"
color body brightyellow default "^gpg: "
color body brightyellow red "^gpg: BAD signature from.*"
mono body bold "^gpg: Good signature"
mono body bold "^gpg: BAD signature from.*"
color body red default "([a-z][a-z0-9+-]*://(((([a-z0-9_.!~*'();:&=+$,-]|%[0-9a-f][0-9a-f])*@)?((([a-z0-9]([a-z0-9-]*[a-z0-9])?)\\.)*([a-z]([a-z0-9-]*[a-z0-9])?)\\.?|[0-9]+\\.[0-9]+\\.[0-9]+\\.[0-9]+)(:[0-9]+)?)|([a-z0-9_.!~*'()$,;:@&=+-]|%[0-9a-f][0-9a-f])+)(/([a-z0-9_.!~*'():@&=+$,-]|%[0-9a-f][0-9a-f])*(;([a-z0-9_.!~*'():@&=+$,-]|%[0-9a-f][0-9a-f])*)*(/([a-z0-9_.!~*'():@&=+$,-]|%[0-9a-f][0-9a-f])*(;([a-z0-9_.!~*'():@&=+$,-]|%[0-9a-f][0-9a-f])*)*)*)?(\\?([a-z0-9_.!~*'();/?:@&=+$,-]|%[0-9a-f][0-9a-f])*)?(#([a-z0-9_.!~*'();/?:@&=+$,-]|%[0-9a-f][0-9a-f])*)?|(www|ftp)\\.(([a-z0-9]([a-z0-9-]*[a-z0-9])?)\\.)*([a-z]([a-z0-9-]*[a-z0-9])?)\\.?(:[0-9]+)?(/([-a-z0-9_.!~*'():@&=+$,]|%[0-9a-f][0-9a-f])*(;([-a-z0-9_.!~*'():@&=+$,]|%[0-9a-f][0-9a-f])*)*(/([-a-z0-9_.!~*'():@&=+$,]|%[0-9a-f][0-9a-f])*(;([-a-z0-9_.!~*'():@&=+$,]|%[0-9a-f][0-9a-f])*)*)*)?(\\?([-a-z0-9_.!~*'();/?:@&=+$,]|%[0-9a-f][0-9a-f])*)?(#([-a-z0-9_.!~*'();/?:@&=+$,]|%[0-9a-f][0-9a-f])*)?)[^].,:;!)? \t\r\n<>\"]"
# Default index colors:
color index yellow default '.*'
color index_author red default '.*'
color index_number blue default
color index_subject cyan default '.*'
# For new mail:
color index brightyellow black "~N"
color index_author brightred black "~N"
color index_subject brightcyan black "~N"
color progress black cyan
# Nerd icons idea based on https://github.com/sheoak/neomutt-powerline-nerdfonts/
# Dracula colors based on Dracula Theme by Paul Townsend <paul@caprica.org>
# Formatting ----------------------------------------------------------------------
set date_format = "%a %d %h %H:%M"
set index_format=" %zc %zs %zt | %-35.35L %@attachment_info@ %?M10?~(%1M) ?%-30.100s %> %?Y?%Y ? %(!%a %d %h %H:%M) "
set pager_format="%n %T %s%*  %{!%d %b · %H:%M} %?X? %X?%P"
set status_format = " %D %?u? %u ?%?R? %R ?%?d? %d ?%?t? %t ?%?F? %F ?%?p? %p? \n \n"
set compose_format="-- NeoMutt: Compose [Approx. msg size: %l Atts: %a]%>-"
# set vfolder_format = "%N %?n?%3n& ? %8m  · %f"
set attach_format = "%u%D  %T%-75.75d %?T?%& ? %5s · %m/%M"
set sidebar_format = '%D%?Z? [%Z]?%* %?S?%S?'
index-format-hook attachment_info '=B text/calendar ~X 1' ' '
index-format-hook attachment_info '=B text/calendar' " "
index-format-hook attachment_info '~X 1' " "
index-format-hook attachment_info '~A' " "
# General Colors ------------------------------------------------------------------
color normal default default # general text
color error color231 color212 # error messages
color message default default # messages at the bottom
color prompt default default # prompt text
color search black color10 # search highlight
# Statusbar Colors ----------------------------------------------------------------
color status color141 default
color status color7 color8 '([a-zA-Z0-9\.,]|\[|\])(\s)' # bubble content 1
color status color7 color8 '(\s)([a-zA-Z0-9\.,]|\[|\])' # bubble content 2
color status color7 color8 '(\% )' # % symbol
color status color7 color8 '(\S)' # empty spaces
color status color8 default '(|)' # statusline "bubbles"
color status color69 black '(\` )' # bubble account variation
color status white color69 '([a-zA-Z0-9\.]+)()' # account text
color status green color8 '' # Unread messages count
color status blue color8 '' # Read messages count icon
color status yellow color8 '' # Flagged icon
color status red color8 '' # Pending delete icon
# Index Colors --------------------------------------------------------------------
color index color15 default '~N' # new messages
color index color8 default '~R' # read messages
color index color8 default '~Q' # messages which have been replied to
color index_collapsed color4 default # collapsed thread (message count text)
color index color5 default '!~Q^~p' # sent only to me and haven't been replied to
color index color22 default '~h X-Label..' # messages with a complete label
color index color6 default '~F' # flagged messages
color index color6 default '~F~N' # flagged messages (new)
color index color14 default '~F~R' # flagged messages (read)
color index color1 default '~D' # deleted messages
color index color1 default '~D~N' # deleted messages (new)
color index color9 default '~D~R' # deleted messages (read)
color index color3 default '~T' # tagged messages
color index color3 default '~T~N' # tagged messages (new)
color index color11 default '~T~R' # tagged messages (read)
color tree color8 color8 # thread tree lines/arrow
color indicator default color8 # selection indicator
color index_date color8 default # date is always the same colour
color index_label color6 default # label is always the same colour
# Sidebar Colors ------------------------------------------------------------------
color sidebar_indicator color14 black # currently selected mailbox
color sidebar_highlight white color8 # highlighted, but not open, mailbox.
color sidebar_ordinary color8 default # Color to give mailboxes by default
color sidebar_divider color8 black # divider between sidebar & content
color sidebar_flagged red black # mailboxes containing flagged mail
color sidebar_new green black # mailboxes containing new mail
color sidebar_unread color7 default # mailboxes containing unread mail
color sidebar_unread color7 default # mailboxes containing unread mail
# Message Headers -----------------------------------------------------------------
color hdrdefault color8 default
# Message Body --------------------------------------------------------------------
# Attachments
color attachment color8 default
# Signature
color signature color8 default
# emails
# color body color14 default '[\-\.+_a-zA-Z0-9]+@[\-\.a-zA-Z0-9]+'
# hide "mailto"
color body color0 color0 '<mailto:[\-\.+_a-zA-Z0-9]+@[\-\.a-zA-Z0-9]+>'
# URLs
color body color3 default '(https?|ftp)://[-\.,/%~_:?&=\#a-zA-Z0-9\+]+'
# Dividers
color body color8 default '(^[-_]*$)'
# Important info in calendar invites
color body color6 default '^(Date\/Time|Location|Organiser|Invitees|Teams Meeting)(:| \~\~)'
# Quotes
color quoted color61 default
color quoted1 color117 default
color quoted2 color84 default
color quoted3 color215 default
color quoted4 color212 default
# Forward/reply headers
color body color8 default '(^(To|From|Sent|Subject):.*)'
# Patch syntax highlighting
# color body brightwhite default '^[[:space:]].*'
# color body yellow default ^(diff).*
# color body white default ^[\-\-\-].*
# color body white default ^[\+\+\+].*
# color body green default ^[\+].*
# color body red default ^[\-].*
# color body brightblue default [@@].*
# color body cyan default ^(Signed-off-by).*
# color body brightwhite default ^(Cc)
# color body yellow default "^diff \-.*"
# color body brightwhite default "^index [a-f0-9].*"
# color body brightblue default "^---$"
# color body white default "^\-\-\- .*"
# color body white default "^[\+]{3} .*"
# color body green default "^[\+][^\+]+.*"
# color body red default "^\-[^\-]+.*"
# color body brightblue default "^@@ .*"
# color body green default "LGTM"
# color body brightmagenta default "-- Commit Summary --"
# color body brightmagenta default "-- File Changes --"
# color body brightmagenta default "-- Patch Links --"
# color body green default "^Merged #.*"
# color body red default "^Closed #.*"
# color body brightblue default "^Reply to this email.*"
# Misc -----------------------------------------------------------------------------
# no addressed to me, to me, group, cc, sent by me, mailing list
set to_chars=" "
# unchanged mailbox, changed, read only, attach mode
set status_chars = " "
ifdef crypt_chars set crypt_chars = " "
set flag_chars = " "
# hide some tags
set hidden_tags = "unread,draft,flagged,passed,replied,attachment,signed,encrypted"
tag-transforms "replied" "↻ " \
"encrytpted" "" \
"signed" "" \
"attachment" "" \
# The formats must start with 'G' and the entire sequence is case sensitive.
tag-formats "replied" "GR" \
"encrypted" "GE" \
"signed" "GS" \
"attachment" "GA" \
# don't put '+' at the beginning of wrapped lines
set markers=no

View file

@ -0,0 +1,28 @@
# open html emails in browser (or whatever GUI program is used to render HTML)
text/html; xdg-open %s ; nametemplate=%s.html
# render html emails inline using magic (uncomment the line below to use lynx instead)
# text/html; lynx -assume_charset=%{charset} -display_charset=utf-8 -collapse_br_tags -dump %s; nametemplate=%s.html; copiousoutput
text/html; render-prettyhtml %s; nametemplate=%s.html; copiousoutput;
text/plain; $EDITOR %s ;
# show calendar invites
text/calendar; mutt-ics; copiousoutput
application/ics; mutt-ics; copiousoutput
# open images externally
image/*; nsxiv %s ;
# open videos in mpv
video/*; mpv --autofit-larger=90\%x90\% %s; needsterminal;
video/*; setsid mpv --quiet %s &; copiousoutput
# open spreadsheets in sc-im
application/vnd.openxmlformats-officedocument.spreadsheetml.sheet; sc-im %s; needsterminal
# open anything else externally
application/pdf; xdg-open %s;
application/*; mkdir -p /tmp/mutt \; cp %s /tmp/mutt \; xdg-open /tmp/mutt/$(basename %s) &
application/pgp-encrypted; gpg -d '%s'; copiousoutput;
application/pgp-keys; gpg --import '%s'; copiousoutput;

View file

@ -0,0 +1,61 @@
# index navigation
bind index l display-message
bind index L limit
bind index,pager g noop # don't send group-replies with g
bind index gg first-entry
bind index G last-entry
bind index <space> collapse-thread
bind index,pager \CF next-page
bind index,pager \CB previous-page
bind index,pager N search-opposite # vim-like search
bind index s toggle-new
macro index \CS "T~U<enter><tag-prefix><clear-flag>N<untag-pattern>.<enter>" "mark all messages as read"
# Email completion bindings
bind editor <Tab> complete-query
bind editor ^T complete
# Press A to add contact to Khard address book
macro index,pager A \
"<pipe-message>khard add-email<return>" \
"add the sender email address to khard"
# mailbox navigation
macro index,pager gi "<change-folder>=inbox<enter>" "go to inbox"
macro index,pager gm "<change-folder>=important<enter>" "go to important"
macro index,pager gs "<change-folder>=sent<enter>" "go to sent"
macro index,pager gd "<change-folder>=drafts<enter>" "go to drafts"
macro index,pager gt "<change-folder>=trash<enter>" "go to trash"
macro index,pager ga "<change-folder>=archive<enter>" "go to archive"
# sidebar navigation
bind index,pager B sidebar-toggle-visible
bind index,pager <down> sidebar-next
bind index,pager <up> sidebar-prev
bind index,pager <right> sidebar-open
# search navigation
macro index a "<limit>all\n" "show all messages (undo limit)"
# notmuch search navigation
bind index \\ vfolder-from-query # notmuch search
# pager navigation
bind pager,attach h exit
bind pager l view-attachments
bind pager k previous-line
bind pager j next-line
bind pager gg top
bind pager G bottom
# compose postpone
bind compose p postpone-message
# markdown to html for composition
macro compose M "F pandoc -s -f markdown -t html \ny^T^Utext/html; charset=UTF-8\n" "Convert from MD to HTML"
# since we unbound the original g
bind index,pager R group-reply
# open urls found in the e-mail
macro index,pager \CU "|urlview<enter>" "call urlview to open links"
# Refresh far imap email
macro index O "<sync-mailbox><shell-escape>export MBSYNC_PRE=true; sync-mail<enter><sync-mailbox>" "refresh all e-mail"
macro index o "<sync-mailbox><shell-escape>export MBSYNC_PRE=true; sync-mail gmail-inbox<enter><sync-mailbox>" "refresh inbox e-mail"
# Saner copy/move dialogs
macro index C "<copy-message>?<toggle-mailboxes>" "copy a message to a mailbox"
macro index M "<save-message>?<toggle-mailboxes>" "move a message to a mailbox"

View file

@ -0,0 +1,6 @@
source colors
source settings
source maps
source account

View file

@ -0,0 +1,105 @@
# Identity
#
set realname = "Marty Oehme"
set from = "marty.oehme@gmail.com"
# # If you have another address:
# alternates "^neomutt@example\.com$"
# # Or, if you use the entire domain:
# alternates "@example\.com$"
# set reverse_name
set mail_check = 60
set mail_check_stats
set quit # at least for rapid prototyping
set sleep_time = 0 # no pause for info messages
set mark_old = no # things should only be new/unread or I actually looked at them
set pager_read_delay = 3 # mark read after 3 sec
set pipe_decode # get rid of headers when passing messages along
set auto_tag # apply commands to all tagged messages automatically
set wait_key = no # don't wait for user input after shell cmds, auto-view, piping, etc
set thorough_search = no # don't pre-process mail for ~b/~B searches
set flag_safe # make it impossible to delete flagged mails
# Pager settings
# filetypes and mailcap
set mailcap_path = "~/.config/neomutt/mailcap:~/.mailcap:/usr/share/neomutt/mailcap:/etc/mailcap:/etc/mailcap:/usr/etc/mailcap:/usr/local/etc/mailcap"
# Consult mime.types for determining types of these attachments
mime_lookup application/octet-stream
# This requires a ~/.mailcap entry with the copiousoutput flag, such as:
# text/html; lynx -dump -width ${COLUMNS:-80} %s; nametemplate=%s.html; copiousoutput
# Prefer plain text to html but multipart to plain for those only sending that
auto_view application/ics
auto_view text/calendar
auto_view text/plain
auto_view text/html
alternative_order text/calendar application/ics text/plain text/enriched text/html text/* multipart/mixed multipart/related text/plain
set count_alternatives = yes # look for attachments also in multipart/alternatives
# Remember to `mkdir -p ~/.neomutt/hcache` first:
set header_cache= "~/.neomutt/hcache"
# Compose settings
set edit_headers # allow editing headers while writing mail
set sig_dashes # separate signature from mail
set fast_reply # automatically fill in from and subject for replies
set forward_format = "Fwd: %s"
set reply_to # default send back to reply-to: header instead of from: header
set reverse_name # default to reply as person e-mail was originally sent to
set include # include original msg in reply
set forward_quote # include original msg as quote in fwd
set forward_format = "FW: %s" # subject for forwarding
set mime_forward = no # forward attachments with mail
set fcc_attach # attachments saved with body
# set editor = "emacsclient -a emacs -t"
# set editor = "vim"
set mime_type_query_command = "xdg-mime query filetype"
# send settings
set sendmail = "/usr/bin/msmtp -a personal-gmail"
set sendmail_wait = 0
# Display Settings
set allow_ansi # allow escape codes for color etc
set sort = threads
set sort_re # thread based on regex below
set reply_regex = "^(([Rr][Ee]?(\[[0-9]+\])?: *)?(\[[^]]+\] *)?)*"
set quote_regex = "^( {0,4}[>|:#%]| {0,4}[A-Za-z0-9]+[>|]+)+"
set sort_aux = last-date-received
#### Thread ordering
set use_threads=reverse
set sort='last-date'
set collapse_all = yes
set uncollapse_new = no
set thread_received = yes
set narrow_tree=no
# set date_format = "%z/%m/%d %I:%M%p"
# set date_format = "%m/%d"
# set index_format = "%4C [%Z] %{%y/%b %d} %-20.20F %s"
# sidebar view options
set sidebar_visible = yes
set sidebar_width = 24
# set sidebar_format = "%B%?F? [%F]?%* %?N?%N/?%S"
set sidebar_divider_char = ' ░'
set sidebar_folder_indent = yes
set sidebar_indent_string = ' - '
set sidebar_visible = no
set sidebar_next_new_wrap = yes
set sidebar_short_path = yes
set sidebar_component_depth = 0
color sidebar_new color221 color233
# statusbar view options
set status_chars = " *%A"
# set status_format = "───[ Folder: %f ]───[%r%m messages%?n? (%n new)?%?d? (%d to delete)?%?t? (%t tagged)? ]───%>─%?p?( %p postponed )?───"
# pager view options
set pager_index_lines = 10
set pager_context = 3
set pager_stop # do not go to next msg if at bottom of pager
set menu_scroll = yes
set tilde # show tildes for blank lines
unset markers # no + markers for wrapped stuff
set wrap = 90
# hide headers except for those explicitly unignored
ignore *
unignore From To Cc Bcc Date Subject Message-ID
unhdr_order *
unignore From To Cc Bcc Date Subject Message-ID
set query_command = "khard email --parsable --search-in-source-files '%s'"
set nm_query_type = "threads" # Makes notmuch return threads rather than messages