Slow Breathing timer needed

Requests go here. If you fill a request, give it a new thread in the appropriate category and then link to it in the request thread.
Post Reply
Message
Author
gerry
Posts: 986
Joined: Thu 26 Jul 2007, 21:49
Location: England

Slow Breathing timer needed

#1 Post by gerry »

I've dicovered a technique known as "Slow Breathing" for getting your blood pressure down. I could do with a pet which would display an image, could be just a line or circle, which would expand for two seconds and then take four seconds to return to it's original size.

The deluxe version would be adjustable to be slower.

I'm using Puppy 431, or Wary 0.9

Anyone able to help?

gerry

User avatar
linuxsansdisquedur
Posts: 248
Joined: Tue 13 Jan 2009, 21:17
Location: South of France

#2 Post by linuxsansdisquedur »

Just make a gif :!:
le max avec le min

User avatar
technosaurus
Posts: 4853
Joined: Mon 19 May 2008, 01:24
Location: Blue Springs, MO
Contact:

#3 Post by technosaurus »

Code: Select all

#!/bin/sh
POS="\E[$1;$2H"
V=$1;H=$2
shift 2
echo $#
clear
echo -e $POS"|    {$@}    |"
sleep .5
clear
echo -e $POS"|   { $@ }   |"
sleep .5
clear
echo -e $POS"|  {  $@  }  |"
sleep .5
clear
echo -e $POS"| {   $@   } |"
sleep .5
clear
echo -e $POS"|{    $@    }|"
sleep 1
clear
echo -e $POS"| {   $@   } |"
sleep 1
clear
echo -e $POS"|  {  $@  }  |"
sleep 1
clear
echo -e $POS"|   { $@ }   |"
sleep 1
echo $#
$0 $V $H $@
usage:
breath vertical# horizontal# "message"

adjust values and characters to your liking - press Ctrl+C to quit

Edit maybe I should add a function like this to bashbox as a "now processing" display rather than just a rotating line or series of dots (maybe we could even get some funding for puppy this way as part of a psyc study :) )
Check out my [url=https://github.com/technosaurus]github repositories[/url]. I may eventually get around to updating my [url=http://bashismal.blogspot.com]blogspot[/url].

User avatar
Lobster
Official Crustacean
Posts: 15522
Joined: Wed 04 May 2005, 06:06
Location: Paradox Realm
Contact:

Re: Slow Breathing timer needed

#4 Post by Lobster »

gerry wrote:I've discovered a technique known as "Slow Breathing" for getting your blood pressure down. I could do with a pet which would display an image, could be just a line or circle, which would expand for two seconds and then take four seconds to return to it's original size.

The deluxe version would be adjustable to be slower.

I'm using Puppy 431, or Wary 0.9

Anyone able to help?

gerry
great script :)

http://www.wikihow.com/Lower-High-Blood ... with-Music
What you are describing is used in vipassana
and samatha meditation
http://en.wikipedia.org/wiki/Samatha
It is also used in pranayama and yoga nidrah

These same deep breathing patterns are induced when walking
through forests
sitting by the shore
fishing by the river
listening to soothing music
or doing tai chi

m m m . . . just had an idea
hope the above is of interest whilst I find
a solution devoid of religious connotations

this code should work in wary
(create a file called 'breath'
change permissions to executible - right click on file
run by typing ./breath on command line)

Code: Select all

#! /bin/bash
# breath test for Gerry by Lobster

NUM=33 # Change the number of breaths

yaf-splash -bg yellow -fontsize x-large -timeout 3 -text 'Hello'
yaf-splash -bg yellow -fontsize x-large -timeout 3 -text 'Relax and breath slowly' 
yaf-splash -bg yellow -fontsize x-large -timeout 3 -text 'Feel calm'  
yaf-splash -bg yellow -fontsize x-large -timeout 3 -text 'Lengthen breath' 

repetitions=$NUM 
 for g in $(eval echo {$repetitions..1})
  do
    yaf-splash -bg yellow -fontsize x-large -timeout 2 -text 'breath in 1 . . .  2 . . .'
    yaf-splash -bg yellow -fontsize x-large -timeout 4 -text 'breath out 1 . . .  2 . . .  3 . . .  4 . . .' 
  done
Have started a thread to promote technosaurus idea of 'lowering blood pressure'
whilst awaiting events
http://www.murga-linux.com/puppy/viewto ... 835#458835

Puppy Linux
Reduces blood pressure
. . . or your money back
Last edited by Lobster on Sat 16 Oct 2010, 04:26, edited 2 times in total.
Puppy Raspup 8.2Final 8)
Puppy Links Page http://www.smokey01.com/bruceb/puppy.html :D

User avatar
jrb
Posts: 1536
Joined: Tue 11 Dec 2007, 19:56
Location: Smithers, BC, Canada

#5 Post by jrb »

Nice work technosaurus!

I feel more relaxed already. 8)

I packaged it as a pet with entry on the Fun menu.

Edit: There's a pet of Lobster's script on his thread
Attachments
slow_breath.pet
Relaxed computing
(714 Bytes) Downloaded 639 times

gerry
Posts: 986
Joined: Thu 26 Jul 2007, 21:49
Location: England

#6 Post by gerry »

Thanks everyone. Didn't think there would be any interest!

I'm using jrb's pet, although in that form it misses out the user input, and just runs. But it's fine as is.

Just need to sort out a suitable music cd from the pile...

gerry

Post Reply