<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/xhtml; charset=utf-8">
</head>
<body><div style="font-family: sans-serif;"><div class="markdown" style="white-space: normal;">
<p dir="auto">On 8 Jan 2023, at 20:10, Randy Bush wrote:</p>
</div><div class="plaintext" style="white-space: normal;"><blockquote style="margin: 0 0 5px; padding-left: 5px; border-left: 2px solid #777777; color: #777777;"><p dir="auto">how does one choose the color of the counters in the menu bar?</p>
</blockquote></div>
<div class="markdown" style="white-space: normal;">
<p dir="auto">I don’t believe there is a user-friendly way to do this.</p>
<p dir="auto">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:</p>
<pre style="margin-left: 15px; margin-right: 15px; padding: 5px; background-color: #F7F7F7; border-radius: 5px 5px 5px 5px; overflow-x: auto; max-width: 90vw;"><code style="margin: 0 0; border-radius: 3px; background-color: #F7F7F7; padding: 0px;">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;
}
);
</code></pre>
<p dir="auto">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.</p>
<p dir="auto">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:</p>
<pre style="margin-left: 15px; margin-right: 15px; padding: 5px; background-color: #F7F7F7; border-radius: 5px 5px 5px 5px; overflow-x: auto; max-width: 90vw;"><code style="margin: 0 0; border-radius: 3px; background-color: #F7F7F7; padding: 0px;">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.
</code></pre>
<p dir="auto">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.</p>
<p dir="auto">Glenn P. Parker<br>
<a href="mailto:glenn.parker@comcast.net" style="color: #3983C4;">glenn.parker@comcast.net</a></p>
</div>
</div>
</body>
</html>