mutt: Remove config

master
Pierre Neidhardt 2017-07-28 11:51:37 +01:00
parent c6b056ea71
commit bf8122d6c8
11 changed files with 0 additions and 606 deletions

View File

@ -1,36 +0,0 @@
## Mutt -- Gmail account sample
set imap_user=user@gmail.com
set imap_pass=$my_pw_personal
set from=$imap_user
set hostname="gmail.com"
set folder=imaps://user@imap.gmail.com/
set spoolfile=+INBOX
set postponed=+[Gmail]/Drafts
unset record ## Google does it automatically, so we do not want duplicates.
## Send options.
set realname='John Doe'
set smtp_url=smtps://user:$imap_pass@smtp.gmail.com
set ssl_force_tls=yes
unset ssl_starttls
## Signature with a random 'fortune'.
set signature="cat $my_localdir/real_name && fortune -s |"
## Sidebar mailboxes separator workaround.
mailboxes "+~~~~~~~~~~~~~~~~~~~~~~~~"
## Hooks
account-hook $folder "set imap_user=user@gmail.com imap_pass=$my_pw_personal"
## Remove own e-mail address from group-reply.
alternates $imap_user
## Gmail-specific macros:
## Prevent Gmail from deleting to 'All Mail', move it to Trash instead.
macro index d ";s+[Gmail]/Trash<enter><enter>" "Move to Gmail's Trash"
macro pager d "s+[Gmail]/Trash<enter><enter>" "Move to Gmail's Trash"
## Undelete messages.
macro index u ";s+INBOX<enter><enter>" "Move to Gmail's INBOX"
macro pager u "s+INBOX<enter><enter>" "Move to Gmail's INBOX"

View File

@ -1,36 +0,0 @@
## 256 colors classic theme
set my_bg = black
set my_new = brightcyan
set my_old = brightred
set my_uri = brightgreen
set my_flag = brightyellow
set my_tag = brightmagenta
set my_tag_bg = $my_bg
set my_address = color69
set my_from = color201
set my_to = color39
set my_cc = green
set my_bcc = green
set my_replyto = green
set my_subject = brightred
set my_inreplyto = green
set my_date = yellow
set my_x = blue
set my_sig = brightblack
set my_attach = white
set my_attach_bg = $my_bg
set my_status = brightwhite
set my_status_bg = color240
set my_indicator = white
set my_indicator_bg = color69
set my_quote0 = color28
set my_quote1 = color29
set my_quote2 = color30
set my_quote3 = color31
set my_quote4 = color32
set my_quote5 = color33
set my_quote6 = color39
set my_quote7 = color38

View File

@ -1,39 +0,0 @@
#!/bin/sh
## 8/16 colors
if [ $(tput colors) -ne 256 ]; then
cat <<EOF
set my_bg = default
set my_new = brightwhite
set my_old = red
set my_uri = green
set my_flag = white
set my_address = brightblue
set my_from = magenta
set my_to = brightblue
set my_cc = green
set my_bcc = green
set my_replyto = green
set my_subject = yellow
set my_inreplyto = red
set my_date = cyan
set my_x = blue
set my_sig = brightblack
set my_attach = white
set my_attach_bg = black
set my_status = black
set my_status_bg = white
set my_indicator = white
set my_indicator_bg = blue
set my_quote0 = brightred
set my_quote1 = brightgreen
set my_quote2 = brightyellow
set my_quote3 = brightblue
set my_quote4 = brightcyan
set my_quote5 = brightmagenta
set my_quote6 = brightwhite
set my_quote7 = green
EOF
fi

View File

@ -1,36 +0,0 @@
## 256 colors Night theme
set my_bg = default
set my_new = color142
set my_old = color172
set my_uri = color108
set my_flag = color46
set my_tag = color116
set my_tag_bg = color238
set my_address = color69
set my_from = color201
set my_to = color39
set my_cc = green
set my_bcc = green
set my_replyto = green
set my_subject = brightred
set my_inreplyto = green
set my_date = yellow
set my_x = blue
set my_sig = brightblack
set my_attach = color116
set my_attach_bg = color238
set my_status = color45
set my_status_bg = color234
set my_indicator = color45
set my_indicator_bg = color235
set my_quote0 = color28
set my_quote1 = color29
set my_quote2 = color30
set my_quote3 = color31
set my_quote4 = color32
set my_quote5 = color33
set my_quote6 = color39
set my_quote7 = color38

