aboutsummaryrefslogtreecommitdiffhomepage
path: root/mutt
diff options
context:
space:
mode:
authorHsieh Chin Fan <typebrook@gmail.com>2022-04-05 15:00:11 +0800
committerHsieh Chin Fan <typebrook@gmail.com>2022-04-05 15:00:11 +0800
commitdcd2c83a44b9372f8602a57a34e2c9066abd1ec5 (patch)
treeb0222a8191405b531c8d589a4e72d447f190923c /mutt
parent2b4bc30472064b0181fb56b63eb3dab3a1c8d19a (diff)
update
Diffstat (limited to 'mutt')
-rw-r--r--mutt/mailcap2
-rw-r--r--mutt/muttrc163
2 files changed, 165 insertions, 0 deletions
diff --git a/mutt/mailcap b/mutt/mailcap
new file mode 100644
index 0000000..b3ae9f4
--- /dev/null
+++ b/mutt/mailcap
@@ -0,0 +1,2 @@
1text/html; xdg-open '%s' &; test=test -n "$DISPLAY"; needsterminal;
2text/html; lynx -dump %s; nametemplate=%s.html; copiousoutput;
diff --git a/mutt/muttrc b/mutt/muttrc
new file mode 100644
index 0000000..deeee67
--- /dev/null
+++ b/mutt/muttrc
@@ -0,0 +1,163 @@
1# IMAP/SMTP settings
2set folder = "imaps://pham@mail.topo.tw:993/"
3set imap_pass = `pass pham@topo.tw`
4set header_cache = "~/.cache/mutt"
5set message_cachedir = "~/.cache/mutt"
6set smtp_url = "smtp://pham@mail.topo.tw:25"
7set smtp_pass = "$imap_pass"
8
9# Identify meself
10set from = "pham@topo.tw"
11set realname = "謝晉凡 Hsieh Chin Fan"
12set signature="$SETTING_DIR/.signature"
13set pgp_use_gpg_agent=yes
14set crypt_use_gpgme=yes
15set pgp_timeout=300
16set pgp_sign_as=6DD8C14A # replace 6DD8C14A with your gpg key id
17
18# Basic Mailbox
19set spoolfile = "+INBOX"
20set mbox= "+mbox"
21set move = yes
22set record = "+Sent"
23set trash = "+Trash"
24set postponed = "+Drafts"
25
26subscribe talk-tw@openstreetmap.org
27
28# Interface
29set editor = "vim"
30set charset = "utf-8"
31set send_charset = "us-ascii:utf-8"
32set header = no
33set pager_stop
34set sleep_time = 0 # When changing folder
35set timeout = 10
36set quit = ask-no
37set sort = threads
38set pager_index_lines = 5
39set markers = no # Remove '+' for long links with limited terminal width
40set index_format = "%4C %8Y %Z %(%b %d) %-15.15L (%?l?%4l&%4c?) %s"
41
42# Vim-style key binding, \c means Ctrl
43# ref: https://fancyseeker.github.io/2015/08/19/mutt/#vim%E9%A3%8E%E6%A0%BC%E9%94%AE%E4%BD%8D%E7%BB%91%E5%AE%9A
44bind index <Return> sync-mailbox
45bind index q browse-mailboxes
46bind index y edit-label
47bind index x tag-entry
48bind index t edit-label
49bind index \cl limit
50bind index \cj next-entry
51bind index \ck previous-entry
52bind index,browser G last-entry
53bind index,browser g noop
54bind index,browser gg first-entry
55bind index \cf next-page
56bind index \cb previous-page
57bind index \cd half-down
58bind index \cu half-up
59bind index } bottom-page
60bind pager G bottom
61bind pager g noop
62bind pager gg top
63bind pager j next-line
64bind pager k previous-line
65bind pager \cf next-page
66bind pager \cb previous-page
67bind pager \cd half-down
68bind pager \cu half-up
69bind pager \cj next-entry
70bind pager \ck previous-entry
71bind attach x view-mailcap
72macro generic,index,pager \cr ":source ~/.config/mutt/muttrc\n" "Reload mutt's configuration file"
73macro index <Return> ":exec sync-mailbox\n" "Sync Mailbox"
74macro index *a "Tall\n" "Select All"
75macro index *n "\ctall\n" "Deselect All"
76
77# Sidebar
78mailboxes =INBOX =mbox "+---------- Watch ----------" =pay =osm =keep "+-------- Processed --------" =Sent =Trash =Drafts
79set mail_check = 120
80set mail_check_stats
81set imap_check_subscribed
82set sidebar_visible = yes
83set sidebar_format = '%B%?F? [%F]?%* %?N?%N/?%S'
84set sidebar_short_path = yes
85bind index,pager B sidebar-toggle-visible
86bind index,pager \Cp sidebar-prev
87bind index,pager \Cn sidebar-next
88bind index,pager \Co sidebar-open
89bind index,pager <F5> sidebar-prev-new
90bind index,pager <F6> sidebar-next-new
91color indicator cyan black
92color sidebar_highlight white color8
93color sidebar_divider color8 black
94color sidebar_flagged red black
95color sidebar_new green black
96
97# basic colors
98color normal white black
99color error red black
100color tilde white black
101color message cyan black
102color markers red black
103color attachment brightred black
104color search brightmagenta black
105color status brightwhite black
106color indicator white blue
107color tree magenta black # arrows in threads
108
109# For list
110# Highlight mails by their status. For a specific pattern(e.g. ~N), pleas read mutt manual 4.2
111color index red black "~A" # all messages
112color index brightred black "~E" # expired messages
113color index brightcyan black "~N" # new messages
114color index brightcyan black "~O" # old messages
115color index brightmagenta black "~Q" # messages that have been replied to
116color index white black "~R" # read messages
117color index brightblue black "~U" # unread messages
118color index brightblue black "~U~$" # unread, unreferenced messages
119color index brightblue black "~v" # messages part of a collapsed thread
120color index brightblue black "~P" # messages from me
121color index cyan black "~p!~F" # messages to me
122color index brightgreen black "~N~p!~F" # new messages to me
123color index brightgreen black "~U~p!~F" # unread messages to me
124color index green black "~R~p!~F" # messages to me
125color index red black "~F" # flagged messages
126color index red black "~F~p" # flagged messages to me
127color index red black "~N~F" # new flagged messages
128color index red black "~N~F~p" # new flagged messages to me
129color index red black "~U~F~p" # new flagged messages to me
130color index brightgreen black "~T" # tagged messages
131color index black brightmagenta "~D" # deleted messages
132color index white black "~v~(!~N!~O)" # collapsed thread with no unread
133color index magenta black "~v~(~N|~O)" # collapsed thread with some unread
134color index magenta black "~N~v~(~N)" # collapsed thread with unread parent
135color index red white "~v~(~F)!~N" # collapsed thread with flagged, no unread
136color index yellow white "~v~(~F~N)" # collapsed thread with some unread & flagged
137color index green white "~N~v~(~F~N)" # collapsed thread with unread parent & flagged
138color index green white "~N~v~(~F)" # collapsed thread with unread parent, no unread inside, but some flagged
139color index yellow red "~v~(~D)" # thread with deleted (doesn't differentiate between all or partial)
140
141# color header
142color header green black "^(From)"
143color header brightyellow black "^(Subject)"
144
145# Set quote's starting symbol
146set quote_regexp = "^([ ]t]*[|>:}#])+"
147set quote_regexp = "^([ \t ]*[>])+"
148
149# Highlight quotes by indent
150color quoted blue black
151color quoted1 magenta black
152color quoted2 cyan black
153color quoted3 yellow black
154color quoted4 red black
155
156# urls
157color body brightblue black "(^|<| )mailto:[^ ]+@[^ ]( |>|$)"
158color body brightblue black "(^|<| )(http|https|ftp|file|telnet|news|finger)://[^ ]+( |>|$)"
159
160# *bold*, _underline_, and /italic/
161color body brightcyan black "(^| )\\*[^ ]+\\*( |$)"
162color body brightcyan black "(^| )_[^ ]+_( |$)"
163color body brightcyan black "(^| )/[^ ]+/( |$)"