Skip to main content

Measure your brain's fragmentation tax — context switch tracking for knowledge workers.

Project description

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.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

fragwatch-0.1.0.tar.gz (10.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

fragwatch-0.1.0-py3-none-any.whl (10.0 kB view details)

Uploaded Python 3

File details

Details for the file fragwatch-0.1.0.tar.gz.

File metadata

  • Download URL: fragwatch-0.1.0.tar.gz
  • Upload date:
  • Size: 10.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.4

File hashes

Hashes for fragwatch-0.1.0.tar.gz
Algorithm Hash digest
SHA256 093d536c8663cd3f631bd44086f81c8a942a5ad0100e9b738d413c63f221140c
MD5 85598033a5d89df4d32f7480776dd119
BLAKE2b-256 3a67ebc1137512d1492674f5ec98952a73ed1fce0553f2c52df3fd42b11e06f7

See more details on using hashes here.

File details

Details for the file fragwatch-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: fragwatch-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 10.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.4

File hashes

Hashes for fragwatch-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 d75f5bc6460df861347b7151c58a5911f6663083c53614dd096c15c1643fb405
MD5 9ef84eb96c9d8a74c12e12728e3a35ad
BLAKE2b-256 5f3d15105e3a0f4d583f0926f06dcf9860709a98048f5300185d708660149662

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page