View File

@ -1,36 +0,0 @@
## 256 colors Zenburn theme
set my_bg = color237
set my_new = color142
set my_old = color172
set my_uri = color108
set my_flag = color116
set my_tag = color116
set my_tag_bg = color238
set my_address = color69
set my_from = color201
set my_to = color39
set my_cc = green
set my_bcc = green
set my_replyto = green
set my_subject = brightred
set my_inreplyto = green
set my_date = yellow
set my_x = blue
set my_sig = brightblack
set my_attach = color116
set my_attach_bg = color238
set my_status = color174
set my_status_bg = color235
set my_indicator = color223
set my_indicator_bg = color235
set my_quote0 = color28
set my_quote1 = color29
set my_quote2 = color30
set my_quote3 = color31
set my_quote4 = color32
set my_quote5 = color33
set my_quote6 = color39
set my_quote7 = color38

View File

@ -1,13 +0,0 @@
# $Id$
text/html; w3m -I %{charset} -T text/html; copiousoutput;
image/*; sxiv -- %s
application/pdf; zathura -- %s
# application/pdf; pdftotext -- %s - | less
applica/msword; antiword -- %s | less
application/msword; antiword -- %s | less
# application/pgp-keys; pgp -f < %s ; copiousoutput

View File

@ -1,263 +0,0 @@
## Mutt Configuration
## This configuration is made for Mutt with embedded IMAP support.
## These folders are assumed to exist:
## Cache for headers and messages:
set header_cache=~/.cache/mutt/headers
set message_cachedir=~/.cache/mutt/messages
## Public data (config, theme, mailcap):
set my_configdir=~/.config/mutt
## personal data (contacts, account information):
set my_localdir=~/.local/share/mutt
################################################################################
## General options.
## Beep on new incoming mails.
set beep_new=yes
## PGP options.
set crypt_replyencrypt=yes
set crypt_replysign=yes
set crypt_replysignencrypted=yes
set crypt_use_gpgme=yes
set pgp_timeout=3600
## Headers are editable in editor.
set edit_headers=yes
## Don't ask for recipient. We usually don't want to include mail unless we want
## to quote it.
set fast_reply=yes
set include=ask-no
set include_onlyfirst=yes
## Store message headers locally to speed things up. Gentoo wiki says that if a
## folder is specified, it is even faster. If no folder exists, the cache will
## be a single file.
source "$my_configdir/purgecache.sh $message_cachedir|"
## Tell Mutt to check all IMAP folders. This will add all of them to the sidebar
## (if used). Contrary to the 'mailboxes' menu, sorting order cannot be
## controlled, so you should set 'sidebar_sort' to yes. This will sort the
## folders alphabetically, ignoring punctuation.
set imap_check_subscribed
## Keep imap connection alive by polling intermittently (time in seconds).
set imap_keepalive=30
## Allow mutt to open new imap connection automatically.
unset imap_passive
## How often to check for new mail (time in seconds).
set mail_check=60
set mail_check_stats=yes
## Mailcap
set mailcap_path=$my_configdir/mailcap
auto_view text/html
alternative_order text/plain text/html
## Mailbox type.
set mbox_type=Maildir
## Forward attachment as well.
set mime_forward=yes
set mime_forward_rest=yes
## Keep showing the list of mails while in pager.
set pager_index_lines=8
## Show context lines when going to next page and stop at the end instead of
## displaying next mail.
# set menu_context=3
set pager_context=3
set pager_stop=yes
## Encoding.
set rfc2047_parameters=yes
set send_charset="us-ascii:utf-8"
## Remove delay between mailbox switches.
set sleep_time=0
## Group mail into conversations, sort by last mail from conversation.
set sort=threads
set sort_aux=last-date-received
set strict_threads=yes
################################################################################
## Multiple accounts
## Store passwords as follows in .mutt.pwds:
# set my_pw_personal = foo
# set my_pw_work = foo
##
## CCRYPT:
## $ ccencrypt .mutt.pwds
##
## GNUPG: Generate a key pair with:
## $ gpg2 --gen-key
## Encrypt them with:
## $ gpg2 -e -r <user> ".mutt.pwds"
## 'accountrc' should contain the following config:
## Fetch passwords
# source "ccat ~/.mutt.pwds.cpt |"
## Or
# source "gpg2 -dq ~/.mutt.pwds.gpg |"
##
## Source accounts. Default account is last.
# source "$my_localdir/personal"
# folder-hook $folder 'source $my_localdir/personal'
# source "$my_localdir/work"
# folder-hook $folder 'source $my_localdir/work'
##
## You can add an optional binding to switch mailboxes:
# macro index,pager <f2> '<enter-command>source $my_localdir/personal<enter><change-folder>!<enter>'
# macro index,pager <f3> '<enter-command>source $my_localdir/work<enter><change-folder>!<enter>'
source "$my_localdir/accountrc"
################################################################################
## Aliases.
## Mutt native support.
# set alias_file = "$my_localdir/aliases"
# set sort_alias = alias
# set reverse_alias = yes
# source $alias_file
## Abook.
## We redirect the error stream in case the config file in not compatible with
## current Abook version.
set query_command="abook --mutt-query '%s' 2>/dev/null"
macro index,pager a "<pipe-message>abook --add-email-quiet<return>" "Add this sender to Abook"
bind editor <Tab> complete-query
################################################################################
## Key bindings.
## Security issue: if 'enter-command' is available from the GUI, it is possible
## to see the password unencrypted. We disable it for this reason. Every command
## that the user intends to use must be bound to a key in advance, otherwise it
## will never be accessible.
bind generic,alias,attach,browser,editor,index,compose,pager,pgp,postpone ':' noop
## HTML mail view with graphical Internet browser.
macro attach 'V' "<pipe-entry>$my_configdir/view-html.sh<enter>"
## Remap bounce-message function to "B"
bind index B bounce-message
## Always reply to group.
bind index,pager r group-reply
## Fix the 'change-dir' issue with multiple accounts. When change-dir was called
## with account A, then use switched to account B, change-dir will still point
## to account A by default.
# macro index 'c' '<change-folder>?<change-dir><home>^K=<enter>'
## Manual fetch.
bind index "^" imap-fetch-mail
## Fix the backspace wrong binding that happens on some terminals.
#bind index,pager  previous-page
## Fix Backspace -- Shell alternative.
## $ infocmp > termbs.src
## Changed kbs=^H to kbs=\177, then:
## $ tic -x termbs.src
## Do not quit accidentally
bind index "Q" quit
bind index <Esc>q query
bind index "q" noop
## Vi bindings.
bind pager j next-line
bind pager k previous-line
bind attach,index,pager \CB previous-page
bind attach,index,pager \CD next-page
bind attach,index,pager \CF next-page
bind attach,index,pager \CU previous-page
bind attach,index,pager ? search-reverse
bind attach,index,pager h help
bind attach,index,pager \Ch display-toggle-weed
bind attach,index,pager N search-opposite
bind pager g top
bind pager G bottom
bind attach,index g first-entry
bind attach,index G last-entry
bind index <Esc>x collapse-thread
bind index <Esc>X collapse-all
## Flags
bind index,pager <Esc>w set-flag
## Remove N/O flag in one key stroke.
macro index w '<clear-flag>N'
################################################################################
## Custom header for outgoing mail.
## Undo any custom headers that may have been put in by the global Muttrc
# unmy_hdr *
## Remove any global 'From:' header
# unset use_from
## Don't append a domain to my outgoing mails
# unset use_domain
# my_hdr From: Firstname Lastname <myfirstname@mymailserver>
## Extra info.
my_hdr X-Info: Simplicity is the ultimate sophistication.
## OS Info.
# my_hdr X-Operating-System: `uname -s`, kernel `uname -r`
## This header only appears to MS Outlook users
# my_hdr X-Message-Flag: Warning: Outlook sucks!
## Custom Mail-User-Agent ID.
set user_agent=yes
# my_hdr User-Agent: Every email client sucks, this one just sucks less.
################################################################################
## Theme.
## Index format
## We use my_col_* to get dynamic column size.
## See 'man 3 strftime' and 'man 3 printf'.
# set index_format="%?M?_%M_ ?%Z %2C %.13d (%-68.68F) %-68.68s %?M?_%M_&(%c/%l?"
set date_format="%y-%m-%d %T"
set my_index_format_pre='set my_col_from = `echo $((30 * ($(tput cols)-35) / 100))`; set my_col_subject = `echo $((70 * ($(tput cols)-35) / 100))`; set index_format="%2C | %Z [%d] %-$my_col_from.${my_col_from}'
set my_index_format_post=' (%-4.4c) %?M?<%M> ?%-$my_col_subject.${my_col_subject}s"'
folder-hook .*[sS]ent.* "$my_index_format_pre"t"$my_index_format_post"
folder-hook ! .*[sS]ent.* "$my_index_format_pre"F"$my_index_format_post"
## Original status_format, with dash line removed.
set status_format="-%r-Mutt: %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) "
## This will redraw screen and justify the index.
macro index,pager \CL "<enter-command>$my_index_format_pre"F"$my_index_format_post<enter><redraw-screen>"
## Set color variables from a theme.
# source "$my_configdir/colors.classic"
source "$my_configdir/colors.night"
## Fallback for terminals without 256 colors. This needs to be a shell script so
## that it can check for terminal capabilities.
source "$my_configdir/colors.fallback.sh |"
## Apply theme.
source "$my_configdir/theme"
################################################################################
## Sidebar.
## We use a script to test if sidebar is installed. Needs to be loaded _after_
## the theme.
source "$my_configdir/sidebar.sh|"

View File

@ -1,20 +0,0 @@
#!/bin/sh
## Purge old messages in Mutt's message cache.
## "$1" is cache location.
## This is intended to be run at startup, but can be run manually anytime.
## It should not output anything to stdout.
## In KB.
CACHE_LIMIT=102400
cd "$1" 2>/dev/null
[ $? -ne 0 ] && exit
[ $(du -s . | cut -f1 -d' ') -lt $CACHE_LIMIT ] && exit
while IFS= read -r i; do
rm "$i"
[ $(du -s . | cut -f1 -d' ') -lt $CACHE_LIMIT ] && exit
done <<EOF
$(find . -type f -exec ls -rt1 {} +)
EOF

View File

@ -1,33 +0,0 @@
#!/bin/sh
## Set sidebar options only if sidebar is builtin.
if [ -n "$(man muttrc | grep sidebar)" ]; then
cat <<'EOF'
set sidebar_visible = yes
set sidebar_width = 24
set sidebar_sort_method = alpha
set sidebar_divider_char='│'
set sidebar_short_path = yes
set sidebar_format = "%B%?F? [%F]?%* %?N?%N/?%S"
set sidebar_folder_indent = yes
## Color of folders with new mail
color sidebar_new $my_new $my_bg
color sidebar_flagged white $my_bg
# color sidebar_divider $my_status $my_status_bg
color sidebar_divider $my_flag $my_bg
color sidebar_highlight white $my_status_bg
## Folder selection, Emacs and vi bindings.
bind index,pager \CP sidebar-prev
bind index,pager \CN sidebar-next
bind index,pager \CO sidebar-open
bind index,pager <Esc>k sidebar-prev
bind index,pager <Esc>j sidebar-next
bind index,pager <Esc>l sidebar-open
## Toggle sidebar visibility. Screen might get messed up, hence the refresh.
macro index b '<enter-command>toggle sidebar_visible<enter><refresh>'
macro pager b '<enter-command>toggle sidebar_visible<enter><redraw-screen>'
EOF
fi

View File

@ -1,83 +0,0 @@
# -*- mode:sh -*-
## Theme kindly inspired from
## http://nongeekshandbook.blogspot.ie/2009/03/mutt-color-configuration.html
## Colours for items in the index
color index $my_new $my_bg ~N
color index $my_old $my_bg ~O
color index $my_flag $my_bg ~F
color index $my_tag $my_tag_bg ~T
color index brightred $my_bg ~D
mono index bold ~N
mono index bold ~O
mono index bold ~F
mono index bold ~T
mono index bold ~D
## Highlights inside the body of a message.
# URLs
color body $my_uri $my_bg "(https?|ftp|news|telnet|finger)://[^ \(\)\"\t\r\n]*"
color body $my_uri $my_bg "mailto:[-a-z_0-9.]+@[-a-z_0-9.]+"
mono body bold "(https?|ftp|news|telnet|finger)://[^ \"\t\r\n]*"
mono body bold "mailto:[-a-z_0-9.]+@[-a-z_0-9.]+"
## Email addresses.
color body $my_address $my_bg "[-a-z_0-9.%$]+@[-a-z_0-9.]+\\.[-a-z][-a-z]+"
mono body bold "[-a-z_0-9.%$]+@[-a-z_0-9.]+\\.[-a-z][-a-z]+"
## Header
color header white $my_bg ".*"
color header $my_from $my_bg "^from:"
color header $my_to $my_bg "^to:"
color header $my_cc $my_bg "^cc:"
color header $my_bcc $my_bg "^bcc:"
color header $my_replyto $my_bg "^reply-to:"
color header $my_inreplyto $my_bg "^in-reply-to:"
color header $my_date $my_bg "^date:"
color header yellow $my_bg "^newsgroups:"
color header $my_subject $my_bg "^subject:"
color header red $my_bg "^x-spam-rule:"
color header green $my_bg "^x-mailer:"
color header yellow $my_bg "^message-id:"
color header yellow $my_bg "^Organization:"
color header yellow $my_bg "^Organisation:"
color header yellow $my_bg "^User-Agent:"
color header yellow $my_bg "^message-id: .*pine"
color header $my_x $my_bg "^X-Fnord:"
color header $my_x $my_bg "^X-WebTV-Stationery:"
color header $my_x $my_bg "^X-Message-Flag:"
color header $my_x $my_bg "^X-Spam-Status:"
color header $my_x $my_bg "^X-SpamProbe:"
color header red $my_bg "^X-SpamProbe: SPAM"
## Coloring quoted text - coloring the first 7 levels:
color quoted $my_quote0 $my_bg
color quoted1 $my_quote1 $my_bg
color quoted2 $my_quote2 $my_bg
color quoted3 $my_quote3 $my_bg
color quoted4 $my_quote4 $my_bg
color quoted5 $my_quote5 $my_bg
color quoted6 $my_quote6 $my_bg
color quoted7 $my_quote7 $my_bg
## Default color definitions
color hdrdefault white green
color signature $my_sig $my_bg
color indicator $my_indicator $my_indicator_bg
color attachment $my_attach $my_attach_bg
color error red $my_bg
color message white $my_bg
color search brightwhite magenta
color status $my_status $my_status_bg
color tree brightblue $my_bg
color normal white $my_bg
color tilde green $my_bg
color bold brightyellow $my_bg
# color underline magenta $my_bg
color markers brightcyan $my_bg
## Colour definitions when on a mono screen
mono bold bold
mono underline underline
mono indicator reverse

View File

@ -1,11 +0,0 @@
#!/bin/sh
## Force UTF-8, otherwise most browsers will display ASCII.
umask 077
root="/tmp/mutt-$(id -u)"
mkdir -p "$root"
file="$root"/mail.html
echo '<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>' > "$file"
cat >> "$file"
$BROWSER "$file"