From 0af7dc7c27de55d318617e65a4dd4c35e8cf59a5 Mon Sep 17 00:00:00 2001 From: Hsieh Chin Fan Date: Thu, 30 Jun 2022 11:50:50 +0800 Subject: Update muttrc --- mutt/default | 144 +++++++++++++++++++++++++++++++++++++++++++++ mutt/gmail | 157 ------------------------------------------------- mutt/gmail.login | 15 +++++ mutt/muttrc | 170 +---------------------------------------------------- mutt/muttrc.gmail | 2 + mutt/topo.tw.login | 25 ++++++++ 6 files changed, 188 insertions(+), 325 deletions(-) create mode 100644 mutt/default delete mode 100644 mutt/gmail create mode 100644 mutt/gmail.login create mode 100644 mutt/muttrc.gmail create mode 100644 mutt/topo.tw.login (limited to 'mutt') diff --git a/mutt/default b/mutt/default new file mode 100644 index 0000000..8c8e5d6 --- /dev/null +++ b/mutt/default @@ -0,0 +1,144 @@ +# Default settings +set header_cache = "~/.cache/mutt" +set message_cachedir = "~/.cache/mutt" +set edit_headers=yes + +# Interface +set editor = "vim" +set charset = "utf-8" +set send_charset = "us-ascii:utf-8" +set header = no +set pager_stop +set sleep_time = 0 # When changing folder +set timeout = 10 +set quit = ask-no +set sort = reverse-threads +set pager_index_lines = 5 +set markers = no # Remove '+' for long links with limited terminal width +set index_format = "%4C %8Y %Z %(%b %d) %-15.15L (%?l?%4l&%4c?) %s" + +# Vim-style key binding, \c means Ctrl +# 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 +bind index sync-mailbox +bind index q browse-mailboxes +bind index y edit-label +bind index x tag-entry +bind index t edit-label +bind index,browser l select-entry +bind index \\ limit +bind index \cj next-entry +bind index \ck previous-entry +bind index,browser G last-entry +bind index,browser g noop +bind index,browser gg first-entry +bind index \cf next-page +bind index \cb previous-page +bind index \cd half-down +bind index \cu half-up +bind index } bottom-page +bind pager G bottom +bind pager g noop +bind pager gg top +bind pager j next-line +bind pager k previous-line +bind pager \cf next-page +bind pager \cb previous-page +bind pager \cd half-down +bind pager \cu half-up +bind pager \cj next-entry +bind pager \ck previous-entry +bind attach x view-mailcap +macro generic,index,pager \cr ":source ~/.config/mutt/muttrc\n" "Reload mutt's configuration file" +macro index ":exec sync-mailbox\n" "Sync Mailbox" +macro index *a "Tall\n" "Select All" +macro index *n "\ctall\n" "Deselect All" +macro index h "\\all\n" "All messages" +macro index d '' 'Delete' + +# Sidebar +set mail_check = 120 +set mail_check_stats +set imap_check_subscribed +set sidebar_visible = yes +set sidebar_format = '%B%?F? [%F]?%* %?N?%N/?%S' +set sidebar_short_path = yes +set sidebar_width = 20 +bind index,pager B sidebar-toggle-visible +bind index,pager \Cp sidebar-prev +bind index,pager \Cn sidebar-next +bind index,pager \Co sidebar-open +bind index,pager sidebar-prev-new +bind index,pager sidebar-next-new +color indicator cyan black +color sidebar_highlight white color8 +color sidebar_divider color8 black +color sidebar_flagged red black +color sidebar_new green black + +# basic colors +color normal white black +color error red black +color tilde white black +color message cyan black +color markers red black +color attachment brightred black +color search brightmagenta black +color status brightwhite black +color indicator white blue +color tree magenta black # arrows in threads + +# For list +# Highlight mails by their status. For a specific pattern(e.g. ~N), pleas read mutt manual 4.2 +color index red black "~A" # all messages +color index brightred black "~E" # expired messages +color index brightcyan black "~N" # new messages +color index brightcyan black "~O" # old messages +color index brightmagenta black "~Q" # messages that have been replied to +color index white black "~R" # read messages +color index brightblue black "~U" # unread messages +color index brightblue black "~U~$" # unread, unreferenced messages +color index brightblue black "~v" # messages part of a collapsed thread +color index brightblue black "~P" # messages from me +color index cyan black "~p!~F" # messages to me +color index brightgreen black "~N~p!~F" # new messages to me +color index brightgreen black "~U~p!~F" # unread messages to me +color index brightgreen black "~R~p!~F" # messages to me +color index red black "~F" # flagged messages +color index red black "~F~p" # flagged messages to me +color index red black "~N~F" # new flagged messages +color index red black "~N~F~p" # new flagged messages to me +color index red black "~U~F~p" # new flagged messages to me +color index brightyellow black "~T" # tagged messages +color index black brightmagenta "~D" # deleted messages +color index white black "~v~(!~N!~O)" # collapsed thread with no unread +color index magenta black "~v~(~N|~O)" # collapsed thread with some unread +color index magenta black "~N~v~(~N)" # collapsed thread with unread parent +color index red white "~v~(~F)!~N" # collapsed thread with flagged, no unread +color index yellow white "~v~(~F~N)" # collapsed thread with some unread & flagged +color index green white "~N~v~(~F~N)" # collapsed thread with unread parent & flagged +color index green white "~N~v~(~F)" # collapsed thread with unread parent, no unread inside, but some flagged +color index yellow red "~v~(~D)" # thread with deleted (doesn't differentiate between all or partial) + +# color header +color header green black "^(From)" +color header brightyellow black "^(Subject)" + +# Set quote's starting symbol +set quote_regexp = "^([ ]t]*[|>:}#])+" +set quote_regexp = "^([ \t ]*[>])+" + +# Highlight quotes by indent +color quoted blue black +color quoted1 magenta black +color quoted2 cyan black +color quoted3 yellow black +color quoted4 red black + +# urls +color body brightblue black "(^|<| )mailto:[^ ]+@[^ ]( |>|$)" +color body brightblue black "(^|<| )(http|https|ftp|file|telnet|news|finger)://[^ ]+( |>|$)" + +# *bold*, _underline_, and /italic/ +color body brightcyan black "(^| )\\*[^ ]+\\*( |$)" +color body brightcyan black "(^| )_[^ ]+_( |$)" +color body brightcyan black "(^| )/[^ ]+/( |$)" diff --git a/mutt/gmail b/mutt/gmail deleted file mode 100644 index a1d28fb..0000000 --- a/mutt/gmail +++ /dev/null @@ -1,157 +0,0 @@ -# IMAP/SMTP settings -set imap_user = "typebrook@gmail.com" -set imap_pass = `pass google/imap_for_typebrook` -set header_cache = "~/.cache/mutt" -set message_cachedir = "~/.cache/mutt" -set smtp_url = "typebrook@gmail.com" -set smtp_pass = "$imap_pass" - -set folder = "imaps://imap.gmail.com/" -set spoolfile = "+INBOX" -set postponed = "+[Gmail]/Drafts" -set record = "+[Gmail]/Sent Mail" -set trash = "+[Gmail]/Trash" - -subscribe talk-tw@openstreetmap.org - -set ssl_starttls = yes -set ssl_force_tls = yes - -# Interface -set editor = "vim" -set charset = "utf-8" -set send_charset = "us-ascii:utf-8" -set header = no -set pager_stop -set sleep_time = 0 # When changing folder -set timeout = 10 -set quit = ask-no -set sort = reverse-threads -set pager_index_lines = 5 -set markers = no # Remove '+' for long links with limited terminal width -set index_format = "%4C %8Y %Z %(%b %d) %-15.15L (%?l?%4l&%4c?) %s" - -# Vim-style key binding, \c means Ctrl -# 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 -bind index sync-mailbox -bind index q browse-mailboxes -bind index y edit-label -bind index x tag-entry -bind index t edit-label -bind index,browser l select-entry -bind index \cl limit -bind index \cj next-entry -bind index \ck previous-entry -bind index,browser G last-entry -bind index,browser g noop -bind index,browser gg first-entry -bind index \cf next-page -bind index \cb previous-page -bind index \cd half-down -bind index \cu half-up -bind index } bottom-page -bind pager G bottom -bind pager g noop -bind pager gg top -bind pager j next-line -bind pager k previous-line -bind pager \cf next-page -bind pager \cb previous-page -bind pager \cd half-down -bind pager \cu half-up -bind pager \cj next-entry -bind pager \ck previous-entry -bind attach x view-mailcap -macro generic,index,pager \cr ":source ~/.config/mutt/muttrc\n" "Reload mutt's configuration file" -macro index ":exec sync-mailbox\n" "Sync Mailbox" -macro index *a "Tall\n" "Select All" -macro index *n "\ctall\n" "Deselect All" -macro index h "\clall\n" "All messages" -macro index d '' 'Delete' - -set mail_check = 120 -set mail_check_stats -set imap_check_subscribed -set sidebar_visible = yes -set sidebar_format = '%B%?F? [%F]?%* %?N?%N/?%S' -set sidebar_short_path = yes -set sidebar_width = 20 -bind index,pager B sidebar-toggle-visible -bind index,pager \Cp sidebar-prev -bind index,pager \Cn sidebar-next -bind index,pager \Co sidebar-open -bind index,pager sidebar-prev-new -bind index,pager sidebar-next-new -color indicator cyan black -color sidebar_highlight white color8 -color sidebar_divider color8 black -color sidebar_flagged red black -color sidebar_new green black - -# basic colors -color normal white black -color error red black -color tilde white black -color message cyan black -color markers red black -color attachment brightred black -color search brightmagenta black -color status brightwhite black -color indicator white blue -color tree magenta black # arrows in threads - -# For list -# Highlight mails by their status. For a specific pattern(e.g. ~N), pleas read mutt manual 4.2 -color index red black "~A" # all messages -color index brightred black "~E" # expired messages -color index brightcyan black "~N" # new messages -color index brightcyan black "~O" # old messages -color index brightmagenta black "~Q" # messages that have been replied to -color index white black "~R" # read messages -color index brightblue black "~U" # unread messages -color index brightblue black "~U~$" # unread, unreferenced messages -color index brightblue black "~v" # messages part of a collapsed thread -color index brightblue black "~P" # messages from me -color index cyan black "~p!~F" # messages to me -color index brightgreen black "~N~p!~F" # new messages to me -color index brightgreen black "~U~p!~F" # unread messages to me -color index green black "~R~p!~F" # messages to me -color index red black "~F" # flagged messages -color index red black "~F~p" # flagged messages to me -color index red black "~N~F" # new flagged messages -color index red black "~N~F~p" # new flagged messages to me -color index red black "~U~F~p" # new flagged messages to me -color index brightgreen black "~T" # tagged messages -color index black brightmagenta "~D" # deleted messages -color index white black "~v~(!~N!~O)" # collapsed thread with no unread -color index magenta black "~v~(~N|~O)" # collapsed thread with some unread -color index magenta black "~N~v~(~N)" # collapsed thread with unread parent -color index red white "~v~(~F)!~N" # collapsed thread with flagged, no unread -color index yellow white "~v~(~F~N)" # collapsed thread with some unread & flagged -color index green white "~N~v~(~F~N)" # collapsed thread with unread parent & flagged -color index green white "~N~v~(~F)" # collapsed thread with unread parent, no unread inside, but some flagged -color index yellow red "~v~(~D)" # thread with deleted (doesn't differentiate between all or partial) - -# color header -color header green black "^(From)" -color header brightyellow black "^(Subject)" - -# Set quote's starting symbol -set quote_regexp = "^([ ]t]*[|>:}#])+" -set quote_regexp = "^([ \t ]*[>])+" - -# Highlight quotes by indent -color quoted blue black -color quoted1 magenta black -color quoted2 cyan black -color quoted3 yellow black -color quoted4 red black - -# urls -color body brightblue black "(^|<| )mailto:[^ ]+@[^ ]( |>|$)" -color body brightblue black "(^|<| )(http|https|ftp|file|telnet|news|finger)://[^ ]+( |>|$)" - -# *bold*, _underline_, and /italic/ -color body brightcyan black "(^| )\\*[^ ]+\\*( |$)" -color body brightcyan black "(^| )_[^ ]+_( |$)" -color body brightcyan black "(^| )/[^ ]+/( |$)" diff --git a/mutt/gmail.login b/mutt/gmail.login new file mode 100644 index 0000000..ec3c6f7 --- /dev/null +++ b/mutt/gmail.login @@ -0,0 +1,15 @@ +# IMAP/SMTP settings +set imap_user = "typebrook@gmail.com" +set imap_pass = `pass google/imap_for_typebrook` +set smtp_url = "typebrook@gmail.com" +set smtp_pass = "$imap_pass" + +set ssl_starttls = yes +set ssl_force_tls = yes + +# Set mailboxes +set folder = "imaps://imap.gmail.com/" +set spoolfile = "+INBOX" +set postponed = "+[Gmail]/Drafts" +set record = "+[Gmail]/Sent Mail" +set trash = "+[Gmail]/Trash" diff --git a/mutt/muttrc b/mutt/muttrc index e0d41a3..131e782 100644 --- a/mutt/muttrc +++ b/mutt/muttrc @@ -1,168 +1,2 @@ -# IMAP/SMTP settings -set folder = "imaps://pham@mail.topo.tw:993/" -set imap_pass = `pass pham@topo.tw` -set header_cache = "~/.cache/mutt" -set message_cachedir = "~/.cache/mutt" -set smtp_url = "smtp://pham@mail.topo.tw:587" -set smtp_pass = "$imap_pass" - -# Identify meself -set from = "pham@topo.tw" -set realname = "謝晉凡 Hsieh Chin Fan" -set signature="$SETTING_DIR/mutt/.signature" -set pgp_use_gpg_agent=yes -set crypt_use_gpgme=yes -set pgp_timeout=300 -set pgp_sign_as=6DD8C14A # replace 6DD8C14A with your gpg key id -set edit_headers=yes - -# Basic Mailbox -set spoolfile = "+INBOX" -set mbox= "+mbox" -set move = yes -set record = "+Sent" -set trash = "+Trash" -set postponed = "+Drafts" - -subscribe talk-tw@openstreetmap.org - -# Interface -set editor = "vim" -set charset = "utf-8" -set send_charset = "us-ascii:utf-8" -set header = no -set pager_stop -set sleep_time = 0 # When changing folder -set timeout = 10 -set quit = ask-no -set sort = reverse-threads -set pager_index_lines = 5 -set markers = no # Remove '+' for long links with limited terminal width -set index_format = "%4C %8Y %Z %(%b %d) %-15.15L (%?l?%4l&%4c?) %s" - -# Vim-style key binding, \c means Ctrl -# 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 -bind index sync-mailbox -bind index q browse-mailboxes -bind index y edit-label -bind index x tag-entry -bind index t edit-label -bind index,browser l select-entry -bind index \\ limit -bind index \cj next-entry -bind index \ck previous-entry -bind index,browser G last-entry -bind index,browser g noop -bind index,browser gg first-entry -bind index \cf next-page -bind index \cb previous-page -bind index \cd half-down -bind index \cu half-up -bind index } bottom-page -bind pager G bottom -bind pager g noop -bind pager gg top -bind pager j next-line -bind pager k previous-line -bind pager \cf next-page -bind pager \cb previous-page -bind pager \cd half-down -bind pager \cu half-up -bind pager \cj next-entry -bind pager \ck previous-entry -bind attach x view-mailcap -macro generic,index,pager \cr ":source ~/.config/mutt/muttrc\n" "Reload mutt's configuration file" -macro index ":exec sync-mailbox\n" "Sync Mailbox" -macro index *a "Tall\n" "Select All" -macro index *n "\ctall\n" "Deselect All" -macro index h "\\all\n" "All messages" -macro index d '' 'Delete' - -# Sidebar -mailboxes =INBOX =mbox "+------ Watch ------" =pay =osm =keep "+---- Processed ----" =Sent =Trash =Drafts -set mail_check = 120 -set mail_check_stats -set imap_check_subscribed -set sidebar_visible = yes -set sidebar_format = '%B%?F? [%F]?%* %?N?%N/?%S' -set sidebar_short_path = yes -set sidebar_width = 20 -bind index,pager B sidebar-toggle-visible -bind index,pager \Cp sidebar-prev -bind index,pager \Cn sidebar-next -bind index,pager \Co sidebar-open -bind index,pager sidebar-prev-new -bind index,pager sidebar-next-new -color indicator cyan black -color sidebar_highlight white color8 -color sidebar_divider color8 black -color sidebar_flagged red black -color sidebar_new green black - -# basic colors -color normal white black -color error red black -color tilde white black -color message cyan black -color markers red black -color attachment brightred black -color search brightmagenta black -color status brightwhite black -color indicator white blue -color tree magenta black # arrows in threads - -# For list -# Highlight mails by their status. For a specific pattern(e.g. ~N), pleas read mutt manual 4.2 -color index red black "~A" # all messages -color index brightred black "~E" # expired messages -color index brightcyan black "~N" # new messages -color index brightcyan black "~O" # old messages -color index brightmagenta black "~Q" # messages that have been replied to -color index white black "~R" # read messages -color index brightblue black "~U" # unread messages -color index brightblue black "~U~$" # unread, unreferenced messages -color index brightblue black "~v" # messages part of a collapsed thread -color index brightblue black "~P" # messages from me -color index cyan black "~p!~F" # messages to me -color index brightgreen black "~N~p!~F" # new messages to me -color index brightgreen black "~U~p!~F" # unread messages to me -color index brightgreen black "~R~p!~F" # messages to me -color index red black "~F" # flagged messages -color index red black "~F~p" # flagged messages to me -color index red black "~N~F" # new flagged messages -color index red black "~N~F~p" # new flagged messages to me -color index red black "~U~F~p" # new flagged messages to me -color index brightyellow black "~T" # tagged messages -color index black brightmagenta "~D" # deleted messages -color index white black "~v~(!~N!~O)" # collapsed thread with no unread -color index magenta black "~v~(~N|~O)" # collapsed thread with some unread -color index magenta black "~N~v~(~N)" # collapsed thread with unread parent -color index red white "~v~(~F)!~N" # collapsed thread with flagged, no unread -color index yellow white "~v~(~F~N)" # collapsed thread with some unread & flagged -color index green white "~N~v~(~F~N)" # collapsed thread with unread parent & flagged -color index green white "~N~v~(~F)" # collapsed thread with unread parent, no unread inside, but some flagged -color index yellow red "~v~(~D)" # thread with deleted (doesn't differentiate between all or partial) - -# color header -color header green black "^(From)" -color header brightyellow black "^(Subject)" - -# Set quote's starting symbol -set quote_regexp = "^([ ]t]*[|>:}#])+" -set quote_regexp = "^([ \t ]*[>])+" - -# Highlight quotes by indent -color quoted blue black -color quoted1 magenta black -color quoted2 cyan black -color quoted3 yellow black -color quoted4 red black - -# urls -color body brightblue black "(^|<| )mailto:[^ ]+@[^ ]( |>|$)" -color body brightblue black "(^|<| )(http|https|ftp|file|telnet|news|finger)://[^ ]+( |>|$)" - -# *bold*, _underline_, and /italic/ -color body brightcyan black "(^| )\\*[^ ]+\\*( |$)" -color body brightcyan black "(^| )_[^ ]+_( |$)" -color body brightcyan black "(^| )/[^ ]+/( |$)" +source ./default +source ./topo.tw.login diff --git a/mutt/muttrc.gmail b/mutt/muttrc.gmail new file mode 100644 index 0000000..b7522b5 --- /dev/null +++ b/mutt/muttrc.gmail @@ -0,0 +1,2 @@ +source ./default +source ./gmail.login diff --git a/mutt/topo.tw.login b/mutt/topo.tw.login new file mode 100644 index 0000000..5de7718 --- /dev/null +++ b/mutt/topo.tw.login @@ -0,0 +1,25 @@ +# IMAP/SMTP settings +set folder = "imaps://pham@mail.topo.tw:993/" +set imap_pass = `pass pham@topo.tw` +set smtp_url = "smtp://pham@mail.topo.tw:587" +set smtp_pass = "$imap_pass" + +# Identify meself +set from = "pham@topo.tw" +set realname = "謝晉凡 Hsieh Chin Fan" +set signature="$SETTING_DIR/mutt/.signature" +set pgp_use_gpg_agent=yes +set crypt_use_gpgme=yes +set pgp_timeout=300 +set pgp_sign_as=6DD8C14A # replace 6DD8C14A with your gpg key id + +# Basic Mailbox +set spoolfile = "+INBOX" +set mbox= "+mbox" +set move = yes +set record = "+Sent" +set trash = "+Trash" +set postponed = "+Drafts" + +# Sidebar +mailboxes =INBOX =mbox "+------ Watch ------" =pay =osm =keep "+---- Processed ----" =Sent =Trash =Drafts -- cgit v1.2.3-70-g09d2