On 2022-06-26 10:03, Josef 'Jeff' Sipek wrote:
> On Tue, Jun 14, 2022 at 15:26:47 -0400, Christopher Conforti wrote:
> > Hi all,
> >
> > I've been using mutt for a bit now. I really like it, because it's
> > vastly more efficient than the GUI MUA I was using before and so much
> > more configurable; there are a LOT of options! It seems here lately I
> > learn about a new one every day that I just happen to have a use for.
> >
> > I imagine there are a number of users who, like me, enjoy tinkering
> > with and tweaking their setup, adjusting every detail to their liking.
> > So for those who do:
> > * Have you done anything unusual with your configuration? Why?
>
> I don't think it is that unusual, but I thought it was clever when someone
> told me about it 15+ years ago: I use a "conditionals" to tweak mutt
> settings per host without having to duplicate all the generic tweaks in my
> muttrc. Specifically, in my muttrc I have a line like:
>
> source `$HOME/environ/bin/muttsource
> $HOME/environ/local/muttrc.$MUTTPFX$HOSTNAME`
>
> Where muttsource is:
>
> #!/bin/sh
>
> if [ -e "$1" ]; then
> FILE="$1"
> else
> FILE="/dev/null"
> fi
>
> echo "$FILE"
>
> I use these muttrc fragments to tweak things like paths and so on.
>
> The $MUTTPFX env var directs mutt to a different set of muttrc fragments. I
> use this to support multiple accounts - namely, personal ("") and work
> ("work-"). (I like running two mutts in separate terminals for that instead
> of switching inside one.) To start the work mutt, all I have to do is:
>
> $ export MUTTPFX=work-
> $ mutt
>
> Well, I have a shell script called work-mutt that does that :)
>
> Jeff.I have a similar, but simpler setup: For each host, there is config file (e.g. work.cf), and all of these files source my generic mutt conf: set alias_file= '~/.mutt/generic.cf' source $alias_file To select the desired config file (using the parameter -F) and switch to the appropriate directory for saving attachments quickly, there are aliases in .zshrc: alias mutt_work='cd ~/work_dir && /opt/homebrew/bin/mutt -F ~/.mutt/work.cf && cd' So I can just type mutt_work, mutt_personal, mutt_lists (actually, it's mw, mp, ml) to start mutt with different settings – no scripting required. Best, Jan
signature.asc
Description: PGP signature
