Use
Projects and tabs
Tell Lean where your work lives, and it sorts the tabs for you.
Projects
A project is a named group in the sidebar with a colour and a list of rules. A rule is a piece
of text that is looked for in a tab's address. The first rule that matches decides the group.
Projects are edited in config.json (Cmd+Opt+, opens it; gr reloads it).
"projects": [
{
"name": "shop",
"color": "#fe8019",
"rules": [
{ "pattern": "git.example.com/shop" },
{ "pattern": "shop.example.com" },
{ "pattern": "localhost:5173", "label": "vite" },
{ "pattern": "grafana.example.com/d/shop",
"url": "https://grafana.example.com/d/shop" }
]
}
]
| Field | Does |
|---|---|
pattern | text tested against the address; no wildcards, a plain piece of it |
label | a fixed name in the sidebar instead of the page title. Useful for localhost ports. |
url | makes the rule a quick-launch entry in the palette. One address, or a list for one entry each. |
A tab that matches no rule stays in the general group. Dragging a tab onto another group moves it there for good, whatever its address; dragging it back undoes that.
Test, production, localhost
An environment is a kind of system. The first one whose pattern is found in a tab's host name marks the tab with a coloured tag: in the sidebar, in the tab search and in front of the address in the status line.
| Default | Matches |
|---|---|
TEST | test. -test staging stage. dev. -dev demo acceptance sandbox |
PROD | nothing yet; add your production host names |
LOCAL | localhost 127.0.0.1, shown as ⌂ |
"environments": [
{ "name": "PROD", "color": "#fb4934", "patterns": ["shop.example.com"] },
{ "name": "TEST", "color": "#fabd2f", "patterns": ["test.", "staging"] },
{ "name": "LOCAL", "color": "#b8bb26", "patterns": ["localhost"], "symbol": "⌂" }
]
symbol shows one character in place of the tag in the sidebar and the tab search.
axis lets a tab carry more than one mark: marks on the same axis exclude each other,
and the default axis is where. Give a platform mark the axis what and a
tab can be both TEST and that platform.
Jira issues
Set jiraHost to your Jira host name. Issue tabs on it then show the status name in
the status colour in the sidebar and in the tab search.
| Setting | Does |
|---|---|
jiraHost | the host, such as example.atlassian.net. Empty by default. |
groupIssuesByProject | issue tabs go into the group named like their key: WEB-214 into WEB. A group is created if no project has that name. Default on. |
jiraStatusWhenSuspended | a sleeping issue tab keeps the status from when it was last loaded. Default on. |
Sleeping tabs
Lean keeps the tabs you used last awake and puts the others to sleep. A sleeping tab uses almost no memory and reloads when you select it; its scroll position and history come back. Tabs that are on screen never sleep.
| Setting | Does |
|---|---|
liveTabs | how many tabs stay awake. Default 8. |
autoSuspendMinutes | also puts tabs to sleep that were not shown for this long. 0 is off. |
Order inside a group
With clusterTabs on (the default), tabs of one kind are listed together inside a
group: Jira issues, and tabs with the same rule label or host. << and >> move a tab
up and down. za folds the current group, zM all, zR none.