Mutt: Refactor, bindings, save attachments to ~/temp
parent
ecd6786843
commit
3d84244049
|
@ -276,8 +276,9 @@ globalkeys = awful.util.table.join(
|
||||||
awful.key({ modkey, }, "p", function () awful.util.spawn("zathura") end),
|
awful.key({ modkey, }, "p", function () awful.util.spawn("zathura") end),
|
||||||
|
|
||||||
-- Mail user agent
|
-- Mail user agent
|
||||||
awful.key({ modkey, }, "m", function () awful.util.spawn(term .. "mutt") end),
|
-- Mutt needs to be started in the folder where you want to save attachments.
|
||||||
awful.key({ }, "XF86Mail", function () awful.util.spawn(term .. "mutt") end),
|
awful.key({ modkey, }, "m", function () awful.util.spawn(term .. "sh -c 'cd ~/temp && mutt'") end),
|
||||||
|
awful.key({ }, "XF86Mail", function () awful.util.spawn(term .. "sh -c 'cd ~/temp && mutt'") end),
|
||||||
|
|
||||||
-- Web browser
|
-- Web browser
|
||||||
awful.key({ modkey, }, "w", function () awful.util.spawn_with_shell("dwb 2>>/tmp/dwb" .. uid .. ".log") end),
|
awful.key({ modkey, }, "w", function () awful.util.spawn_with_shell("dwb 2>>/tmp/dwb" .. uid .. ".log") end),
|
||||||
|
|
|
@ -1,41 +1,40 @@
|
||||||
# -*- mode:sh -*-
|
## Mutt -- Gmail account sample
|
||||||
## Mutt -- Personal account
|
|
||||||
set imap_user=user@gmail.com
|
set imap_user=user@gmail.com
|
||||||
set imap_pass=$my_pw_personal
|
set imap_pass=$my_pw_personal
|
||||||
set from=$imap_user
|
set from=$imap_user
|
||||||
set hostname="gmail.com"
|
set hostname="gmail.com"
|
||||||
|
|
||||||
set folder = imaps://user@imap.gmail.com/
|
set folder=imaps://user@imap.gmail.com/
|
||||||
set spoolfile = +INBOX
|
set spoolfile=+INBOX
|
||||||
set postponed = +[Google Mail]/Drafts
|
set postponed=+[Gmail]/Drafts
|
||||||
unset record ## Google does it automatically, so we do not want duplicates.
|
unset record ## Google does it automatically, so we do not want duplicates.
|
||||||
|
|
||||||
## Send options.
|
## Send options.
|
||||||
set realname='User X'
|
set realname='John Doe'
|
||||||
set smtp_url=smtps://user:$imap_pass@smtp.gmail.com
|
set smtp_url=smtps://user:$imap_pass@smtp.gmail.com
|
||||||
set ssl_force_tls = yes
|
set ssl_force_tls=yes
|
||||||
unset ssl_starttls
|
unset ssl_starttls
|
||||||
|
|
||||||
## Signatures
|
## Signature with a random 'fortune'.
|
||||||
## Note that fortune-mod must be installed to use fortune command.
|
set signature="cat ~/.mutt/real_name && fortune -s |"
|
||||||
set signature="cat ~/.mutt/real_name && cat ~/.mutt/asciiribbon && fortune -s|"
|
|
||||||
|
|
||||||
## Sidebar mailboxes separator workaround.
|
## Sidebar mailboxes separator workaround.
|
||||||
mailboxes "+A-- User -----------"
|
mailboxes "+A-- Personal -------"
|
||||||
|
|
||||||
## Hooks
|
## Hooks
|
||||||
account-hook $folder "set imap_user=user@gmail.com imap_pass=$my_pw_personal"
|
account-hook $folder "set imap_user=user@gmail.com imap_pass=$my_pw_personal"
|
||||||
## Reset PGP send-hooks.
|
## Reset PGP send-hooks.
|
||||||
## TODO: unhook does not seem to be working.
|
## TODO: unhook does not seem to be working.
|
||||||
unhook send-hook
|
unhook send-hook
|
||||||
|
send-hook . 'unset pgp_autosign; unset pgp_autoencrypt'
|
||||||
|
|
||||||
## Remove your e-mail from group-reply.
|
## Remove own e-mail address from group-reply.
|
||||||
alternates $imap_user
|
alternates $imap_user
|
||||||
|
|
||||||
## Gmail-specific macros:
|
## Gmail-specific macros:
|
||||||
## Prevent Gmail from deleting to 'All Mail', move it to Trash instead.
|
## 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 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"
|
macro pager d "s+[Gmail]/Trash<enter><enter>" "Move to Gmail's Trash"
|
||||||
## Undelete messages.
|
## Undelete messages.
|
||||||
# macro index u ";s+INBOX<enter><enter>" "Move to Gmail's INBOX"
|
macro index u ";s+INBOX<enter><enter>" "Move to Gmail's INBOX"
|
||||||
# macro pager u "s+INBOX<enter><enter>" "Move to Gmail's INBOX"
|
macro pager u "s+INBOX<enter><enter>" "Move to Gmail's INBOX"
|
||||||
|
|
|
@ -1,7 +1,5 @@
|
||||||
#!/bin/sh
|
|
||||||
## 256 colors classic theme
|
## 256 colors classic theme
|
||||||
|
|
||||||
cat <<EOF
|
|
||||||
set my_bg = black
|
set my_bg = black
|
||||||
set my_new = brightcyan
|
set my_new = brightcyan
|
||||||
set my_old = brightred
|
set my_old = brightred
|
||||||
|
@ -36,4 +34,3 @@ set my_quote4 = color32
|
||||||
set my_quote5 = color33
|
set my_quote5 = color33
|
||||||
set my_quote6 = color39
|
set my_quote6 = color39
|
||||||
set my_quote7 = color38
|
set my_quote7 = color38
|
||||||
EOF
|
|
|
@ -1,7 +1,5 @@
|
||||||
#!/bin/sh
|
|
||||||
## 256 colors Zenburn theme
|
## 256 colors Zenburn theme
|
||||||
|
|
||||||
cat <<EOF
|
|
||||||
set my_bg = color237
|
set my_bg = color237
|
||||||
set my_new = color142
|
set my_new = color142
|
||||||
set my_old = color172
|
set my_old = color172
|
||||||
|
@ -36,4 +34,3 @@ set my_quote4 = color32
|
||||||
set my_quote5 = color33
|
set my_quote5 = color33
|
||||||
set my_quote6 = color39
|
set my_quote6 = color39
|
||||||
set my_quote7 = color38
|
set my_quote7 = color38
|
||||||
EOF
|
|
196
.mutt/muttrc
196
.mutt/muttrc
|
@ -1,24 +1,24 @@
|
||||||
## -*- mode:sh -*- #
|
|
||||||
## Mutt Configuration
|
## Mutt Configuration
|
||||||
|
|
||||||
## Note on folders:
|
## This configuration is made for Mutt with embedded IMAP support.
|
||||||
|
|
||||||
## These folders are assumed to exist:
|
## These folders are assumed to exist:
|
||||||
## ~/.mutt.d: personal stuff (contacts, account information).
|
## ~/.mutt.d: personal stuff (contacts, account information).
|
||||||
## ~/.mutt: public stuff (theme, mailcap).
|
## ~/.mutt: public stuff (config, theme, mailcap).
|
||||||
## ~/.cache/mutt: header cache.
|
## ~/.cache/mutt: cache for headers and messages.
|
||||||
|
|
||||||
################################################################################
|
################################################################################
|
||||||
## General options
|
## General options.
|
||||||
|
|
||||||
## Beep on new incoming mails.
|
## Beep on new incoming mails.
|
||||||
set beep_new = "yes"
|
set beep_new=yes
|
||||||
|
|
||||||
set crypt_replyencrypt = yes
|
## PGP options.
|
||||||
set crypt_replysign = yes
|
set crypt_replyencrypt=yes
|
||||||
set crypt_replysignencrypted = yes
|
set crypt_replysign=yes
|
||||||
set crypt_use_gpgme = yes
|
set crypt_replysignencrypted=yes
|
||||||
set pgp_timeout = 3600
|
set crypt_use_gpgme=yes
|
||||||
# set pgp_use_gpg_agent = yes
|
set pgp_timeout=3600
|
||||||
|
|
||||||
## Headers are editable in editor.
|
## Headers are editable in editor.
|
||||||
set edit_headers=yes
|
set edit_headers=yes
|
||||||
|
@ -26,7 +26,8 @@ set edit_headers=yes
|
||||||
## Set EDITOR dynamically.
|
## Set EDITOR dynamically.
|
||||||
source "~/.mutt/maileditor.sh|"
|
source "~/.mutt/maileditor.sh|"
|
||||||
|
|
||||||
## Reply fast
|
## Don't ask for recipient. We usually don't want to include mail unless we want
|
||||||
|
## to quote it.
|
||||||
set fast_reply=yes
|
set fast_reply=yes
|
||||||
set include=ask-no
|
set include=ask-no
|
||||||
set include_onlyfirst=yes
|
set include_onlyfirst=yes
|
||||||
|
@ -34,79 +35,62 @@ set include_onlyfirst=yes
|
||||||
## Store message headers locally to speed things up. Gentoo wiki says that if a
|
## 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
|
## folder is specified, it is even faster. If no folder exists, the cache will
|
||||||
## be a single file.
|
## be a single file.
|
||||||
set header_cache = "~/.cache/mutt"
|
set header_cache=~/.cache/mutt/headers
|
||||||
set message_cachedir = "~/.cache/mutt_msg"
|
set message_cachedir=~/.cache/mutt/messages
|
||||||
source "~/.mutt/cachepurge.sh|"
|
source "~/.mutt/purgecache.sh '$message_cachedir'|"
|
||||||
|
|
||||||
## Tell Mutt to check all IMAP folders. This will add all of them to the
|
## Tell Mutt to check all IMAP folders. This will add all of them to the sidebar
|
||||||
## sidebar. Contrary to the manu 'mailboxes' way, order cannot be controlled, so
|
## (if used). Contrary to the 'mailboxes' menu, sorting order cannot be
|
||||||
## you should set 'sidebar_sort' to yes. This will sort the folders
|
## controlled, so you should set 'sidebar_sort' to yes. This will sort the
|
||||||
## alphabetically, ignoring punctuation.
|
## folders alphabetically, ignoring punctuation.
|
||||||
set imap_check_subscribed
|
set imap_check_subscribed
|
||||||
|
|
||||||
## Keep imap connection alive by polling intermittently (time in seconds).
|
## Keep imap connection alive by polling intermittently (time in seconds).
|
||||||
set imap_keepalive = 30
|
set imap_keepalive=30
|
||||||
|
|
||||||
## Allow mutt to open new imap connection automatically.
|
## Allow mutt to open new imap connection automatically.
|
||||||
unset imap_passive
|
unset imap_passive
|
||||||
|
## How often to check for new mail (time in seconds).
|
||||||
|
set mail_check=60
|
||||||
|
|
||||||
## Mailcap
|
## Mailcap
|
||||||
set mailcap_path = ~/.mutt/mailcap
|
set mailcap_path=~/.mutt/mailcap
|
||||||
auto_view text/html
|
auto_view text/html
|
||||||
alternative_order text/plain text/html
|
alternative_order text/plain text/html
|
||||||
|
|
||||||
## How often to check for new mail (time in seconds).
|
|
||||||
set mail_check = 60
|
|
||||||
|
|
||||||
## Mailbox type.
|
## Mailbox type.
|
||||||
set mbox_type=Maildir
|
set mbox_type=Maildir
|
||||||
|
|
||||||
## Forward attachment as well
|
## Forward attachment as well.
|
||||||
set mime_forward=yes
|
set mime_forward=yes
|
||||||
set mime_forward_rest=yes
|
set mime_forward_rest=yes
|
||||||
|
|
||||||
## Keep showing the list of mails while in pager.
|
## Keep showing the list of mails while in pager.
|
||||||
set pager_index_lines=8
|
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_context=3
|
||||||
set pager_stop=yes
|
set pager_stop=yes
|
||||||
|
|
||||||
## Encoding
|
## Encoding.
|
||||||
set rfc2047_parameters=yes
|
set rfc2047_parameters=yes
|
||||||
set send_charset="us-ascii:utf-8"
|
set send_charset="us-ascii:utf-8"
|
||||||
|
|
||||||
## Remove delay between mailbox switches.
|
## Remove delay between mailbox switches.
|
||||||
set sleep_time = 0
|
set sleep_time=0
|
||||||
|
|
||||||
set sort = threads
|
## Group mail into conversations, sort by last mail from conversation.
|
||||||
set sort_aux = last-date-received
|
set sort=threads
|
||||||
set strict_threads = yes
|
set sort_aux=last-date-received
|
||||||
|
set strict_threads=yes
|
||||||
|
|
||||||
################################################################################
|
################################################################################
|
||||||
## Multiple accounts
|
## Multiple accounts
|
||||||
|
|
||||||
## accountrc should contain the following config:
|
|
||||||
|
|
||||||
## Set account names (arbitrary).
|
|
||||||
# set my_ac_personal=personal
|
|
||||||
# set my_ac_work=work
|
|
||||||
#
|
|
||||||
## Fetch passwords
|
|
||||||
# source "ccat ~/.mutt.pwds.cpt |"
|
|
||||||
## Or
|
|
||||||
# source "gpg2 -dq ~/.mutt.pwds.gpg |"
|
|
||||||
##
|
|
||||||
## Folder hooks, one per account.
|
|
||||||
# source "~/.mutt.d/$my_ac_personal"
|
|
||||||
# folder-hook $folder 'source ~/.mutt.d/$my_ac_personal'
|
|
||||||
# source "~/.mutt.d/$my_ac_work"
|
|
||||||
# folder-hook $folder 'source ~/.mutt.d/$my_ac_work'
|
|
||||||
##
|
|
||||||
## Optionnaly you can add shortcuts to switch mailboxes:
|
|
||||||
# macro index,pager <f2> '<enter-command>source ~/.mutt.d/$my_ac_personal<enter><change-folder>!<enter>'
|
|
||||||
# macro index,pager <f3> '<enter-command>source ~/.mutt.d/$my_ac_work<enter><change-folder>!<enter>'
|
|
||||||
|
|
||||||
## Store passwords as follows in .mutt.pwds:
|
## Store passwords as follows in .mutt.pwds:
|
||||||
# set my_pw_account = foo
|
# set my_pw_personal = foo
|
||||||
|
# set my_pw_work = foo
|
||||||
##
|
##
|
||||||
## CCRYPT:
|
## CCRYPT:
|
||||||
## $ ccencrypt .mutt.pwds
|
## $ ccencrypt .mutt.pwds
|
||||||
|
@ -116,29 +100,46 @@ set strict_threads = yes
|
||||||
## Encrypt them with:
|
## Encrypt them with:
|
||||||
## $ gpg2 -e -r <user> ".mutt.pwds"
|
## $ 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 "~/.mutt.d/personal"
|
||||||
|
# folder-hook $folder 'source ~/.mutt.d/personal'
|
||||||
|
# source "~/.mutt.d/work"
|
||||||
|
# folder-hook $folder 'source ~/.mutt.d/work'
|
||||||
|
##
|
||||||
|
## You can add an optional binding to switch mailboxes:
|
||||||
|
# macro index,pager <f2> '<enter-command>source ~/.mutt.d/personal<enter><change-folder>!<enter>'
|
||||||
|
# macro index,pager <f3> '<enter-command>source ~/.mutt.d/work<enter><change-folder>!<enter>'
|
||||||
|
|
||||||
source "~/.mutt.d/accountrc"
|
source "~/.mutt.d/accountrc"
|
||||||
|
|
||||||
################################################################################
|
################################################################################
|
||||||
## Aliases
|
## Aliases.
|
||||||
|
|
||||||
## Mutt native support
|
## Mutt native support.
|
||||||
# set alias_file = "~/.mutt.d/aliases"
|
# set alias_file = "~/.mutt.d/aliases"
|
||||||
# set sort_alias = alias
|
# set sort_alias = alias
|
||||||
# set reverse_alias = yes
|
# set reverse_alias = yes
|
||||||
# source $alias_file
|
# source $alias_file
|
||||||
|
|
||||||
## Abook
|
## Abook.
|
||||||
## We redirect the error stream in case the config file in not compatible with
|
## We redirect the error stream in case the config file in not compatible with
|
||||||
## current abook bersion.
|
## current Abook version.
|
||||||
set query_command= "abook --mutt-query '%s' 2>/dev/null"
|
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"
|
macro index,pager a "<pipe-message>abook --add-email-quiet<return>" "Add this sender to Abook"
|
||||||
bind editor <Tab> complete-query
|
bind editor <Tab> complete-query
|
||||||
|
|
||||||
################################################################################
|
################################################################################
|
||||||
## Keys
|
## Key bindings.
|
||||||
|
|
||||||
## Security issue: if enter-command is available from the GUI, it is possible to
|
## Security issue: if 'enter-command' is available from the GUI, it is possible
|
||||||
## see the password unencrypted. We disable it for this reason. Every command
|
## 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
|
## that the user intends to use must be bound to a key in advance, otherwise it
|
||||||
## will never be accessible.
|
## will never be accessible.
|
||||||
bind generic,alias,attach,browser,editor,index,compose,pager,pgp,postpone ':' noop
|
bind generic,alias,attach,browser,editor,index,compose,pager,pgp,postpone ':' noop
|
||||||
|
@ -149,7 +150,7 @@ macro attach 'V' "<pipe-entry>cat >~/.cache/mutt/mutt-attach.mail && $BROWSER ~/
|
||||||
## Remap bounce-message function to "B"
|
## Remap bounce-message function to "B"
|
||||||
bind index B bounce-message
|
bind index B bounce-message
|
||||||
|
|
||||||
## Always reply to group
|
## Always reply to group.
|
||||||
bind index,pager r group-reply
|
bind index,pager r group-reply
|
||||||
|
|
||||||
## Fix the 'change-dir' issue with multiple accounts. When change-dir was called
|
## Fix the 'change-dir' issue with multiple accounts. When change-dir was called
|
||||||
|
@ -168,8 +169,32 @@ bind index "^" imap-fetch-mail
|
||||||
## Changed kbs=^H to kbs=\177, then:
|
## Changed kbs=^H to kbs=\177, then:
|
||||||
## $ tic -x termbs.src
|
## $ tic -x termbs.src
|
||||||
|
|
||||||
|
## Vi/Emacs bindings.
|
||||||
|
bind pager j next-line
|
||||||
|
bind pager k previous-line
|
||||||
|
bind attach,index,pager \CD 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 index <Esc>n toggle-new
|
||||||
|
bind pager <Esc>n mark-as-new
|
||||||
|
bind index <Esc>x collapse-thread
|
||||||
|
bind index <Esc>X collapse-all
|
||||||
|
bind attach,index,pager \CV next-page
|
||||||
|
bind attach,index,pager <Esc>v previous-page
|
||||||
|
bind pager g top
|
||||||
|
bind pager G bottom
|
||||||
|
bind pager <Esc>< top
|
||||||
|
bind pager <Esc>> bottom
|
||||||
|
bind attach,index g first-entry
|
||||||
|
bind attach,index G last-entry
|
||||||
|
bind attach,index <Esc>< first-entry
|
||||||
|
bind attach,index <Esc>> last-entry
|
||||||
|
|
||||||
################################################################################
|
################################################################################
|
||||||
## Custom headers for outgoing mail
|
## Custom header for outgoing mail.
|
||||||
|
|
||||||
## Undo any custom headers that may have been put in by the global Muttrc
|
## Undo any custom headers that may have been put in by the global Muttrc
|
||||||
# unmy_hdr *
|
# unmy_hdr *
|
||||||
|
@ -187,14 +212,14 @@ my_hdr X-Info: Simplicity is the ultimate sophistication.
|
||||||
# my_hdr X-Operating-System: `uname -s`, kernel `uname -r`
|
# my_hdr X-Operating-System: `uname -s`, kernel `uname -r`
|
||||||
|
|
||||||
## This header only appears to MS Outlook users
|
## This header only appears to MS Outlook users
|
||||||
# my_hdr X-Message-Flag: WARNING!! Outlook sucks!
|
# my_hdr X-Message-Flag: Warning: Outlook sucks!
|
||||||
|
|
||||||
## Custom Mail-User-Agent ID.
|
## Custom Mail-User-Agent ID.
|
||||||
set user_agent = yes
|
set user_agent=yes
|
||||||
# my_hdr User-Agent: Every email client sucks, this one just sucks less.
|
# my_hdr User-Agent: Every email client sucks, this one just sucks less.
|
||||||
|
|
||||||
################################################################################
|
################################################################################
|
||||||
## Themes
|
## Theme.
|
||||||
|
|
||||||
## Index format
|
## Index format
|
||||||
## We use my_col_* to get dynamic column size.
|
## We use my_col_* to get dynamic column size.
|
||||||
|
@ -202,28 +227,31 @@ set user_agent = yes
|
||||||
# set index_format="%?M?_%M_ ?%Z %2C %.13d (%-68.68F) %-68.68s %?M?_%M_&(%c/%l?"
|
# set index_format="%?M?_%M_ ?%Z %2C %.13d (%-68.68F) %-68.68s %?M?_%M_&(%c/%l?"
|
||||||
set date_format="%y-%m-%d %T"
|
set date_format="%y-%m-%d %T"
|
||||||
|
|
||||||
folder-hook .*[sS]ent.* 'set my_col_from = `echo $((30 * ($(tput cols)-35-24) / 100))`; set my_col_subject = `echo $((70 * ($(tput cols)-35-24) / 100))`; set index_format="%2C | %Z [%d] %-$my_col_from.${my_col_from}t (%-4.4c) %?M?<%M> ?%-$my_col_subject.${my_col_subject}s"'
|
set my_index_format_pre='set my_col_from = `echo $((30 * ($(tput cols)-35-24) / 100))`; set my_col_subject = `echo $((70 * ($(tput cols)-35-24) / 100))`; set index_format="%2C | %Z [%d] %-$my_col_from.${my_col_from}'
|
||||||
folder-hook ! .*[sS]ent.* 'set my_col_from = `echo $((30 * ($(tput cols)-35-24) / 100))`; set my_col_subject = `echo $((70 * ($(tput cols)-35-24) / 100))`; set index_format="%2C | %Z [%d] %-$my_col_from.${my_col_from}F (%-4.4c) %?M?<%M> ?%-$my_col_subject.${my_col_subject}s"'
|
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.
|
## 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) "
|
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 while refreshing the new cols value. Since there
|
## This will redraw screen and justify the index.
|
||||||
## seems to be no way to check what folder is the current, this will not behave
|
macro index,pager \CL "<enter-command>$my_index_format_pre"F"$my_index_format_post<enter><redraw-screen>"
|
||||||
## like the above hooks and will set the index_format correctly for non Sent
|
|
||||||
## folders only.
|
|
||||||
macro pager \CL '<enter-command>set my_col_from = `echo $((30 * ($(tput cols)-35-24) / 100))`; set my_col_subject = `echo $((70 * ($(tput cols)-35-24) / 100))`; set index_format="%2C | %Z [%d] %-$my_col_from.${my_col_from}F (%-4.4c) %-$my_col_subject.${my_col_subject}s"<enter><redraw-screen>'
|
|
||||||
|
|
||||||
## Colors
|
## Set color variables from a theme.
|
||||||
# source "/usr/share/doc/mutt/samples/colors.default"
|
# source "~/.mutt/colors.classic"
|
||||||
# source "/usr/share/doc/mutt/samples/colors.linux"
|
source "~/.mutt/colors.zenburn"
|
||||||
# source "~/.mutt/colors.classic.sh|"
|
|
||||||
source "~/.mutt/colors.zenburn.sh|"
|
## Fallback for terminals without 256 colors. This needs to be a shell script so
|
||||||
source "~/.mutt/colors.fallback.sh|"
|
## that it can check for terminal capabilities.
|
||||||
source "~/.mutt/mutt.colors"
|
source "~/.mutt/colors.fallback.sh |"
|
||||||
|
|
||||||
|
## Apply theme.
|
||||||
|
source "~/.mutt/theme"
|
||||||
|
|
||||||
################################################################################
|
################################################################################
|
||||||
## Sidebar
|
## Sidebar.
|
||||||
|
|
||||||
## We use a script to test if sidebar is installed. Needs to be loaded _after_
|
## We use a script to test if sidebar is installed. Needs to be loaded _after_
|
||||||
## the theme.
|
## the theme.
|
||||||
|
|
|
@ -1,13 +1,14 @@
|
||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
|
|
||||||
## Purge old message in Mutt's message cache.
|
## 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.
|
## This is intended to be run at startup, but can be run manually anytime.
|
||||||
## It should not output anything to stdout.
|
## It should not output anything to stdout.
|
||||||
|
|
||||||
## In KB.
|
## In KB.
|
||||||
CACHE_LIMIT=51200
|
CACHE_LIMIT=51200
|
||||||
|
|
||||||
cd ~/.cache/mutt_msg 2>/dev/null
|
cd "$1" 2>/dev/null
|
||||||
[ $? -ne 0 ] && exit
|
[ $? -ne 0 ] && exit
|
||||||
|
|
||||||
[ $(du -s . | cut -f1 -d' ') -lt $CACHE_LIMIT ] && exit
|
[ $(du -s . | cut -f1 -d' ') -lt $CACHE_LIMIT ] && exit
|
|
@ -20,10 +20,7 @@ bind index,pager \CP sidebar-prev
|
||||||
bind index,pager \CN sidebar-next
|
bind index,pager \CN sidebar-next
|
||||||
bind index,pager \CO sidebar-open
|
bind index,pager \CO sidebar-open
|
||||||
|
|
||||||
## Toggle sidebar visibility
|
## Toggle sidebar visibility. Screen might get messed up, hence the refresh.
|
||||||
# macro index b '<enter-command>toggle sidebar_visible<enter>'
|
|
||||||
# macro pager b '<enter-command>toggle sidebar_visible<enter>'
|
|
||||||
## Prevent messy output
|
|
||||||
macro index b '<enter-command>toggle sidebar_visible<enter><refresh>'
|
macro index b '<enter-command>toggle sidebar_visible<enter><refresh>'
|
||||||
macro pager b '<enter-command>toggle sidebar_visible<enter><redraw-screen>'
|
macro pager b '<enter-command>toggle sidebar_visible<enter><redraw-screen>'
|
||||||
EOF
|
EOF
|
||||||
|
|
|
@ -7,7 +7,6 @@ set -- "$HOME/.cache/dwb" \
|
||||||
"$HOME/.cache/emacs/ido.last" \
|
"$HOME/.cache/emacs/ido.last" \
|
||||||
"$HOME/.cache/emacs/saveplace" \
|
"$HOME/.cache/emacs/saveplace" \
|
||||||
"$HOME/.cache/mutt" \
|
"$HOME/.cache/mutt" \
|
||||||
"$HOME/.cache/mutt_msg" \
|
|
||||||
"$HOME/.cache/rtorrent" \
|
"$HOME/.cache/rtorrent" \
|
||||||
"$HOME/.cache/zsh" \
|
"$HOME/.cache/zsh" \
|
||||||
"$HOME/.cmus/autosave" \
|
"$HOME/.cmus/autosave" \
|
||||||
|
|
|
@ -20,7 +20,8 @@ fi
|
||||||
if command -v mutt >/dev/null 2>&1; then
|
if command -v mutt >/dev/null 2>&1; then
|
||||||
echo "==> Mutt"
|
echo "==> Mutt"
|
||||||
[ -d "$SOURCEDIR" ] && ln -snf "$SOURCEDIR/mails" "$HOME/.mutt.d"
|
[ -d "$SOURCEDIR" ] && ln -snf "$SOURCEDIR/mails" "$HOME/.mutt.d"
|
||||||
mkdir -p "$HOME/.cache/mutt/"
|
mkdir -p "$HOME/.cache/mutt/headers"
|
||||||
|
mkdir -p "$HOME/.cache/mutt/messages"
|
||||||
echo
|
echo
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue