diff --git a/.config/isyncrc b/.config/isyncrc new file mode 100644 index 00000000..603b6573 --- /dev/null +++ b/.config/isyncrc @@ -0,0 +1,22 @@ +# Remote Vault +IMAPStore proton-remote +Account proton + +# Local Vault +MaildirStore proton-local +Path ~/.mail/proton/ +Inbox ~/.mail/proton/INBOX +Subfolders Verbatim + +# Sync Channel +Channel proton-default +Far :proton-remote: +Near :proton-local: +Patterns * !"All Mail" +Create Both +Expunge Both +SyncState * + +# Sync Inbox +Group proton +Channel proton-default diff --git a/.config/neomutt/.github/README.md b/.config/neomutt/.github/README.md new file mode 100644 index 00000000..affa9d51 --- /dev/null +++ b/.config/neomutt/.github/README.md @@ -0,0 +1,3 @@ +
+ +
diff --git a/.config/neomutt/.github/title.png b/.config/neomutt/.github/title.png new file mode 100644 index 00000000..f6631a47 Binary files /dev/null and b/.config/neomutt/.github/title.png differ diff --git a/.config/neomutt/binds b/.config/neomutt/binds new file mode 100644 index 00000000..b20c625f --- /dev/null +++ b/.config/neomutt/binds @@ -0,0 +1,52 @@ +# vim: filetype=muttrc +#------------------------------------------------------------ +# Vi Key Bindings +#------------------------------------------------------------ + +# Moving around +bind attach,browser,index g noop +bind attach,browser,index gg first-entry +bind attach,browser,index G last-entry +bind pager g noop +bind pager gg top +bind pager G bottom +bind pager k previous-line +bind pager j next-line + +# Scrolling +bind attach,browser,pager,index \CF next-page +bind attach,browser,pager,index \CB previous-page +bind attach,browser,pager,index \Cu half-up +bind attach,browser,pager,index \Cd half-down +bind browser,pager \Ce next-line +bind browser,pager \Cy previous-line +bind index \Ce next-line +bind index \Cy previous-line + +bind pager,index d noop +bind pager,index dd delete-message + +# Mail & Reply +bind index \Cm list-reply # Doesn't work currently + +# Threads +bind browser,pager,index N search-opposite +bind pager,index dT delete-thread +bind pager,index dt delete-subthread +bind pager,index gt next-thread +bind pager,index gT previous-thread +bind index za collapse-thread +bind index zA collapse-all # Missing :folddisable/foldenable + +bind attach view-mailcap +bind attach l view-mailcap + +bind index,pager B sidebar-toggle-visible + +macro compose A "bash $HOME/.config/neomutt/scripts/filepickersource $HOME/.config/neomutt/tmpfilebash $HOME/.config/neomutt/scripts/filepicker clean" "Attach with yazi" + +# Go to specific folder +macro index gd "$postponed" "go to drafts" +macro index gs "$record" "go to sent" +macro index gi "$spoolfile" "go to inbox" +macro index gt "$trash" "go to trash" diff --git a/.config/neomutt/mailcap b/.config/neomutt/mailcap new file mode 100644 index 00000000..5b7168d8 --- /dev/null +++ b/.config/neomutt/mailcap @@ -0,0 +1,16 @@ +# MS Word documents +application/msword; xdg-open %s +application/vnd.ms-excel; xdg-open %s +application/vnd.openxmlformats-officedocument.presentationml.presentation; xdg-open %s +application/vnd.oasis.opendocument.text; xdg-open %s + +# HTML +text/html; w3m -o auto_image=TRUE -I %{charset} -T text/html; copiousoutput; +text/plain; nvim %s + +# PDF +application/pdf; xdg-open %s + +# Images +image/png; xdg-open %s +image/jpeg; xdg-open %s diff --git a/.config/neomutt/neomuttrc b/.config/neomutt/neomuttrc new file mode 100644 index 00000000..30aedd62 --- /dev/null +++ b/.config/neomutt/neomuttrc @@ -0,0 +1,8 @@ +# vim: filetype=muttrc +# Accounts +source "~/.config/neomutt/accounts/account.com.example" + +# Source Files +source "~/.config/neomutt/binds" +source "~/.config/neomutt/options" +source "~/.config/neomutt/theme" diff --git a/.config/neomutt/options b/.config/neomutt/options new file mode 100644 index 00000000..8b83d871 --- /dev/null +++ b/.config/neomutt/options @@ -0,0 +1,43 @@ +# vim: filetype=muttrc +# General settings +set editor='nvim' +set attach_save_dir="~/downloads/mail-attachments" +set mailcap_path = ~/.config/neomutt/mailcap + +# Open mails on html view by default +auto_view text/html text/calendar +alternative_order text/calendar text/plain text/enriched text/html text/* + +set sidebar_visible=yes +set sidebar_width=30 +set sidebar_short_path=yes + +set pager_stop # don't go to next message automatically +set menu_scroll # scroll in menus +set pager_format="%4C %Z %[!%b %e at %I:%M %p] %.20n %s%* -- (%P)" +set wait_key=no + +set smart_wrap +set reflow_wrap=120 +set reflow_text + +set attach_format = '%u%D%I %t%4n %T%.40d%> [%.12m/%.12M, %.6e%?C?, %C?, %s] ' +set folder_format = '%4C %t %f' + +# Index View Options --------------------------------- +set date_format = "%d/%m/%y at %H:%M" + +# Status Bar {{{ +set status_chars = '—+#~' +set status_on_top = yes + +## status_format - format of summary on the current folder in the index +# https://www.neomutt.org/guide/reference.html#status-format +## +## %??? optionally print string, if>0 +## Default: -%r-NeoMutt: %f [Msgs:%?M?%M/?%m%?n? New:%n?%?o? Old:%o?%?d? Del:%d?%?F? Flag:%F?%?t? Tag:%t?%?p? Post:%p?%?b? Inc:%b?%?l? %l?]---(%s/%S)-%>-(%P)--- +# set status_format = "%f%r—[%?M?%M/?%m messages, %?n?%n new, ?%?d?%d deleted, ?%?F?%F important, ?%?t?%t selected, ?%?p?%p drafts, ?%l]———(%s/%S)—%>—(%P)———" +set status_format = "%D %?u?[ %u] ?%?R?[ %R] ?%?d?[ %d] ?%?t?[ %t] ?%?F?[ %F] ?%?p?[ %p]? \n \n" + +# Default is: Mutt with %?m?%m messages&no messages?%?n? [%n NEW]? +set ts_status_format = 'mutt %m messages%?n?, %n new?' diff --git a/.config/neomutt/scripts/dirpicker b/.config/neomutt/scripts/dirpicker new file mode 100755 index 00000000..e9b5132f --- /dev/null +++ b/.config/neomutt/scripts/dirpicker @@ -0,0 +1,10 @@ +#!/bin/sh + +tmpfile=$HOME/.config/neomutt/tmpdir + +if \[ -z "$1" \]; then + yazi --cwd-file $tmpfile && + echo "$(awk 'BEGIN {printf "%s", "push "} {printf "%s", "\""$0"\""}' $tmpfile)" >$tmpfile +elif \[ $1 == "clean" \]; then + rm $tmpfile +fi diff --git a/.config/neomutt/scripts/filepicker b/.config/neomutt/scripts/filepicker new file mode 100755 index 00000000..2417f7f2 --- /dev/null +++ b/.config/neomutt/scripts/filepicker @@ -0,0 +1,11 @@ +#!/bin/sh + +tmpfile=$HOME/.config/neomutt/tmpfile + +if \[ -z "$1" \]; then + yazi --chooser-file $tmpfile && + sed -i 's/ /^V /g' $tmpfile && + echo "$(awk 'BEGIN {printf "%s", "push "} {printf "%s", "\""$0"\""}' $tmpfile)" >$tmpfile +elif \[ $1 == "clean" \]; then + rm $tmpfile +fi diff --git a/.config/neomutt/theme b/.config/neomutt/theme new file mode 100644 index 00000000..f55e9fe3 --- /dev/null +++ b/.config/neomutt/theme @@ -0,0 +1,104 @@ +# vim: filetype=muttrc + +# 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 color0 +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 +# color normal default default # Text is "Text" +# color index color2 default ~N # New Messages are Green +# color index color1 default ~F # Flagged messages are Red +# color index color13 default ~T # Tagged Messages are Red +# color index color1 default ~D # Messages to delete are Red +# color attachment color5 default # Attachments are Pink +# color signature color8 default # Signatures are Surface 2 +# color search color4 default # Highlighted results are Blue +# +# color indicator default color8 # currently highlighted message Surface 2=Background Text=Foreground +# color error color1 default # error messages are Red +# color status color15 default # status line "Subtext 0" +# color tree color15 default # thread tree arrows Subtext 0 +# color tilde color15 default # blank line padding Subtext 0 +# +# color hdrdefault color13 default # default headers Pink +# color header color13 default "^From:" +# color header color13 default "^Subject:" +# +# color quoted color15 default # Subtext 0 +# color quoted1 color7 default # Subtext 1 +# color quoted2 color8 default # Surface 2 +# color quoted3 color0 default # Surface 1 +# color quoted4 color0 default +# color quoted5 color0 default +# +# color body color2 default [\-\.+_a-zA-Z0-9]+@[\-\.a-zA-Z0-9]+ # email addresses Green +# color body color2 default (https?|ftp)://[\-\.,/%~_:?&=\#a-zA-Z0-9]+ # URLs Green +# color body color4 default (^|[[:space:]])\\*[^[:space:]]+\\*([[:space:]]|$) # *bold* text Blue +# color body color4 default (^|[[:space:]])_[^[:space:]]+_([[:space:]]|$) # _underlined_ text Blue +# color body color4 default (^|[[:space:]])/[^[:space:]]+/([[:space:]]|$) # /italic/ text Blue +# +# color sidebar_flagged color1 default # Mailboxes with flagged mails are Red +# color sidebar_new color10 default # Mailboxes with new mail are Green