aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--alias1
-rw-r--r--mutt/gmail157
2 files changed, 158 insertions, 0 deletions
diff --git a/alias b/alias
index 718db28..d4e5ec7 100644
--- a/alias
+++ b/alias
@@ -63,6 +63,7 @@ alias s='sudo systemctl'
63alias j='sudo journalctl -xe' 63alias j='sudo journalctl -xe'
64alias ju='sudo journalctl -u' 64alias ju='sudo journalctl -u'
65alias m='mutt' 65alias m='mutt'
66alias gmail="mutt -F $SETTING_DIR/mutt/gmail"
66path() { echo $PATH; } # Should not use alias, because $PATH is not initialized 67path() { echo $PATH; } # Should not use alias, because $PATH is not initialized
67ps1.swap() { if [ -z $PS1_bak ]; then PS1_bak="$PS1"; PS1='> '; else PS1="$PS1_bak"; unset PS1_bak; fi; } 68ps1.swap() { if [ -z $PS1_bak ]; then PS1_bak="$PS1"; PS1='> '; else PS1="$PS1_bak"; unset PS1_bak; fi; }
68fd() { echo /proc/$$/fd; ls -l /proc/$$/fd; } 69fd() { echo /proc/$$/fd; ls -l /proc/$$/fd; }
diff --git a/mutt/gmail b/mutt/gmail
new file mode 100644
index 0000000..a1d28fb
--- /dev/null
+++ b/mutt/gmail
@@ -0,0 +1,157 @@
1# IMAP/SMTP settings
2set imap_user = "typebrook@gmail.com"
3set imap_pass = `pass google/imap_for_typebrook`
4set header_cache = "~/.cache/mutt"
5set message_cachedir = "~/.cache/mutt"
6set smtp_url = "typebrook@gmail.com"
7set smtp_pass = "$imap_pass"
8
9set folder = "imaps://imap.gmail.com/"
10set spoolfile = "+INBOX"
11set postponed = "+[Gmail]/Drafts"
12set record = "+[Gmail]/Sent Mail"
13set trash = "+[Gmail]/Trash"
14
15subscribe talk-tw@openstreetmap.org
16
17set ssl_starttls = yes
18set ssl_force_tls = yes
19
20# Interface
21set editor = "vim"
22set charset = "utf-8"
23set send_charset = "us-ascii:utf-8"
24set header = no
25set pager_stop
26set sleep_time = 0 # When changing folder
27set timeout = 10
28set quit = ask-no
29set sort = reverse-threads
30set pager_index_lines = 5
31set markers = no # Remove '+' for long links with limited terminal width
32set index_format = "%4C %8Y %Z %(%b %d) %-15.15L (%?l?%4l&%4c?) %s"
33
34# Vim-style key binding, \c means Ctrl
35# 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
36bind index <Return> sync-mailbox
37bind index q browse-mailboxes
38bind index y edit-label
39bind index x tag-entry
40bind index t edit-label
41bind index,browser l select-entry
42bind index \cl limit
43bind index \cj next-entry
44bind index \ck previous-entry
45bind index,browser G last-entry
46bind index,browser g noop
47bind index,browser gg first-entry
48bind index \cf next-page
49bind index \cb previous-page
50bind index \cd half-down
51bind index \cu half-up
52bind index } bottom-page
53bind pager G bottom
54bind pager g noop
55bind pager gg top
56bind pager j next-line
57bind pager k previous-line
58bind pager \cf next-page
59bind pager \cb previous-page
60bind pager \cd half-down
61bind pager \cu half-up
62bind pager \cj next-entry
63bind pager \ck previous-entry
64bind attach x view-mailcap
65macro generic,index,pager \cr ":source ~/.config/mutt/muttrc\n" "Reload mutt's configuration file"
66macro index <Return> ":exec sync-mailbox\n" "Sync Mailbox"
67macro index *a "Tall\n" "Select All"
68macro index *n "\ctall\n" "Deselect All"
69macro index h "\clall\n" "All messages"
70macro index d '<tag-prefix><delete-message>' 'Delete'
71
72set mail_check = 120
73set mail_check_stats
74set imap_check_subscribed
75set sidebar_visible = yes
76set sidebar_format = '%B%?F? [%F]?%* %?N?%N/?%S'
77set sidebar_short_path = yes
78set sidebar_width = 20
79bind index,pager B sidebar-toggle-visible
80bind index,pager \Cp sidebar-prev
81bind index,pager \Cn sidebar-next
82bind index,pager \Co sidebar-open
83bind index,pager <F5> sidebar-prev-new
84bind index,pager <F6> sidebar-next-new
85color indicator cyan black
86color sidebar_highlight white color8
87color sidebar_divider color8 black
88color sidebar_flagged red black
89color sidebar_new green black
90
91# basic colors
92color normal white black
93color error red black
94color tilde white black
95color message cyan black
96color markers red black
97color attachment brightred black
98color search brightmagenta black
99color status brightwhite black
100color indicator white blue
101color tree magenta black # arrows in threads
102
103# For list
104# Highlight mails by their status. For a specific pattern(e.g. ~N), pleas read mutt manual 4.2
105color index red black "~A" # all messages
106color index brightred black "~E" # expired messages
107color index brightcyan black "~N" # new messages
108color index brightcyan black "~O" # old messages
109color index brightmagenta black "~Q" # messages that have been replied to
110color index white black "~R" # read messages
111color index brightblue black "~U" # unread messages
112color index brightblue black "~U~$" # unread, unreferenced messages
113color index brightblue black "~v" # messages part of a collapsed thread
114color index brightblue black "~P" # messages from me
115color index cyan black "~p!~F" # messages to me
116color index brightgreen black "~N~p!~F" # new messages to me
117color index brightgreen black "~U~p!~F" # unread messages to me
118color index green black "~R~p!~F" # messages to me
119color index red black "~F" # flagged messages
120color index red black "~F~p" # flagged messages to me
121color index red black "~N~F" # new flagged messages
122color index red black "~N~F~p" # new flagged messages to me
123color index red black "~U~F~p" # new flagged messages to me
124color index brightgreen black "~T" # tagged messages
125color index black brightmagenta "~D" # deleted messages
126color index white black "~v~(!~N!~O)" # collapsed thread with no unread
127color index magenta black "~v~(~N|~O)" # collapsed thread with some unread
128color index magenta black "~N~v~(~N)" # collapsed thread with unread parent
129color index red white "~v~(~F)!~N" # collapsed thread with flagged, no unread
130color index yellow white "~v~(~F~N)" # collapsed thread with some unread & flagged
131color index green white "~N~v~(~F~N)" # collapsed thread with unread parent & flagged
132color index green white "~N~v~(~F)" # collapsed thread with unread parent, no unread inside, but some flagged
133color index yellow red "~v~(~D)" # thread with deleted (doesn't differentiate between all or partial)
134
135# color header
136color header green black "^(From)"
137color header brightyellow black "^(Subject)"
138
139# Set quote's starting symbol
140set quote_regexp = "^([ ]t]*[|>:}#])+"
141set quote_regexp = "^([ \t ]*[>])+"
142
143# Highlight quotes by indent
144color quoted blue black
145color quoted1 magenta black
146color quoted2 cyan black
147color quoted3 yellow black
148color quoted4 red black
149
150# urls
151color body brightblue black "(^|<| )mailto:[^ ]+@[^ ]( |>|$)"
152color body brightblue black "(^|<| )(http|https|ftp|file|telnet|news|finger)://[^ ]+( |>|$)"
153
154# *bold*, _underline_, and /italic/
155color body brightcyan black "(^| )\\*[^ ]+\\*( |$)"
156color body brightcyan black "(^| )_[^ ]+_( |$)"
157color body brightcyan black "(^| )/[^ ]+/( |$)"