Skip to main content

fracture

Measure your brain's fragmentation tax.

Python 3.10+ MIT License Version 0.1.0


Every time you switch windows, your brain pays a tax. Research shows it takes ~23 minutes to fully regain deep focus after a context switch. Most knowledge workers switch windows 200+ times a day. Nobody tracks the cumulative cost.

fracture is a background daemon that watches your active windows and measures your fragmentation score — the real cost of all those micro-switches you don't notice.

Quick Start

pip install fragwatch
fracture             # start tracking (foreground)
fracture --daemon    # run in background
fracture --dashboard # open the fragmentation dashboard
fracture --status    # show today's stats

How It Works

A lightweight daemon polls your active window title once per second via pygetwindow. Every time the window changes, it classifies the switch by zone and records it to a local SQLite database. No cloud, no telemetry, no accounts.

Zones

Zone Examples Classification
Creation VS Code, terminal, Obsidian, Figma ✅ Productive
Communication Slack, Teams, Discord, Outlook, Zoom ❌ Fragmentation
Consumption Chrome, Twitter, YouTube, Reddit ❌ Fragmentation
Admin Settings, Explorer, Finder, task manager ❌ Fragmentation

The Dashboard

Run fracture --dashboard to see:

  • Total window switches today
  • Minutes lost to context switching
  • Effective work hours (active time minus fragmentation tax)
  • Zone breakdown with visual bars
  • Contextual insights and recommendations

Example Output

fracture — today's fragmentation
  total switches:   214
  productive:       47 (creation)
  lost to switching: 492 min (8.2 h)
  active window:    9.5 h
  effective work:   1.3 h
  breakdown:
    creation: 47
    communication: 89
    consumption: 62
    admin: 16

FAQ

Q: How accurate is the 23-minute number? A: It's based on peer-reviewed research (Mark et al., 2005, UC Irvine). The actual cost varies by person and task, but 23 minutes is the widely cited empirical finding.

Q: Does this send data anywhere? A: No. All data stays in ~/.fracture/events.db. No network requests, no tracking, no accounts.

Q: What platforms are supported? A: Windows, macOS, and Linux. Requires a GUI environment (window title tracking doesn't work over SSH).

Q: Can I reset my data? A: Delete ~/.fracture/events.db to wipe all history.

License

MIT


Your brain is not a browser tab.

Metadata

Release files for fragwatch 0.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for fragwatch 0.1.0
File Size Uploaded Provenance
fragwatch-0.1.0.tar.gz 10.2 kB Without provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for fragwatch 0.1.0
File Interpreter ABI Platform
fragwatch-0.1.0-py3-none-any.whl Python 3 none any Details

Total release size: 20.2 kB

Release files / fragwatch-0.1.0.tar.gz

Download URL fragwatch-0.1.0.tar.gz
Size 10.2 kB
Tags Source
SHA-256 checksum
How to use checksums
093d536c8663cd3f631bd44086f81c8a942a5ad0100e9b738d413c63f221140c
BLAKE2b-256 checksum
How to use checksums
3a67ebc1137512d1492674f5ec98952a73ed1fce0553f2c52df3fd42b11e06f7
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.12.4

Release files / fragwatch-0.1.0-py3-none-any.whl

Download URL fragwatch-0.1.0-py3-none-any.whl
Size 10.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
d75f5bc6460df861347b7151c58a5911f6663083c53614dd096c15c1643fb405
BLAKE2b-256 checksum
How to use checksums
5f3d15105e3a0f4d583f0926f06dcf9860709a98048f5300185d708660149662
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.12.4

Security for fragwatch 0.1.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page