Rado's muttrc

Note: I use a wrapper-script that defines $MUTT, $FCOL and $SCOL into the environment before mutt is launched, so that additional files are sourced correctly and the index is formatted depending on screensize.

#!/bin/ksh
	eval `resize`
	[[ "$LINES" -gt 107 ]] && LINES=107
	REST=$(( $COLUMNS - 34 ))	# the fixed items total 34 cols
	FCOL=$(( REST * 30 / 100 ))	# 30% of rest for From
	SCOL=$(( REST - $FCOL ))	# 70% of rest for subject

HI_BEG="(^|[[:space:]'\"(])"
HI_END="([[:space:]'\").,:!?]|[[:cntrl:]]?$)"
	### drop [:cntrl:]? once "$" really matches EOL
HI_LINE="${HI_BEG}_[^[:space:]_][^_]*[^[:space:]_]_$HI_END"
HI_STAR="${HI_BEG}\*[^[:space:]*][^*]*[^[:space:]*]\*$HI_END"

	NOURL="^][<>()[:space:]#/;,\"'"
	URLMAIL="[$NOURL@:]+"
	URLHOST="$NOURL."
	URLHOST="([$URLHOST]+\.*)+"
	URLPATH="$NOURL:"
	URLPATHz="(/[$URLPATH]*)*"
	URLPATHn="(/[$URLPATH]*)+"
	export URLHOST URLMAIL URLPATH URLPATHz URLPATHn HI_LINE HI_STAR

	EMAIL=`<$VAR/sys/eMail`
	PGPCMD="pgp +language=en +verbose=0"
	MIME=mutt

L='[l1I|]'
S='[sz]'
A='[@a]'
E='[e]'
I='[i1l|]'
O='[o0]'
U='[u]'

	export MUTT=$SYS/mutt PGPPASS= PGPCMD FCOL SCOL MIME EMAIL A E I O U L S

	exec mutt -n -F $MUTT/muttrc "$@"

I'd like to hear any kind of feedback. You can meet me in #mutt @ FreeNode

Wed Feb 21 22:36:34 MET 2007