diff options
author | Yigit Sever | 2021-10-12 01:01:01 +0300 |
---|---|---|
committer | Yigit Sever | 2021-10-12 01:01:01 +0300 |
commit | 22bafa21869fb47d8f6568a0e047c226926f20e0 (patch) | |
tree | 90b18965b589d95e27e166186ddc32ca8f92471b /.config/mutt/muttrc | |
parent | 20e42aa0d070f0c09ab20bf4ab42c3495a807e1c (diff) | |
download | dotfiles-22bafa21869fb47d8f6568a0e047c226926f20e0.tar.gz dotfiles-22bafa21869fb47d8f6568a0e047c226926f20e0.tar.bz2 dotfiles-22bafa21869fb47d8f6568a0e047c226926f20e0.zip |
mutt: free from the shackles
Diffstat (limited to '.config/mutt/muttrc')
-rw-r--r-- | .config/mutt/muttrc | 177 |
1 files changed, 155 insertions, 22 deletions
diff --git a/.config/mutt/muttrc b/.config/mutt/muttrc index 6bb2b11..55762c0 100644 --- a/.config/mutt/muttrc +++ b/.config/mutt/muttrc | |||
@@ -1,15 +1,160 @@ | |||
1 | # vim: filetype=neomuttrc | 1 | # vim: filetype=neomuttrc |
2 | source /usr/local/share/mutt-wizard/mutt-wizard.muttrc # mw-autogenerated | 2 | ############ |
3 | source /home/yigit/.config/mutt/accounts/1-ceng_argor.muttrc # mw-autogenerated | 3 | # stolen # |
4 | macro index,pager i1 '<sync-mailbox><enter-command>source /home/yigit/.config/mutt/accounts/1-ceng_argor.muttrc<enter><change-folder>!<enter>;<check-stats>' "switch to yigit@ceng.metu.edu.tr" # mw-autogenerated | 4 | ############ |
5 | macro index,pager i2 '<sync-mailbox><enter-command>source /home/yigit/.config/mutt/accounts/2-metu_argor.muttrc<enter><change-folder>!<enter>;<check-stats>' "switch to ysever@metu.edu.tr" # mw-autogenerated | 5 | set mailcap_path = /home/yigit/.config/mutt/mailcap |
6 | macro index,pager i3 '<sync-mailbox><enter-command>source /home/yigit/.config/mutt/accounts/3-ceng_stu.muttrc<enter><change-folder>!<enter>;<check-stats>' "switch to e2482057@ceng.metu.edu.tr" # mw-autogenerated | 6 | set date_format="%y/%m/%d %I:%M%p" |
7 | macro index,pager i4 '<sync-mailbox><enter-command>source /home/yigit/.config/mutt/accounts/4-metu_stu.muttrc<enter><change-folder>!<enter>;<check-stats>' "switch to e248205@metu.edu.tr" # mw-autogenerated | 7 | set smtp_authenticators = 'gssapi:login' |
8 | macro index,pager i5 '<sync-mailbox><enter-command>source /home/yigit/.config/mutt/accounts/5-xyz.muttrc<enter><change-folder>!<enter>;<check-stats>' "switch to yigit@yigitsever.com" # mw-autogenerated | 8 | set rfc2047_parameters = yes |
9 | set mark_old = no # Unread mail stay unread until read | ||
10 | set mime_forward = yes # attachments are forwarded with mail | ||
11 | set fast_reply # skip to compose when replying | ||
12 | set fcc_attach # save attachments with the body | ||
13 | set forward_format = "Fwd: %s" # format of subject when forwarding | ||
14 | set forward_quote # include message in forwards | ||
15 | set reverse_name # reply as whomever it was to | ||
16 | set mail_check=60 # to avoid lags using IMAP with some email providers (yahoo for example) | ||
17 | auto_view text/html # automatically show html (mailcap uses w3m) | ||
18 | auto_view application/pgp-encrypted | ||
19 | alternative_order text/plain text/enriched text/html | ||
20 | bind index,pager i noop | ||
21 | bind index,pager g noop | ||
22 | bind index \Cf noop | ||
23 | |||
24 | # General rebindings | ||
25 | bind index j next-entry | ||
26 | bind index k previous-entry | ||
27 | bind attach <return> view-mailcap | ||
28 | bind attach l view-mailcap | ||
29 | bind editor <space> noop | ||
30 | bind index G last-entry | ||
31 | bind index gg first-entry | ||
32 | bind pager,attach h exit | ||
33 | bind pager j next-line | ||
34 | bind pager k previous-line | ||
35 | bind pager l view-attachments | ||
36 | bind index D delete-message | ||
37 | bind index U undelete-message | ||
38 | bind index L limit | ||
39 | bind index h noop | ||
40 | bind index l display-message | ||
41 | bind index,query <space> tag-entry | ||
42 | macro browser h '<change-dir><kill-line>..<enter>' "Go to parent folder" | ||
43 | bind index,pager H view-raw-message | ||
44 | bind browser l select-entry | ||
45 | bind pager,browser gg top-page | ||
46 | bind pager,browser G bottom-page | ||
47 | bind index,pager,browser d half-down | ||
48 | bind index,pager,browser u half-up | ||
49 | bind index,pager S sync-mailbox | ||
50 | bind index,pager R group-reply | ||
51 | bind index \031 previous-undeleted # Mouse wheel | ||
52 | bind index \005 next-undeleted # Mouse wheel | ||
53 | bind pager \031 previous-line # Mouse wheel | ||
54 | bind pager \005 next-line # Mouse wheel | ||
55 | bind editor <Tab> complete-query | ||
56 | |||
57 | macro index \Cr "T~U<enter><tag-prefix><clear-flag>N<untag-pattern>.<enter>" "mark all messages as read" | ||
58 | macro index O "<shell-escape>mbsync -a<enter>" "run mbsync to sync all mail" | ||
59 | macro index \Cf "<enter-command>unset wait_key<enter><shell-escape>read -p 'Enter a search term to find with notmuch: ' x; echo \$x >~/.cache/mutt_terms<enter><limit>~i \"\`notmuch search --output=messages \$(cat ~/.cache/mutt_terms) | head -n 600 | perl -le '@a=<>;s/\^id:// for@a;$,=\"|\";print@a' | perl -le '@a=<>; chomp@a; s/\\+/\\\\+/ for@a;print@a' \`\"<enter>" "show only messages matching a notmuch pattern" | ||
60 | macro index a "<limit>all\n" "show all messages (undo limit)" | ||
61 | |||
62 | # Sidebar mappings | ||
63 | set sidebar_visible = yes | ||
64 | set sidebar_width = 20 | ||
65 | set sidebar_short_path = yes | ||
66 | set sidebar_next_new_wrap = yes | ||
67 | set mail_check_stats | ||
68 | bind index,pager \Ck sidebar-prev | ||
69 | bind index,pager \Cj sidebar-next | ||
70 | bind index,pager \Co sidebar-open | ||
71 | bind index,pager \Cp sidebar-prev-new | ||
72 | bind index,pager \Cn sidebar-next-new | ||
73 | bind index,pager B sidebar-toggle-visible | ||
74 | |||
75 | # Default index colors: | ||
76 | color index yellow default '.*' | ||
77 | color index_author red default '.*' | ||
78 | color index_number blue default | ||
79 | color index_subject cyan default '.*' | ||
80 | |||
81 | # New mail is boldened: | ||
82 | color index brightyellow black "~N" | ||
83 | color index_author brightred black "~N" | ||
84 | color index_subject brightcyan black "~N" | ||
85 | |||
86 | # Tagged mail is highlighted: | ||
87 | color index brightyellow blue "~T" | ||
88 | color index_author brightred blue "~T" | ||
89 | color index_subject brightcyan blue "~T" | ||
90 | |||
91 | # Other colors and aesthetic settings: | ||
92 | mono bold bold | ||
93 | mono underline underline | ||
94 | mono indicator reverse | ||
95 | mono error bold | ||
96 | color normal default default | ||
97 | color indicator brightblack white | ||
98 | color sidebar_highlight red default | ||
99 | color sidebar_divider brightblack black | ||
100 | color sidebar_flagged red black | ||
101 | color sidebar_new green black | ||
102 | color normal brightyellow default | ||
103 | color error red default | ||
104 | color tilde black default | ||
105 | color message cyan default | ||
106 | color markers red white | ||
107 | color attachment white default | ||
108 | color search brightmagenta default | ||
109 | color status brightyellow black | ||
110 | color hdrdefault brightgreen default | ||
111 | color quoted green default | ||
112 | color quoted1 blue default | ||
113 | color quoted2 cyan default | ||
114 | color quoted3 yellow default | ||
115 | color quoted4 red default | ||
116 | color quoted5 brightred default | ||
117 | color signature brightgreen default | ||
118 | color bold black default | ||
119 | color underline black default | ||
120 | color normal default default | ||
121 | |||
122 | # Regex highlighting: | ||
123 | color header blue default ".*" | ||
124 | color header brightmagenta default "^(From)" | ||
125 | color header brightcyan default "^(Subject)" | ||
126 | color header brightwhite default "^(CC|BCC)" | ||
127 | color body brightred default "[\-\.+_a-zA-Z0-9]+@[\-\.a-zA-Z0-9]+" # Email addresses | ||
128 | color body brightblue default "(https?|ftp)://[\-\.,/%~_:?&=\#a-zA-Z0-9]+" # URL | ||
129 | color body green default "\`[^\`]*\`" # Green text between ` and ` | ||
130 | color body brightblue default "^# \.*" # Headings as bold blue | ||
131 | color body brightcyan default "^## \.*" # Subheadings as bold cyan | ||
132 | color body brightgreen default "^### \.*" # Subsubheadings as bold green | ||
133 | color body yellow default "^(\t| )*(-|\\*) \.*" # List items as yellow | ||
134 | color body brightcyan default "[;:][-o][)/(|]" # emoticons | ||
135 | color body brightcyan default "[;:][)(|]" # emoticons | ||
136 | color body brightcyan default "[ ][*][^*]*[*][ ]?" # more emoticon? | ||
137 | color body brightcyan default "[ ]?[*][^*]*[*][ ]" # more emoticon? | ||
138 | color body red default "(BAD signature)" | ||
139 | color body cyan default "(Good signature)" | ||
140 | color body brightblack default "^gpg: Good signature .*" | ||
141 | color body brightyellow default "^gpg: " | ||
142 | color body brightyellow red "^gpg: BAD signature from.*" | ||
143 | mono body bold "^gpg: Good signature" | ||
144 | mono body bold "^gpg: BAD signature from.*" | ||
145 | 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<>\"]" | ||
9 | 146 | ||
10 | bind generic z noop | 147 | bind generic z noop |
11 | bind generic Z noop | 148 | bind generic Z noop |
12 | 149 | ||
150 | source /home/yigit/.config/mutt/accounts/1-ceng_argor.muttrc | ||
151 | macro index,pager i1 '<sync-mailbox><enter-command>source /home/yigit/.config/mutt/accounts/1-ceng_argor.muttrc<enter><change-folder>!<enter>;<check-stats>' "switch to yigit@ceng.metu.edu.tr" | ||
152 | macro index,pager i2 '<sync-mailbox><enter-command>source /home/yigit/.config/mutt/accounts/2-metu_argor.muttrc<enter><change-folder>!<enter>;<check-stats>' "switch to ysever@metu.edu.tr" | ||
153 | macro index,pager i3 '<sync-mailbox><enter-command>source /home/yigit/.config/mutt/accounts/3-ceng_stu.muttrc<enter><change-folder>!<enter>;<check-stats>' "switch to e2482057@ceng.metu.edu.tr" | ||
154 | macro index,pager i4 '<sync-mailbox><enter-command>source /home/yigit/.config/mutt/accounts/4-metu_stu.muttrc<enter><change-folder>!<enter>;<check-stats>' "switch to e248205@metu.edu.tr" | ||
155 | macro index,pager i5 '<sync-mailbox><enter-command>source /home/yigit/.config/mutt/accounts/5-xyz.muttrc<enter><change-folder>!<enter>;<check-stats>' "switch to yigit@yigitsever.com" | ||
156 | |||
157 | # to set vim autocommands | ||
13 | set tmpdir="/tmp/neomutt" | 158 | set tmpdir="/tmp/neomutt" |
14 | 159 | ||
15 | # character set for outgoing messages | 160 | # character set for outgoing messages |
@@ -64,20 +209,12 @@ set sleep_time=0 | |||
64 | set abort_nosubject=no | 209 | set abort_nosubject=no |
65 | set abort_unmodified=no | 210 | set abort_unmodified=no |
66 | 211 | ||
67 | # # Cache message headers here. This takes very little space and makes opening large folders much faster. | ||
68 | # # See header-caching | ||
69 | # # Big conf file does this for us, ~y | ||
70 | # set header_cache=~/.config/mutt/cache/headers/ | ||
71 | |||
72 | # # Make things faster at the cost of a negligible amount of disk space. | ||
73 | # # See <file:///usr/share/doc/neomutt/manual.html#body-caching>. | ||
74 | # # Big conf file does this for us | ||
75 | # set message_cachedir=~/.config/mutt/cache/ | ||
76 | |||
77 | # TODO: maybe check out <https://github.com/pimutils/mates.rs>. | 212 | # TODO: maybe check out <https://github.com/pimutils/mates.rs>. |
78 | set query_command="khard email --parsable '%s'" | 213 | set query_command="khard email --parsable '%s'" |
79 | # The editor menu is "command-line mode", i.e., what you when hitting colon. | 214 | # The editor menu is "command-line mode", i.e., what you when hitting colon. |
80 | # See <file:///usr/share/doc/neomutt/manual.html#editor-map>. | 215 | # See <file:///usr/share/doc/neomutt/manual.html#editor-map>. |
216 | unset query_command | ||
217 | # TODO: and we are immediately unsetting it, dunno why <12-10-21, yigit> # | ||
81 | 218 | ||
82 | # When a message contains both plain text and HTML, prefer viewing plain text. | 219 | # When a message contains both plain text and HTML, prefer viewing plain text. |
83 | alternative_order text/plain text/html | 220 | alternative_order text/plain text/html |
@@ -87,8 +224,8 @@ bind editor <Tab> complete-query | |||
87 | # The format string reduces the amount of information compared to the default and doesn't use hyphens for padding. | 224 | # The format string reduces the amount of information compared to the default and doesn't use hyphens for padding. |
88 | # See <http://www.mutt.org/doc/manual/#status-format>. | 225 | # See <http://www.mutt.org/doc/manual/#status-format>. |
89 | # set status_format="%f%?V?/%V? [%m%?M?, %M shown?%?n?, %n new?%?o?, %o old?%?d?, %d deleted?%?F?, %F flagged?%?t?, %t tagged?%?p?, %p postponed?] %> %P" | 226 | # set status_format="%f%?V?/%V? [%m%?M?, %M shown?%?n?, %n new?%?o?, %o old?%?d?, %d deleted?%?F?, %F flagged?%?t?, %t tagged?%?p?, %p postponed?] %> %P" |
90 | # set index_format="hi" | ||
91 | set index_format="%2C %Z %?X?A& ? %[%e %b %y %R] %-15.15F %s (%-4.4c)" | 227 | set index_format="%2C %Z %?X?A& ? %[%e %b %y %R] %-15.15F %s (%-4.4c)" |
228 | set sidebar_format = "%D%?F? [%F]?%* %?N?%N/? %?S?%S?" | ||
92 | 229 | ||
93 | # See <file:///usr/share/doc/neomutt/manual.html#compose-format>). | 230 | # See <file:///usr/share/doc/neomutt/manual.html#compose-format>). |
94 | # Also get rid of the hyphens again. | 231 | # Also get rid of the hyphens again. |
@@ -106,8 +243,6 @@ set crypt_opportunistic_encrypt = no | |||
106 | set pgp_self_encrypt = yes | 243 | set pgp_self_encrypt = yes |
107 | set pgp_default_key = 198466C2F5664940F73A1715B87B63C533C38A88 | 244 | set pgp_default_key = 198466C2F5664940F73A1715B87B63C533C38A88 |
108 | 245 | ||
109 | unset query_command | ||
110 | |||
111 | macro index,pager A \ | 246 | macro index,pager A \ |
112 | "<pipe-message>khard add-email<return>" \ | 247 | "<pipe-message>khard add-email<return>" \ |
113 | "add the sender email address to khard" | 248 | "add the sender email address to khard" |
@@ -145,5 +280,3 @@ color index_flags color239 default "EDAS" | |||
145 | color index_subject color239 default "~f @igi-global.com" | 280 | color index_subject color239 default "~f @igi-global.com" |
146 | color index_author color239 default "~f @igi-global.com" | 281 | color index_author color239 default "~f @igi-global.com" |
147 | color index_flags color239 default "~f @igi-global.com" | 282 | color index_flags color239 default "~f @igi-global.com" |
148 | |||
149 | set sidebar_format = "%D%?F? [%F]?%* %?N?%N/? %?S?%S?" | ||