Skip to main content

Atmospheric desktop breathing trainer inspired by the Wim Hof method.

Project description

logo Wim Hof Breathing Trainer

Atmospheric desktop breathing trainer inspired by the Wim Hof breathing method and other structured breathing techniques.

Built with Python, PySide6, and YAML-driven session configuration.

The application focuses on smooth pacing, minimal UI distractions, and configurable breathing protocols.

Features

  • Fullscreen breathing trainer
  • Smooth breathing ring animation
  • YAML-configurable breathing protocols
  • Multiple breathing techniques support
  • Timeline visualization
  • Countdown and cycle-based displays
  • Ambient background image and music
  • Pause / resume support
  • Fade-out completion sequence
  • Config inheritance system
  • Protocol presets support

Supported Breathing Styles

The application is protocol-driven and can describe different breathing techniques entirely through YAML configuration.

Current examples include:

  • Wim Hof style breathing
  • 4-7-8 breathing
  • Box breathing

Design Goals

This project intentionally avoids:

  • excessive UI complexity
  • account systems
  • online services
  • unnecessary gamification

The focus is:

  • calm pacing
  • smooth visual transitions
  • readable structure
  • extensible protocol configuration

Demo

demo-thumbnail.jpg

Big picture: demo/demo.jpg

Video preview:

demo/demo.webm ~ 3.4 Mb

Installation

  • For a quick local run:
git clone --depth 1 git@github.com:dmi3s/wimhof.git
cd wimhof
uv sync
  • For development with full dependency groups (including dev extras):
git clone git@github.com:dmi3s/wimhof.git
cd wimhof
uv sync --all-groups

Run the application:

uv run wimhof

Using Custom Presets

Run with a custom configuration file:

uv run wimhof --config presets/4-7-8.yaml

Short form:

uv run wimhof -c presets/box_breathing.yaml

Configuration System

Breathing protocols are described using YAML timelines. The breathing engine is intentionally data-driven. Protocols are described as timelines rather than hardcoded logic.

Each section may contain:

  • repeated sequences
  • arbitrary phase ordering
  • different display modes
  • animation behaviors
  • inherited configuration

Example:

rounds:
  # ==========================================================
  # PREPARATION
  # ==========================================================

  - section: Preparation
    repeat: 1

    sequence:
      - type: prepare
        behavior: prepare
        duration: 3
        label: "PREPARE"

The configuration system supports partial overrides of inherited sequences:

  • sequence inheritance
  • partial sequence overrides

Example Protocol

Example 4-7-8 breathing sequence:

- section: breathing
  repeat: 8

  sequence:
    - type: inhale
      behavior: expand
      duration: 4
      label: "INHALE"

    - type: hold
      behavior: pulse_small
      duration: 7
      label: "HOLD"

    - type: exhale
      behavior: shrink
      duration: 8
      label: "EXHALE"

- section: breathing
  repeat: 6
  inherit: true

  sequence:
    - type: inhale
      display: "cycles"

    - type: hold
      display: "cycles"

    - type: exhale
      display: "cycles"

Controls

Key Action
M Mute / Unmute
Space Pause / Resume / Restart
ESC Quit application

Project Structure

wimhof/
├──.github/
│   └── workflows/
│       └── ci.yml                  -- GitHub CI workflow
├──.zed/
│   └── tasks.json                  -- Zed tasks (Run, Ruff, Mypy, Audit, Build)
├── demo/
│   ├── demo.thumbnail.jpg
│   ├── demo.jpg
│   └── demo.webm
├── src/
│   └── wimhof/
│       ├── assets/
│       │   ├── app_icon.png
│       │   ├── background.jpg
│       │   ├── music.mp3
│       │   └── sources.md          -- Sources for music, background, icon
│       └── presets/
│           ├── 4-7-8.yaml          -- Preset for 4-7-8 breathing sequence
│           └── box_breathing.yaml  -- Preset for box breathing sequence
│       ├── __init__.py             -- Package marker
│       ├── config.yaml             -- Wim Hof breathing configuration
│       └── main.py                 -- Application code
├── LICENSE
├── pyproject.toml
├── README.md
└── uv.lock

Dependencies

Main dependencies:

requires-python = ">=3.12"
dependencies = [
  "pyside6>=6.11.1",
  "pyyaml>=6.0.3",
]

Future Ideas

Possible future additions:

  • logging
  • Sessions statistics

Icebox:

  • Local analytics database
  • Audio guidance
  • Breathing protocol sharing
  • Mobile version
  • Wearable integration

Safety Notice

This application is intended for relaxation and controlled breathing exercises.

Do not use while:

  • driving
  • swimming
  • operating machinery
  • performing activities requiring full attention

Media Sources

Background image and music are used under free licenses.

Full attribution information is available in src/wimhof/assets/sources.md.

License

MIT License.

© 2026 dmi3s


Developed using Python and PySide6 with assistance from ChatGPT.

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

wimhof-0.1.2.tar.gz (6.1 MB view details)

Uploaded Source

Built Distribution

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

wimhof-0.1.2-py3-none-any.whl (6.1 MB view details)

Uploaded Python 3

File details

Details for the file wimhof-0.1.2.tar.gz.

File metadata

  • Download URL: wimhof-0.1.2.tar.gz
  • Upload date:
  • Size: 6.1 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.11.16 {"installer":{"name":"uv","version":"0.11.16","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"CachyOS Linux","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for wimhof-0.1.2.tar.gz
Algorithm Hash digest
SHA256 928c9016c7aad5eb4a9e00549e6dcf9a3012f38b5f22e57c291f9276775e4c97
MD5 dde94a4e55b3e782b5ce591ea44f7847
BLAKE2b-256 53404c0906fb04bd6bcf286feb0c15fdfc339a01aea4e5536c8b1babba2e9ef6

See more details on using hashes here.

File details

Details for the file wimhof-0.1.2-py3-none-any.whl.

File metadata

  • Download URL: wimhof-0.1.2-py3-none-any.whl
  • Upload date:
  • Size: 6.1 MB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.11.16 {"installer":{"name":"uv","version":"0.11.16","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"CachyOS Linux","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for wimhof-0.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 d5fc1de5bf02850010eb28bf4f2434580e3191e2a1c3fbe9dfe509499973ea9a
MD5 9531f7b149a35fc596d7536d738497b0
BLAKE2b-256 6bb413a39b6c9134318965d39e7d64b4137bee7e9ce0456b6e9a3243dce5e5dd

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