Templates

Nine ready-made spotters. Each file below is exactly what Spotter reads. Copy one into ~/.config/spotter/spotters/ and it joins your bar.

Values in the menu bar come from live sources, so they show as a dash here. Install with Install and setup.

MonitorAny JSON URL, shown as a table. Alerts when it goes offline.

Nothing pinned, so the bar shows the icon only. Alerts when the source is offline for 1 minute.

See the file
monitor.json
{
  "name": "Monitor",
  "icon": "chart",
  "sources": {
    "data": {
      "url": "https://www.githubstatus.com/api/v2/summary.json"
    }
  },
  "bar": {
    "blocks": []
  },
  "alerts": [
    {
      "offline": true,
      "for": "1m",
      "say": "{name} is offline"
    }
  ],
  "blocks": [
    {
      "id": "components",
      "type": "table",
      "title": "Components",
      "rows": "components",
      "columns": [
        {
          "label": "Id",
          "value": "id"
        },
        {
          "label": "Name",
          "value": "name"
        },
        {
          "label": "Status",
          "value": "status"
        }
      ]
    }
  ]
}
GitHub statusGitHub's public status page, read as JSON: the components that are not operational. —

Pins the count of components with issues. The status word comes from the page.

See the file
status.json
{
  "name": "GitHub status",
  "icon": "globe",
  "link": "https://www.githubstatus.com",
  "sources": {
    "gh": {
      "url": "https://www.githubstatus.com/api/v2/summary.json",
      "every": "1m"
    }
  },
  "status": {
    "word": "status.description",
    "tone": "status.indicator"
  },
  "bar": {
    "blocks": [
      "issues"
    ]
  },
  "blocks": [
    {
      "id": "issues",
      "type": "value",
      "title": "Components with issues",
      "value": "= d.components.filter(c => c.status != 'operational').length"
    },
    {
      "id": "components",
      "type": "table",
      "title": "Components",
      "rows": "= d.components.filter(c => !c.name.startsWith('Visit'))",
      "columns": [
        {
          "label": "Component",
          "value": "name"
        },
        {
          "label": "Status",
          "value": "status",
          "fmt": "badge",
          "align": "right"
        }
      ]
    }
  ]
}
Claude CodeClaude Code sessions: how many are working, and a call when one needs you. —

Pins the working count. Calls when a session needs you.

See the file
claude.json
{
  "name": "Claude Code",
  "icon": "agent",
  "sources": {
    "cc": {
      "url": "demo://claude-code",
      "every": "1s"
    }
  },
  "subtitle": "= d.sessions.length + ' sessions · ' + d.sessions.filter(s => s.status == 'needs_you').length + ' needs you'",
  "bar": {
    "blocks": [
      "working"
    ],
    "alert": "= d.sessions.some(s => s.status == 'needs_you')"
  },
  "alerts": [
    {
      "when": "= d.sessions.filter(s => s.status == 'needs_you').map(s => s.project).join(', ')",
      "changes": true,
      "tone": "warn",
      "say": "{value} needs you"
    }
  ],
  "blocks": [
    {
      "id": "sessions",
      "type": "sessions",
      "rows": "sessions"
    },
    {
      "id": "working",
      "type": "value",
      "title": "Working now",
      "value": "= d.sessions.filter(s => s.status == 'working').length"
    },
    {
      "id": "events",
      "type": "log",
      "title": "Events",
      "value": "events",
      "last": 5
    }
  ]
}
AgentsCoding-agent sessions read from ~/.config/spotter/agents, with a banner when one needs you. —

Badge: sessions that need you. Banner when one does.

See the file
agents.json
{
  "name": "Agents",
  "icon": "agent",
  "sources": {
    "agents": {
      "url": "file://~/.config/spotter/agents",
      "every": "1s"
    }
  },
  "subtitle": "= d.filter(s => s.status === 'working').length + ' working · ' + d.length + ' sessions'",
  "status": {
    "word": "= d.some(s => s.status === 'needs_you') ? 'needs_you' : d.some(s => s.status === 'working') ? 'working' : 'idle'"
  },
  "bar": {
    "badge": "= d.filter(s => s.status === 'needs_you').length"
  },
  "blocks": [
    {
      "id": "sessions",
      "type": "table",
      "title": "Sessions",
      "rows": "= d.slice().sort((a, b) => b.last - a.last)",
      "columns": [
        {
          "label": "Agent",
          "value": "agent"
        },
        {
          "label": "Project",
          "value": "project"
        },
        {
          "label": "Status",
          "value": "status",
          "fmt": "badge"
        },
        {
          "label": "Doing",
          "value": "= r.status === 'needs_you' ? r.ask + ': ' + r.cmd : r.action"
        }
      ]
    }
  ],
  "alerts": [
    {
      "when": "= d.filter(s => s.status === 'needs_you').map(s => s.project).join(', ')",
      "changes": true,
      "say": "Needs you: {value}",
      "show": "banner"
    }
  ]
}
JobsBackground jobs started with spotter run, with a banner when one fails or is lost. —

