diff options
author | Wayne Reeves <darthwayne@hotmail.com> | 2019-11-27 10:57:14 -0600 |
---|---|---|
committer | Wayne Reeves <darthwayne@hotmail.com> | 2019-11-27 10:57:14 -0600 |
commit | 07a4cc290dba7842b2ffc73ca86d23e3cc8f989a (patch) | |
tree | b3725d048d8d706e7480f87a2f58c10bed859782 /bin/mw | |
parent | 9fc9bc820d5d8d811b9b63d9f8d6f30906428f68 (diff) | |
parent | 569bda9c5fddf131a962237422326de9929c6b77 (diff) |
Merge branch 'master' of https://github.com/lukesmithxyz/mutt-wizard
Diffstat (limited to 'bin/mw')
-rwxr-xr-x | bin/mw | 11 |
1 files changed, 4 insertions, 7 deletions
@@ -1,4 +1,4 @@ -#!/bin/sh +#!/usr/bin/env sh command -V gpg >/dev/null 2>&1 && GPG="gpg" || GPG="gpg2" [ -z ${PASSWORD_STORE_DIR+x} ] && PASSWORD_STORE_DIR="$HOME/.password-store" [ -r "$PASSWORD_STORE_DIR/.gpg-id" ] && @@ -8,11 +8,7 @@ command -V gpg >/dev/null 2>&1 && GPG="gpg" || GPG="gpg2" } ! command -v mbsync >/dev/null && printf "\`mbsync\` must be installed to run mutt-wizard.\\n" && exit -case "$(uname)" in - Linux) prefix="/usr" ;; - *) prefix="/usr/local" ;; -esac - +prefix="/usr/local" muttdir="$HOME/.config/mutt" # Main mutt config location accdir="$muttdir/accounts" # Directory for account settings maildir="$HOME/.local/share/mail" # Location of mail storage @@ -73,6 +69,7 @@ Patterns * !\"[Gmail]/All Mail\" Create Both SyncState * MaxMessages $maxmes +ExpireUnread no # End profile " @@ -242,7 +239,7 @@ finalize() { \ trash=$(echo "$boxes" | grep -i -m 1 trash | sed 's/=/+/g') sed -ibu "/^mailboxes\|^set record\|^set postponed\|^set trash\|^set spoolfile/d" "$accdir/$idnum-$title.muttrc" ; rm -f "$accdir/$idnum-$title.muttrcbu" { echo "set spoolfile = \"$spoolfile\""; echo "set record = \"$record\""; echo "set postponed = \"$postponed\""; echo "set trash = \"$trash\""; } >> "$accdir/$idnum-$title.muttrc" - echo "mailboxes =$title ===================== $(echo "$boxes" | sed -e "s/^\|$/\"/g" | tr "\n" " ")" >> "$accdir/$idnum-$title.muttrc" + echo "mailboxes $(echo "$boxes" | sed -e "s/^\|$/\"/g" | tr "\n" " ")" >> "$accdir/$idnum-$title.muttrc" printf "Setting up your keyboard shortcuts for jumping between mailboxes...\\n" sed -ibu "/# mw-autogenerated/d" "$accdir/$idnum-$title.muttrc" ; rm -f "$accdir/$idnum-$title.muttrcbu" echo "$boxes" | grep -i inbox | head -n 1 | formatShortcut i inbox |