diff --git a/.config/neomutt/binds b/.config/neomutt/binds new file mode 100644 index 0000000..6d1b4e4 --- /dev/null +++ b/.config/neomutt/binds @@ -0,0 +1,67 @@ +# vim: filetype=muttrc + +# ESC e to "recall" messages from draft folder + +# General rebindings +bind attach view-mailcap +bind attach l view-mailcap +bind editor noop +bind pager c imap-fetch-mail +bind index G last-entry +bind index g noop +bind index gg first-entry +bind pager,attach h exit +bind pager j next-line +bind pager k previous-line +bind pager l view-attachments +bind index D delete-message +bind index U undelete-message +bind index L limit +bind index h noop +bind index l display-message +bind browser h goto-parent +bind browser l select-entry +bind pager,browser gg top-page +bind pager,browser G bottom-page +bind index,pager,browser d half-down +bind index,pager,browser u half-up +bind index,pager R group-reply +bind index \031 previous-undeleted # Mouse wheel +bind index \005 next-undeleted # Mouse wheel +bind pager \031 previous-line # Mouse wheel +bind pager \005 next-line # Mouse wheel +bind editor complete-query + + +# sidebar mappings +bind index,pager \Ck sidebar-prev +bind index,pager \Cj sidebar-next +bind index,pager \Co sidebar-open +bind index,pager \Cp sidebar-prev-new +bind index,pager \Cn sidebar-next-new +bind index,pager B sidebar-toggle-visible + +# global index and pager shortcuts +bind index,pager @ compose-to-sender +bind index,pager D purge-message +bind index sync-mailbox +bind index collapse-thread + +# Email completion bindings +bind editor complete-query +bind editor ^T complete + +# Press A to add contact to Khard address book +macro index,pager A \ + "khard add-email" \ + "add the sender email address to khard" + +## Shortcuts + + +macro index,pager 'source ~/.config/neomutt/accounts/main!' + +#macro index,pager 'source ~/.config/neomutt/accounts/gmail!' +#macro index,pager 'source ~/.config/neomutt/accounts/main!' +#macro index,pager 'source ~/.config/neomutt/accounts/school!' + diff --git a/.config/neomutt/colors b/.config/neomutt/colors new file mode 100644 index 0000000..aa77d0f --- /dev/null +++ b/.config/neomutt/colors @@ -0,0 +1,42 @@ +############################################################################### +# Dracula Theme for Mutt: https://draculatheme.com/ +# +# @author Paul Townsend + +# general ------------ foreground ---- background ----------------------------- +color error color231 color212 +color indicator color231 color241 +color markers color210 default +color message default default +color normal default default +color prompt default default +color search color84 default +color status color141 color236 +color tilde color231 default +color tree color141 default + +# message index ------ foreground ---- background ----------------------------- +color index color210 default ~D # deleted messages +color index color84 default ~F # flagged messages +color index color117 default ~N # new messages +color index color212 default ~Q # messages which have been replied to +color index color215 default ~T # tagged messages +color index color141 default ~v # messages part of a collapsed thread + +# message headers ---- foreground ---- background ----------------------------- +color hdrdefault color117 default +color header color231 default ^Subject:.* + +# message body ------- foreground ---- background ----------------------------- +color attachment color228 default +color body color231 default [\-\.+_a-zA-Z0-9]+@[\-\.a-zA-Z0-9]+ # email addresses +color body color228 default (https?|ftp)://[\-\.,/%~_:?&=\#a-zA-Z0-9]+ # URLs +color body color231 default (^|[[:space:]])\\*[^[:space:]]+\\*([[:space:]]|$) # *bold* text +color body color231 default (^|[[:space:]])_[^[:space:]]+_([[:space:]]|$) # _underlined_ text +color body color231 default (^|[[:space:]])/[^[:space:]]+/([[:space:]]|$) # /italic/ text +color quoted color61 default +color quoted1 color117 default +color quoted2 color84 default +color quoted3 color215 default +color quoted4 color212 default +color signature color212 default diff --git a/.config/neomutt/mailcap b/.config/neomutt/mailcap new file mode 100644 index 0000000..1d34f83 --- /dev/null +++ b/.config/neomutt/mailcap @@ -0,0 +1,17 @@ + +# HTML +# Opens HTML in w3m in separate window but unsupported in pager +# text/html; w3m -I %{charset} -T text/html; +# Opens HTML as plaintext +# text/html; w3m -I %{charset} -T text/html; copiousoutput; +text/plain; nvim %s +text/html; firefox %s; test=test -n "$DISPLAY"; +text/html; w3m -v -F -T text/html %s; + +# PDF +application/pdf; /usr/bin/zathura %s pdf + +#Images +image/png; /usr/bin/feh %s +image/jpeg; /usr/bin/feh %s + diff --git a/.config/neomutt/neomuttrc b/.config/neomutt/neomuttrc new file mode 100644 index 0000000..544da30 --- /dev/null +++ b/.config/neomutt/neomuttrc @@ -0,0 +1,12 @@ +# vim: filetype=muttrc +# https://gideonwolfe.com/posts/workflow/neomutt/intro/ +# https://www.gideonwolfe.com/posts/sysadmin/nextcloud/nextcloudworkflow/ + +source ~/.config/neomutt/settings +source ~/.config/neomutt/colors +source ~/.config/neomutt/binds + +# Accounts +source ~/.config/neomutt/accounts/main +folder-hook $folder 'source ~/.config/neomutt/accounts/main' + diff --git a/.config/neomutt/settings b/.config/neomutt/settings new file mode 100644 index 0000000..c5bc69e --- /dev/null +++ b/.config/neomutt/settings @@ -0,0 +1,89 @@ +# vim: filetype=muttrc +# General neomutt settings + +# Editor +set editor = "nvim" + +# Name (this needs to be changed either way) +set my_name = "earnest ma" + +# Get all subscribed folders +set imap_check_subscribed + +# Set preferred view modes +auto_view text/html text/calendar application/ics # view html automatically +alternative_order text/plain text/html text/enriched text/* +auto_view text/html # if there is only html dump that + +# Main options +set envelope_from # Determine message's sender from "From:" header +set edit_headers # show headers when composing +set fast_reply # skip to compose when replying +set askcc # ask for CC: +set fcc_attach # save attachments with the body +set forward_format = "Fwd: %s" # format of subject when forwarding +set forward_decode # decode when forwarding +set attribution = "On %d, %n wrote:" # format of quoting header +set reply_to # reply to Reply to: field +set reverse_name # reply as whomever it was to +set include # include message in replies +set forward_quote # include message in forwards +set text_flowed # Use format=flowed +# set listchars=trail:• # Mark trailing spaces +# unset sig_dashes # no dashes before sig +unset mime_forward # forward attachments as part of body +# unset help # No help bar at the top of index +set status_on_top # Status bar on top of index +set tmpdir = ~/.cache/neomutt # where to keep temp files + +unset confirmappend # don't ask, just do! +set quit # don't ask, just do!! +unset mark_old # read/new is good enough for me +set beep_new # bell on new mails +set pipe_decode # strip headers and eval mimes when piping +set thorough_search # strip headers and eval mimes before searching +set timeout = 300 + +# status bar, date format, finding stuff etc. +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 )?" +set date_format = "%d.%m.%Y %H:%M" +set sort = threads +set sort_aux = reverse-last-date-received +set uncollapse_jump +set sort_re +set reply_regexp = "^(([Rr][Ee]?(\[[0-9]+\])?: *)?(\[[^]]+\] *)?)*" +set quote_regexp = "^( {0,4}[>|:#%]| {0,4}[a-z0-9]+[>|]+)+" +set send_charset = "utf-8:iso-8859-1:us-ascii" +set charset = "utf-8" +set arrow_cursor = "no" # Change `color indicator` depending + +# Auto-sync +timeout-hook 'exec sync-mailbox' +# When NeoMutt first loads, run this NeoMutt command +startup-hook 'exec sync-mailbox' +# When NeoMutt quits, run this NeoMutt command +shutdown-hook 'exec sync-mailbox' + +# Sidebar +set mail_check_stats = yes +set sidebar_format = "%B%?F? [%F]?%* %?N?%N/?%S" +set sidebar_visible=yes +set sidebar_width=20 +set sidebar_divider_char=' │ ' +# set sidebar_short_path + +# Pager View Options +set pager_index_lines = 10 # Shows 10 lines of index when pager is active +set pager_context = 3 +set pager_stop +set menu_scroll +set tilde +unset markers + +set mailcap_path = ~/.config/neomutt/mailcap +set header_cache = "~/.cache/neomutt" +set message_cachedir = "~/.cache/neomutt" + +set query_command = "khard email --parsable --search-in-source-files '%s'" +