|
|
@ -3,8 +3,16 @@ |
|
|
# Select default account |
|
|
# Select default account |
|
|
find ~/.config/neomutt/accounts/ -name "*.mail" -printf "source '%p'\n" -quit |
|
|
find ~/.config/neomutt/accounts/ -name "*.mail" -printf "source '%p'\n" -quit |
|
|
|
|
|
|
|
|
|
|
|
# Order of the keys to use for the account switch macro |
|
|
|
|
|
chars="1234567890azertyuiopqsdfghjklmwxcvbn" |
|
|
|
|
|
i=1 |
|
|
|
|
|
|
|
|
# Setup folder hooks for all the accounts |
|
|
# Setup folder hooks for all the accounts |
|
|
for f in ~/.config/neomutt/accounts/*.mail; do |
|
|
for f in ~/.config/neomutt/accounts/*.mail; do |
|
|
account="$(basename -s '.mail' "$f")" |
|
|
account="$(basename -s '.mail' "$f")" |
|
|
printf 'folder-hook =%s '\''source %s'\''\n' "$account" "$f" |
|
|
printf 'folder-hook =%s '\''source %s'\''\n' "$account" "$f" |
|
|
|
|
|
key="$(printf '%s' "$chars" | cut -c "$i")" |
|
|
|
|
|
printf 'macro index,pager <Esc>%s "<change-folder>=%s/Inbox<Return>" "Change to %s Inbox"\n' \ |
|
|
|
|
|
"$key" "$account" "$account" |
|
|
|
|
|
i=$((i+1)) |
|
|
done |
|
|
done |
|
|
|