Focus Mode ProA Pomodoro-based focus system that lives inside VS Code. It puts a quiet timer in your status bar, blocks distracting file types while you're heads-down, tracks your daily streak, and celebrates milestones — without ever leaving the editor. What it does
How it helps developers stay focusedLong-form coding requires uninterrupted blocks of attention. Focus Mode Pro pushes you toward two simple habits:
The streak system layers a lightweight reward loop on top: each completed session is a small, durable win, and you can see the counter climb from any project you open. InstallationOption 1 — Run from source (recommended for development)
Option 2 — Install a packaged
|
| Command | What it does |
|---|---|
Focus Mode: Start |
Begin a focus session. |
Focus Mode: Pause / Resume |
Pause if running, resume if paused. |
Focus Mode: Reset |
Stop and clear the timer back to idle. |
Focus Mode: Show Dashboard |
Open the streak/session dashboard. |
Or interact with the status-bar timer directly:
- Single click → pause / resume
- Double click → reset
Configuration
Add any of these to your VS Code settings.json:
{
// Focus session length, in minutes.
"focus.duration": 25,
// Break length, in minutes.
"focus.breakDuration": 5,
// File extensions that should be blocked from being opened.
// Include the leading dot.
"focus.blockedExtensions": [".md", ".txt", ".pdf"],
// If true, blocked file types are blocked at all times.
// If false (default), they're only blocked during focus sessions.
"focus.blockAlways": false,
// Play a terminal bell sound when a session ends.
"focus.enableSound": true,
// Render a small progress bar in the status-bar timer.
"focus.showProgressBar": true
}
Settings update live — change a value and the next render reflects it.
Run locally (F5)
- Open
focus-mode-pro/in VS Code. - Run
npm installonce. - Press F5. VS Code launches an Extension Development Host window with the extension already activated.
- Use the commands above (or click the timer in the status bar) to try it out.
- If you change source files, run Developer: Reload Window in the dev host to pick them up. (Or use
npm run watchin a terminal so TypeScript recompiles on save.)
Package the extension (vsce package)
vsce is the official VS Code packaging tool. It's already listed as a devDependency.
# from inside focus-mode-pro/
npm install
npm run compile
npx vsce package
This produces focus-mode-pro-1.0.0.vsix. You can hand that file to a teammate or install it locally via Extensions › Install from VSIX….
Publish to the VS Code Marketplace
- Create a publisher. Sign in at https://marketplace.visualstudio.com/manage and create a publisher ID. Set the same value in
package.jsonunder"publisher"(replacingyour-publisher-id). - Get a Personal Access Token (PAT). From https://dev.azure.com/, create a PAT with the Marketplace › Manage scope.
- Log in once locally:
npx vsce login your-publisher-id # paste the PAT when prompted - Publish:
Or to bump the version at the same time:npm run compile npx vsce publishnpx vsce publish patch # or: minor / major / 1.2.3 - The new version appears on the Marketplace within a few minutes.
For the official walkthrough see https://code.visualstudio.com/api/working-with-extensions/publishing-extension.
Project structure
focus-mode-pro/
├── src/
│ ├── extension.ts # activate/deactivate, command registration, dashboard
│ ├── timer.ts # FocusTimer + status-bar rendering + click handling
│ ├── streak.ts # StreakManager + globalState persistence + milestones
│ └── blocker.ts # FileBlocker — closes blocked file types during focus
├── package.json # commands, configuration schema, scripts
├── tsconfig.json
├── .vscodeignore
└── README.md
License
MIT.