peterklingelhofer / exhale

A customizable visual prompt tool in the form of a screen overlay to facilitate breathwork practice

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

exhale

Introduction

Research indicates we blink less and breathe more shallowly when we are looking at screens. This app is intended as a friendly indicator and reminder to continue to take full and deep breaths.

Each of these implementations allows users to set an inhale, inhale hold, exhale, and exhale hold duration, in seconds, to fit their needs. For beginners who might be curious what a good starting value might be for these, I recommend keeping it simple, using 4 for the in duration and 4 for the out duration. Eventually you can work your way up to 6 and 8, and set the out duration to be twice that of the in duration to facilitate activation of the parasympathetic nervous system. Some users might like to start out with box breathing, which is inhale 4, inhale hold 4, exhale 4, exhale hold 4. Remember, if intense feelings arise while practicing, taking a break is encouraged - it's important to not overdo it.

Disclaimer

The information and guidance provided by this breathing app are intended for general informational purposes only and should not be construed as medical advice, diagnosis, or treatment. The creator of this app is not a medical professional, and the app is not a substitute for professional medical advice or consultation with a qualified healthcare provider. Always seek the advice of a physician or other qualified healthcare provider with any questions you may have regarding a medical condition or health objectives. Do not disregard or delay seeking professional medical advice because of the information or suggestions provided by this app. In the event of a medical emergency, call your doctor or dial your local emergency number immediately. Use of this app is at your own risk, and the creator assumes no responsibility for any adverse effects or consequences resulting from its use.

Swift App Usage

circle-swift rectangle-swift settings-swift

Note: This is the macOS implementation.

git clone https://github.com/peterklingelhofer/exhale.git
cd exhale
cd swift
xed .

TypeScript / Electron Usage

exhaleElectron exhaleElectronCircular

Note: This is the Linux and Windows implementation. macOS will build but it is not very performant and is far more CPU-intensive than the native Swift build.

git clone https://github.com/peterklingelhofer/exhale.git
cd exhale
cd typescript
yarn
yarn start

To recompile automatically and use electron-reload, run in a separate terminal:

yarn run watch

Modify settings by going to Application (found in the top right via >>) > Local Storage. While the Developer Tools are open, you can resize the window, and opacity values are ignored, so you can position the window and change settings to your liking, and then close the Dev Tools window by clicking the x in the top right, or use F12 (Linux/Windows) or Cmd + Shift + I (macOS) to toggle Developer Tools to access and modify these settings, and Ctrl + R (Linux/Windows) or Cmd + R (macOS) to refresh the app to use your newly selected settings. If no settings appear on the first run of the application, you can manually add them), following the format of the storedValues variable in /src/renderer.ts. To add them manually, go to the Console and copy paste the following code into the console and press Enter or Return to populate your localStorage (these are the defaults as of the time of writing):

localStorage = {
  colorExhale = "rgb(0, 0, 255)",
  colorInhale = "rgb(255, 0, 0)",
  colorStyle = "linear", // can be "linear" or "constant"
  shape = "fullscreen", // can be "circle" or "rectangle" or "fullscreen"
  durationInhale = 5,
  durationIn2Out = 0,
  durationExhale = 10,
  durationOut2In = 0,
  opacity = 0.25,
}

Once added, you can modify all values from the Local Storage pane. Or, if you prefer the terminal, in the Console you can write localStorage.opacity = "0.15" for example.

Screen Shot 2023-03-11 at 2 12 30 PM

Python Script Usage

exhalePython

Note: This implementation seems to work well on Windows and macOS, but not Linux for some reason.

git clone https://github.com/peterklingelhofer/exhale.git
cd exhale
cd python
python main.py

Modify variables at the top of the file for preferred in and out duration, in seconds.

For the full-screen resizable version, use, IS_FULL_SCREEN = True which makes the window entirely resizable by clicking and dragging from the corners.

About

A customizable visual prompt tool in the form of a screen overlay to facilitate breathwork practice

License:MIT License


Languages

Language:Swift 80.6%Language:TypeScript 12.6%Language:Python 5.9%Language:HTML 0.8%Language:CSS 0.1%