breathe
is a command line utility that contains breathing exercises
Installation is optional, because we can use the dockerized version, as explained later.
However, if you want to install it and run it fully on your own, you'll need the Rust environment, because breathe
is written in Rust.
To build and install breate
, you have to:
$ git clone [email protected]:pizzamig/breathe.git
$ cd breathe
$ cargo install --path .
$ cp resources/tests/config.toml $HOME/.config/breathe.toml
breathe
will be installed in the $HOME/.cargo/bin
folder.
Optionally, you can customize the configuration file $HOME/.config.breathe.toml
.
A dockerized version of breathe
is available on Dockerhub.
You can setup an alias in your shell, for convenience:
$ alias breathe="docker run -it --rm --net=host pizzamig/breathe:0.2.0"
$ breathe -l
The configuration file uses the TOML format and specifies the breathing patterns:
[patterns]
[patterns.relax]
description = "This breathing exercise is a natural tranquilizer for the nervous system. The 8 configuration pattern is not suggested for beginners."
breath_in = 4
breath_out = 8
hold_in = 7
counter_type = "Iteration"
duration = 8
Mandatory fields are:
description
: a string with a description of the patternbreath_in
: length (in seconds) of the inhale phasebreath_out
: length (in seconds) of the exhale phase
Other fields:
hold_in
: length (in seconds) of the break inhale and exhale [default value: 0]hold_out
: length (in seconds) of the break after exhale [default value: 0]
A pattern is usually repeated multiple times, forming a session. A session can be time based, i.e. 5 minutes, or iteration based, i.e. repeat 8 times.
A time based session can be configured in this way (duration in seconds):
counter_type="Time"
duration = 300
An iteration based session can be configured in this way:
counter_type="Iteration"
duration = 8
Where duration
is the number of iterations in a session.