Count the number of Safari tabs
- ID
- 2142
- Status
- summarized
- Published
- 30 Jun 2026, 2:36 AM
- Fetched
- 30 Jun 2026, 3:01 AM
- Provider
- Simon Willison
- Category
- developer-ai
- Original URL
- https://simonwillison.net/2026/Jun/29/safari-tab-count/
- Source URL
- https://simonwillison.net/atom/everything/
Summary
- Score
- 2.5
- Created
- 30 Jun 2026, 3:02 AM
- Tags
- Audience
- developers
What happened
Simon Willison shares a tiny AppleScript one-liner to count open Safari tabs across all windows: `osascript -e 'tell application "Safari" to count tabs of every window'`. It’s a quick terminal command for macOS users.
Why it matters
Demonstrates how simple automation can surface hidden system data. For developers juggling many tabs, it might spark ideas for personal productivity hacks or browser-based tooling.
Discussion angle
How many tabs do you have open right now? Could tab count be a proxy for context-switching overload, and what other tiny scripts could we share to reclaim focus?