mutt-wizard

A wizard that autocreates an offline email setup for (neo)mutt with isync/mbsync
Log | Files | Refs | README | LICENSE

commit c2f6fcbe6b2185db3e1a64860236f1a0417f3f8a
parent 40e565e7fe7cf095dba69c7d8c1de2b126aa0c7d
Author: Luke Smith <luke@lukesmith.xyz>
Date:   Fri, 19 Apr 2019 23:43:28 -0400

macro description changes

Diffstat:
Mmw | 8++++----
1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/mw b/mw @@ -163,7 +163,7 @@ EOF echo "$msmtp_profile" >> "$HOME/.config/msmtp/config" echo "$mutt_profile" > "$accdir/$title.muttrc" echo "$mbsync_profile" >> "$mbsyncrc" - echo "macro index,pager i$idnum '<sync-mailbox><enter-command>source $accdir/$title.muttrc<enter><change-folder>!<enter>;<check-stats>'" >> "$muttdir/personal.muttrc" + echo "macro index,pager i$idnum '<sync-mailbox><enter-command>source $accdir/$title.muttrc<enter><change-folder>!<enter>;<check-stats>' \"switch to $fulladdr\"" >> "$muttdir/personal.muttrc" ! grep "^source.*.muttrc" "$muttdir/personal.muttrc" >/dev/null && echo "source $accdir/$title.muttrc" >> "$muttdir/personal.muttrc" trysync && finalize [ "$accounttype" = "offline" ] || sed -i "/IMAPStore $title$/,/# End profile/d" "$mbsyncrc" @@ -172,9 +172,9 @@ EOF getpass() { pass rm -f "mutt-wizard-$title" 2>/dev/null ; pass insert "mutt-wizard-$title" ;} formatShortcut() { \ - while read -r data; do { echo "macro index,pager g$1 \"<change-folder>$data<enter>\" \"Go to $2.\" # autogenerated" - echo "macro index,pager M$1 \"<save-message>$data<enter>\" \"Move mail to $2.\" # autogenerated" - echo "macro index,pager C$1 \"<copy-message>$data<enter>\" \"Copy mail to $2.\" # autogenerated"; } >> "$muttdir/accounts/$3.muttrc" + while read -r data; do { echo "macro index,pager g$1 \"<change-folder>$data<enter>\" \"go to $2\" # autogenerated" + echo "macro index,pager M$1 \"<save-message>$data<enter>\" \"move mail to $2\" # autogenerated" + echo "macro index,pager C$1 \"<copy-message>$data<enter>\" \"copy mail to $2\" # autogenerated"; } >> "$muttdir/accounts/$3.muttrc" done ;} trysync() { ! ping -q -c 1 1.1.1.1 > /dev/null && printf "No internet connection detected.\\nTry rerunning \`mbsync %s\` manually when connection is established, then select the option to detect mailboxes and finalize installation.\\n" "$title" && return 1