multiple color schemes

Jon LaBadie mutter at jgcomp.com
Wed Sep 8 19:50:23 UTC 2021


On Wed, Sep 08, 2021 at 04:23:59PM +0300, Oleg A. Mamontov wrote:
>On Wed, Sep 08, 2021 at 01:20:27AM -0400, Jon LaBadie wrote:
>>I've always preferred a black letters on white background scheme.
>>However, after cataract surgery I'm considering using a dark
>>background scheme.
>>
>>Has anyone a technique for defining multiple color schemes and
>>toggling among them while using mutt?
>>
>>I already keep my color scheme in a separate file and source
>>that file from ~/.muttrc.  To extend that, I created two
>>files for light and dark schemes and separate macros (,l and ,d)
>>to source them while running mutt.
>>
>>I'd like to reduce that to a single macro that toggles between
>>the files or one that allows selecting from multiple scheme
>>files, perhaps in round robin fashion.
>
>You can try something like below approach with dynamically redefined
>macro:
>
>~/.muttrc
>---
>macro index XX source ~/.mutt/colors1.muttrc
>---
>
>~/.mutt/colors1.muttrc
>---
># colors #1
>macro index XX source ~/.mutt/colors2.muttrc
>---
>
>~/.mutt/colors2.muttrc
>---
># colors #2
>macro index XX source ~/.mutt/colors1.muttrc
>---

Interesting approach.

Some interpreted languages prevent the redefinition
of a macro while that macro is executing.  Not sure
about mutt's interpreter, I'll have to check.

thanks,

-- 
Jon H. LaBadie                 mutter at jgcomp.com
  11226 South Shore Rd.          (703) 787-0688 (H)
  Reston, VA  20190              (703) 935-6720 (C)


More information about the Mutt-users mailing list