[MlMt] counter colors

Glenn Parker glenn.parker at comcast.net
Mon Jan 23 18:55:30 EST 2023


On 8 Jan 2023, at 20:10, Randy Bush wrote:

> how does one choose the color of the counters in the menu bar?

I don’t believe there is a user-friendly way to do this.

However, as with practically everything else in MailMate, there is a 
hidden configuration setting. Examining the output of “defaults read 
com.freron.MailMate”, I find the following cluster of settings:

     MmCounters2 =     (
         {
             color = "#3983C4D7";
             count = unreplied;
             inDock = 1;
             inMenuBar = 1;
             position = topLeft;
             set = INBOX;
         },
         {
             color = "#D03B06D7";
             count = unread;
             inDock = 1;
             inMenuBar = 1;
             position = topRight;
             set = INBOX;
         },
         {
             color = "#F9B311D7";
             count = all;
             inDock = 1;
             inMenuBar = 1;
             position = bottomLeft;
             set = DRAFTS;
         },
         {
             color = "#7CBF0CD7";
             count = flagged;
             inDock = 0;
             inMenuBar = 0;
             position = bottomRight;
             set = INBOX;
         }
     );

Each color is expressed using four two-digit hex values (red, green, 
blue, alpha). NB: alpha refers to transparency of the color. It seems 
that only the background color is configurable, with a fixed white text 
color.

Not only is this setting not user-friendly, it’s not all that 
developer-friendly either. Editing these color values using 
“defaults” will be trickier but the gist of it is, in a terminal 
window:

     defaults read com.freron.MailMate MmCounters2 > counters.txt
     ### Quit the MailMate app.
     ### Edit counters.txt to tweak only the color values.
     defaults write com.freron.MailMate MmCounters2 “`cat 
counters.txt`”
     ### Restart the MailMate app.

Note the finicky quotation marks: back-ticks nested inside double 
quotes. This is necessary because the “defaults” command has no 
option to read a value from stdin. I verified that this works for this 
particular case, but if you mess up, you could trash your MailMate 
preferences. Proceed at your own risk.

Glenn P. Parker
glenn.parker at comcast.net
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freron.com/pipermail/mailmate/attachments/20230123/44bd6aca/attachment.htm>


More information about the mailmate mailing list