Skip to content

Instantly share code, notes, and snippets.

@studgeek
Last active December 17, 2016 05:07
Show Gist options
  • Star 2 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save studgeek/37139cac136815744dad to your computer and use it in GitHub Desktop.
Save studgeek/37139cac136815744dad to your computer and use it in GitHub Desktop.
// MailMate layout that shows mails with the same tag as the selected tag (based on Correspondence)
{
name = "Tags";
rootViewer =
{
viewerType = "MmSplitView";
orientation = "horizontal";
children =
(
{
viewerType = "MmBoxView";
orientation = "vertical";
defaultSize = 200;
minWidth = 100;
autoresize = 0;
toggleMenuTitle = "Mailboxes";
toggleKeyEquivalent = "^~@d";
dragRect = { width = 16.0; height = 16.0; location = "bottomRight"; };
children =
(
{
identifier = "mailboxesOutline";
viewerType = "MmMailboxesOutlineView";
stickyMessages = 1;
},
{
viewerType = "MmMailboxesStatusBar";
},
);
},
{
viewerType = "MmSplitView";
orientation = "vertical";
collapsibleSubview = 2; // Incomplete support -- no way to get it back (1 = first, 2 = last)
children =
(
{
identifier = "pathOutlineBox";
viewerType = "MmBoxView";
orientation = "vertical";
defaultSize = 250;
autoresize = 0;
children =
(
{
identifier = "pathControl";
viewerType = "MmPathControlView";
sources = ( { sourceIdentifier = "mailboxesOutline"; } );
},
{ viewerType = "MmSeparatorView"; showWithViews = ( "pathControl" ); },
{
viewerType = "MmSplitView";
minHeight = 50;
orientation = "horizontal";
children =
(
{
identifier = "mainOutline";
viewerType = "MmMessagesOutlineView";
// columnSettings = "outlineColumns";
sources = ( { sourceIdentifier = "pathControl"; } );
defaultSize = 350;
},
// {
// identifier = "locator";
// viewerType = "MmLocatorView";
// sources = ( { sourceIdentifier = "mainOutline"; } );
// canBecomeKeyView = 0; // Not implemented
// },
);
},
);
},
{
viewerType = "MmSplitView";
orientation = "horizontal";
children =
(
{
viewerType = "MmBoxView";
orientation = "vertical";
defaultSize = 200;
autoresize = 0;
children =
(
{
viewerType = "MmLabelView";
label = "Messages with same Tags";
},
{ viewerType = "MmSeparatorView"; },
{
identifier = "correspondenceOutline";
viewerType = "MmMessagesOutlineView";
minWidth = 100;
sources = ( { sourceIdentifier = "mainOutline"; } );
selectionSources = ( { sourceIdentifier = "mainOutline"; } );
// FIXME: The transformation does not work 'per' message, i.e., it tries to combine any 'from' with any 'to' in $mainOutline.
transformation = "$ALL_MESSAGES.filter(##tags = $mainOutline.##tags)";
defaultColumns = ( "subject", "relativeDate", "tags" );
outlineColumn = "subject";
},
);
toggleMenuTitle = "Correspondence View";
toggleKeyEquivalent = "^~@c";
},
{
viewerType = "MmBoxView";
orientation = "vertical";
children =
(
{
identifier = "headersView";
viewerType = "MmHeadersView";
sources = ( { sourceIdentifier = "correspondenceOutline"; } );
inject = ( "headersFormatting.plist" );
},
{ viewerType = "MmSeparatorView"; showWithViews = ( "headersView" ); },
{
identifier = "tagsEditor";
viewerType = "MmTagsEditor";
sources = ( { sourceIdentifier = "correspondenceOutline"; } );
},
{ viewerType = "MmSeparatorView"; showWithViews = ( "tagsEditor" ); },
{
identifier = "blockingView";
viewerType = "MmImageBlockingView";
sources = ( { sourceIdentifier = "correspondenceOutline"; } );
transformation = "$correspondenceOutline.filter(##blocked-count exists)";
},
{ viewerType = "MmSeparatorView"; showWithViews = ( "blockingView" ); },
{
identifier = "securityView";
viewerType = "MmSecurityView";
sources = ( { sourceIdentifier = "correspondenceOutline"; } );
transformation = "$correspondenceOutline.filter(##security-problem exists)";
},
{ viewerType = "MmSeparatorView"; showWithViews = ( "securityView" ); },
{
identifier = "messageView";
viewerType = "MmWebView";
sources = ( { sourceIdentifier = "correspondenceOutline"; } );
minWidth = 175;
minHeight = 50;
},
);
}
);
toggleMenuTitle = "Message View";
toggleKeyEquivalent = "^~@h";
},
// {
// identifier = "messageEditor";
// viewerType = "MmMessageTextView";
// sources = ( { sourceIdentifier = "correspondenceOutline"; } );
// minimumNumberOfMessages = 1;
// maximumNumberOfMessages = 1;
// match = "$correspondenceOutline.filter(#flags.flag = '\\Draft')"; // Only match drafts
// },
);
},
);
};
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment