[neomutt] Misc fixes
This commit is contained in:
parent
25f19e2607
commit
1f1fa8a5d1
5 changed files with 23 additions and 15 deletions
|
@ -18,7 +18,7 @@ if [ -e "$LOCKFILE" ] && kill -0 "$(cat "$LOCKFILE")"; then
|
|||
fi
|
||||
|
||||
# make sure the lockfile is removed when we exit and then claim it
|
||||
trap "rm -f $LOCKFILE; exit" INT TERM EXIT
|
||||
trap "rm -f '$LOCKFILE'; exit" INT TERM EXIT
|
||||
echo $$ > "$LOCKFILE"
|
||||
|
||||
# Try a single short sync to test password availability
|
||||
|
|
|
@ -65,7 +65,7 @@ unignore Organization X-Label X-Mailer User-Agent
|
|||
# Compose #
|
||||
###########
|
||||
# https://www.zigg.com/2018/natalie-nguyen.html
|
||||
my_hdr X-Clacks-Overhead: GNU Natalie Nguyen, Terry Pratchett
|
||||
my_hdr X-Clacks-Overhead: GNU Laura, Natalie Nguyen, Terry Pratchett
|
||||
set use_from # set a From: header
|
||||
set use_envelope_from # which from?
|
||||
set sig_dashes # dashes before sig
|
||||
|
|
|
@ -2,10 +2,14 @@
|
|||
# GENERAL #
|
||||
###########
|
||||
bind index,pager N search-opposite
|
||||
bind index,pager \Cu half-up
|
||||
bind index,pager \Cd half-down
|
||||
bind index,pager g noop # required to define multikeys binds
|
||||
bind generic,index,pager \Cu half-up
|
||||
bind generic,index,pager \Cd half-down
|
||||
bind generic,index,pager g noop # required to define multikeys binds
|
||||
bind generic,index gg first-entry
|
||||
bind generic,index G last-entry
|
||||
|
||||
bind index,pager <tab> sync-mailbox
|
||||
|
||||
macro index,pager ga "<shell-escape>mailsync<enter>" "Sync all IMAP mailboxes"
|
||||
|
||||
###########
|
||||
|
@ -21,8 +25,6 @@ bind index,pager B sidebar-toggle-visible # Toggle sidebar
|
|||
#########
|
||||
# INDEX #
|
||||
#########
|
||||
bind index gg first-entry
|
||||
bind index G last-entry
|
||||
bind index h noop # display-toggle-weed is rubbish in index view
|
||||
bind index l display-message
|
||||
bind index p recall-message
|
||||
|
@ -57,8 +59,7 @@ macro pager gu "<pipe-message> urlscan <enter>"
|
|||
##########
|
||||
# ATTACH #
|
||||
##########
|
||||
# http://stevelosh.com/blog/2012/10/the-homely-mutt/
|
||||
bind attach l view-mailcap
|
||||
bind attach l view-text # Force viewing as text
|
||||
|
||||
###########
|
||||
# NOTMUCH #
|
||||
|
@ -82,7 +83,7 @@ bind compose P pgp-menu
|
|||
###########
|
||||
# Browser #
|
||||
###########
|
||||
bind browser l select-entry
|
||||
bind browser l descend-directory
|
||||
bind browser h goto-parent
|
||||
|
||||
# vim: syntax=neomuttrc
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
#!/bin/sh
|
||||
|
||||
usage() {
|
||||
>&2 echo "$0 <neomutt \$folder>"
|
||||
>&2 echo "$0 <maildirs \$folder>"
|
||||
>&2 echo " Generate neomutt mailboxes & named-mailboxes for every maildir in \$folder"
|
||||
exit 1
|
||||
}
|
||||
|
@ -12,11 +12,18 @@ fi
|
|||
|
||||
maildir="$1"
|
||||
|
||||
mailboxes=$(find "$maildir" -mindepth 1 -maxdepth 1 -type d ! -name cur ! -name tmp ! -name new ! -name .notmuch)
|
||||
mailboxes=$(find "$maildir" -mindepth 1 -maxdepth 1 -type d ! -name cur ! -name tmp ! -name new ! -name .notmuch | sort)
|
||||
|
||||
# Order of the keys to use for the account switch macro
|
||||
chars="1234567890azertyuiopqsdfghjklmwxcvbn"
|
||||
i=1
|
||||
|
||||
for m in $mailboxes; do
|
||||
inbox="$(find "$m" -maxdepth 1 -iname "inbox" -type d -printf "%f" -quit)"
|
||||
echo "named-mailboxes '$(basename "$m")' '$m/$inbox'"
|
||||
key="$(printf '%s' "$chars" | cut -c "$i")"
|
||||
printf "named-mailboxes '[%s] %s' '%s'\n" "$key" "$(basename "$m")" "$m/$inbox"
|
||||
printf "sidebar_whitelist '%s'\n" "$m/$inbox"
|
||||
printf "mailboxes "
|
||||
find "$m" -mindepth 1 -type d ! -name cur ! -name tmp ! -name new -printf '"%p"\0' | xargs -0
|
||||
i=$((i+1))
|
||||
done
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
set sidebar_visible
|
||||
set mail_check_stats # update unread/flagged/total counts
|
||||
set sidebar_format = '%B%?F? [%!]?%* %?N?%N/?%?S?%S?'
|
||||
set sidebar_format = '%D%?F? [%!]?%* %?N?%N/?%?S?%S?'
|
||||
set sidebar_width = 32 # Note: some chars take two columns (chinese)
|
||||
set sidebar_short_path # Keep only end of mailbox path
|
||||
set sidebar_component_depth = 0 # nb of parent subdirs to hide
|
||||
set sidebar_component_depth = 1 # nb of parent subdirs to hide
|
||||
set sidebar_delim_chars = '/.' # mailbox path sep, '.' is used with IMAP
|
||||
set sidebar_divider_char = '|' # UI separator bar char
|
||||
set sidebar_folder_indent # indent according to path tree
|
||||
|
|
Loading…
Reference in a new issue