On Mon, Dec 05, 2022 at 06:18:05PM -0800, Will Yardley wrote:
On Mon, Dec 05, 2022 at 08:26:16PM -0500, Jon LaBadie wrote:

Perhaps I've overlooked the facility.  Is there a way to test the
shell environment in .muttrc?  Basically an "if" statement.

I enter mutt in several ways (direct, aliases, shell scripts,
functions, etc) and from several devices.  My smart phone needs a
different color scheme than the other devices.

I think there may be an internal way as well, but one option would be to
set an env var (e.g., TYPE) depending on the type of session, and then
do something like (untested):

source ~/.mutt/colors.${TYPE:-default}

Nice suggestion Will, tnx.

I chose XDG_SESSION_TYPE (automatically set: so far to either x11 or tty) and it seems to be doing what I was looking for.

--
Jon H. LaBadie                 j...@labadie.us
 154 Milkweed Dr                 (540) 868-8052 (H)
 Lake Frederick, VA 22630        (703) 935-6720 (M)

Reply via email to