Skip to content

profiles.pkl

Profiles bundle accounts and define what the sidebar shows. Switch between profiles with Cmd+1, Cmd+2, etc.

See GUI → Sidebar & Profiles for the runtime view.

Skeleton

import "modulepath:/Profiles.pkl" as P

profiles: Listing<P.ProfileConfig> = new {
  new {
    name = "All"; accounts = new { "*" }; default = true
    folders = P.standardFolders
  }
  new {
    name = "Work"; accounts = new { "work" }; color = "#EF4444"
    folders {
      new { name = "Inbox"; icon = "tray"; query = "tag:inbox AND NOT tag:sent" }
      new { name = "Triage" }                                  // section header
      new { name = "To-Do"; icon = "checklist"; query = "tag:todo" }
      for (f in P.systemFolders) { f }
    }
  }
}

Profile fields

FieldTypeNotes
nameStringShown in profile picker
accountsListing<String>Aliases from config.pkl, or "*" for all
foldersListing<FolderConfig>Sidebar entries
defaultBooleanFirst profile shown on launch
colorString?Hex color tinting the active-profile indicator

Folder fields

FieldTypeNotes
nameStringSidebar label
queryString?Search query (omit for a section header)
iconString?SF Symbol name (e.g. "tray", "checklist")
colorString?Optional folder accent

Folder queries use the same syntax as durian search and the GUI search popup.

Helpers

Profiles.pkl provides:

  • P.standardFolders — Inbox / Sent / Drafts / Archive / Spam / Trash starter set.
  • P.systemFolders — Spam / Trash only (handy for splicing into custom layouts).
folders {
  new { name = "Custom Inbox"; query = "tag:inbox AND NOT tag:newsletter" }
  // ... your custom entries ...
  for (f in P.systemFolders) { f }
}

Smart views

Anything you can write as a query is fair game:

new { name = "Unread VIPs"; icon = "star"; query = "group:vip AND tag:unread" }
new { name = "Has invoice"; icon = "doc"; query = "subject:invoice has:attachment:pdf" }
new { name = "This week"; icon = "calendar"; query = "date:1w.." }

Groups (group:vip) come from groups.pkl.

Validate

durian validate profiles