Badge: running jobs. Banner when one fails or is lost.

See the file
jobs.json
{
  "name": "Jobs",
  "icon": "bolt",
  "sources": {
    "jobs": {
      "url": "file://~/.config/spotter/jobs",
      "every": "2s"
    }
  },
  "subtitle": "= d.filter(j => (['running', 'starting'].includes(j.status) && !(Date.now() / 1000 - j.seen <= 15) ? 'lost' : j.status) === 'running').length + ' running'",
  "status": {
    "word": "= d.some(j => ['failed', 'lost'].includes((['running', 'starting'].includes(j.status) && !(Date.now() / 1000 - j.seen <= 15) ? 'lost' : j.status))) ? 'failed' : d.some(j => (['running', 'starting'].includes(j.status) && !(Date.now() / 1000 - j.seen <= 15) ? 'lost' : j.status) === 'running') ? 'running' : 'idle'"
  },
  "bar": {
    "badge": "= d.filter(j => (['running', 'starting'].includes(j.status) && !(Date.now() / 1000 - j.seen <= 15) ? 'lost' : j.status) === 'running').length"
  },
  "blocks": [
    {
      "id": "jobs",
      "type": "table",
      "title": "Background jobs",
      "rows": "= d.slice().reverse()",
      "columns": [
        {
          "label": "Job",
          "value": "name"
        },
        {
          "label": "Status",
          "value": "= ['running', 'starting'].includes(r.status) && !(Date.now() / 1000 - r.seen <= 15) ? 'lost' : r.status",
          "fmt": "badge"
        },
        {
          "label": "Last line",
          "value": "tail[-1]"
        }
      ]
    }
  ],
  "alerts": [
    {
      "when": "= d.filter(j => ['failed', 'lost'].includes((['running', 'starting'].includes(j.status) && !(Date.now() / 1000 - j.seen <= 15) ? 'lost' : j.status))).map(j => j.name).join(', ')",
      "changes": true,
      "say": "Stopped working: {value}",
      "show": "banner"
    }
  ]
}
WhatsAppUnread WhatsApp chats and their previews. Mac app only. —

Badge: unread chats.

See the file
whatsapp.json
{
  "name": "WhatsApp",
  "icon": "chat",
  "link": "https://web.whatsapp.com",
  "sources": {
    "wa": {
      "url": "demo://whatsapp",
      "every": "1s"
    }
  },
  "subtitle": "= ({not_linked: 'Not linked yet', logged_out: 'Logged out'})[d.state] || d.unread + ' unread chats · linked device'",
  "status": {
    "word": "= ({linked: d.unread ? d.unread + ' unread' : 'No new', no_previews: d.unread + ' unread', not_linked: 'Not linked', logged_out: 'Logged out'})[d.state]",
    "tone": "= ({linked: 'run', no_previews: 'run', not_linked: 'idle', logged_out: 'bad'})[d.state]"
  },
  "bar": {
    "blocks": [],
    "badge": "unread"
  },
  "alerts": [
    {
      "when": "last_from",
      "changes": true,
      "say": "{value}"
    }
  ],
  "blocks": [
    {
      "id": "chats",
      "type": "webapp",
      "title": "Since you last looked",
      "app": "whatsapp",
      "url": "https://web.whatsapp.com"
    }
  ]
}
PagesA web page and a set of links you open often. Pages

Nothing pinned and no icon, so the bar shows the name.

See the file
pages.json
{
  "name": "Pages",
  "icon": "link",
  "look": {
    "theme": "paper"
  },
  "bar": {
    "blocks": [],
    "icon": "none"
  },
  "blocks": [
    {
      "id": "page",
      "type": "page",
      "title": "Page",
      "url": "https://en.wikipedia.org/wiki/Menu_bar",
      "height": 300
    },
    {
      "id": "links",
      "type": "links",
      "title": "Links",
      "items": [
        {
          "label": "Resume (put your link here)",
          "url": "https://example.com"
        },
        {
          "label": "GitHub",
          "url": "https://github.com"
        }
      ]
    }
  ]
}
My websiteOne element of a web page, kept as a clip.

Nothing pinned, so the bar shows the icon only.

See the file
my-site.json
{
  "name": "My website",
  "icon": "crop",
  "bar": {
    "blocks": []
  },
  "blocks": [
    {
      "id": "clip",
      "type": "clip",
      "title": "Clip",
      "page": "https://example.com",
      "selector": "body > p:nth-of-type(1)",
      "width": 1312
    }
  ]
}
FocusA focus timer: 25 minutes of focus, 5 of break, no data source. 25:00

Pins the timer, starting at 25:00.

See the file
focus.json
{
  "name": "Focus",
  "icon": "timer",
  "bar": {
    "blocks": [
      "timer"
    ]
  },
  "blocks": [
    {
      "id": "timer",
      "type": "timer",
      "title": "Focus",
      "focus": "25m",
      "break": "5m",
      "goal": 6
    }
  ],
  "hotkey": "option+shift+f"
}