diff options
| author | Luke Smith <luke@lukesmith.xyz> | 2021-10-05 12:17:25 -0400 | 
|---|---|---|
| committer | Luke Smith <luke@lukesmith.xyz> | 2021-10-05 12:17:25 -0400 | 
| commit | 418565eb94b8d95bb790357afbcf2784511573b5 (patch) | |
| tree | 19a7c3dc133b9dab095e5edb18f12cce8027fb80 /bin | |
| parent | bd0075898ae441bb5e59f83d8b34df68b55aafb3 (diff) | |
minor tweaks
Diffstat (limited to 'bin')
| -rwxr-xr-x | bin/mailsync | 2 | ||||
| -rwxr-xr-x | bin/mw | 8 | 
2 files changed, 5 insertions, 5 deletions
| diff --git a/bin/mailsync b/bin/mailsync index 36f963b..ca7411d 100755 --- a/bin/mailsync +++ b/bin/mailsync @@ -43,7 +43,7 @@ case "$(uname)" in  		displays="$(echo "$pgrepoutput" | grep -wo "[0-9]*:[0-9]\+" | sort -u)"  		notify() { [ -n "$pgrepoutput" ] && for x in ${displays:-0:}; do  				export DISPLAY=$x -				notify-send --app-name="mutt-wizard" "mutt-wizard" "📬 $2 new mail(s) in \`$1\` account." +				notify-send --app-name="mutt-wizard" "New mail!" "📬 $2 new mail(s) in \`$1\` account."  			done ;}  		;;  esac @@ -198,7 +198,7 @@ askinfo() { \  		read -r smtp  	[ "$sport" = 587 ] && tlsline="# tls_starttls"  	[ -z "$realname" ] && realname="${fulladdr%%@*}" -	hostname="$(echo "$fulladdr" | cut -d @ -f 2)" +	hostname="${fulladdr#*@}"  	login="${login:-$fulladdr}"  	if [ -n "${password+x}" ]; then  		createpass @@ -222,9 +222,9 @@ getboxes() { if [ -n "${force+x}" ] ; then  		mailboxes="$(echo "$info" | grep -v HasChildren | sed "s/.*\" //;s/\"//g" | tr -d '\r')"  	fi  	[ "$type" = "pop" ] && mailboxes="INBOX" -	for x in $(sed -n "/^macro.* i[0-9] / s/\(^macro.* i\| .*\)//gp " $muttrc | sort -u; echo 0); do +	for x in $(sed -n "/^macro.* i[0-9] / s/\(^macro.* i\| .*\)//gp " "$muttrc" | sort -u; echo 0); do  		idnum=$((idnum + 1)) -		[ $idnum -eq $x ] || break +		[ "$idnum" -eq "$x" ] || break  	done  	toappend="mailboxes \`mdir=$maildir/$fulladdr/; find \$mdir -mindepth 1 -type d -name cur | sed -e 's:/cur\$:\":' -e \"s:\$mdir:\\\"=:\" | sort | tr '\\\n' ' '\`"  } @@ -335,7 +335,7 @@ while getopts "fpPXlhodTYD:y:i:I:s:S:u:a:n:x:m:t:" o; do case "${o}" in  		smtp="127.0.0.1"  		sport="1025"  		auth="login" -  		tlsline="tls_fingerprint $(msmtp --serverinfo --host=$smtp --port=$sport --tls --tls-certcheck=off | awk '/SHA256:/ {print $2}')" +  		tlsline="tls_fingerprint $(msmtp --serverinfo --host=$smtp --port=$sport --tls --tls-certcheck=off | sed -n '/SHA256:/ s/^\s*SHA256:\s*// p')"  		setact add || exit 1  		;;  	*) mwinfo;  exit 1 ;; | 
