Puppy Linux Discussion Forum Forum Index Puppy Linux Discussion Forum
Puppy HOME page : puppylinux.com
"THE" alternative forum : puppylinux.info
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

The time now is Sun 23 Nov 2014, 12:15
All times are UTC - 4
 Forum index » Advanced Topics » Additional Software (PETs, n' stuff) » REQUESTS
Slow Breathing timer needed
Post new topic   Reply to topic View previous topic :: View next topic
Page 1 of 1 [6 Posts]  
Author Message
gerry

Joined: 26 Jul 2007
Posts: 946
Location: England

PostPosted: Fri 15 Oct 2010, 15:25    Post subject:  Slow Breathing timer needed  

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
Back to top
View user's profile Send private message 
linuxsansdisquedur


Joined: 13 Jan 2009
Posts: 250
Location: South of France

PostPosted: Fri 15 Oct 2010, 16:33    Post subject:  

Just make a gif Exclamation
_________________
le max avec le min
Back to top
View user's profile Send private message 
technosaurus


Joined: 18 May 2008
Posts: 4376

PostPosted: Fri 15 Oct 2010, 19:20    Post subject:  

Code:
#!/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 Smile )

_________________
Web Programming - Pet Packaging 100 & 101
Back to top
View user's profile Send private message 
Lobster
Official Crustacean


Joined: 04 May 2005
Posts: 15117
Location: Paradox Realm

PostPosted: Fri 15 Oct 2010, 23:33    Post subject: Re: Slow Breathing timer needed  

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 Smile

http://www.wikihow.com/Lower-High-Blood-Pressure-Using-Slow-Breathing-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:
#! /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/viewtopic.php?p=458835#458835

Puppy Linux
Reduces blood pressure
. . . or your money back

_________________
Puppy WIKI

Last edited by Lobster on Sat 16 Oct 2010, 00:26; edited 2 times in total
Back to top
View user's profile Send private message Visit poster's website 
jrb


Joined: 11 Dec 2007
Posts: 1040
Location: Smithers, BC, Canada

PostPosted: Fri 15 Oct 2010, 23:56    Post subject:  

Nice work technosaurus!

I feel more relaxed already. Cool

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

Edit: There's a pet of Lobster's script on his thread
slow_breath.pet
Description  Relaxed computing
pet

 Download 
Filename  slow_breath.pet 
Filesize  714 Bytes 
Downloaded  283 Time(s) 
Back to top
View user's profile Send private message 
gerry

Joined: 26 Jul 2007
Posts: 946
Location: England

PostPosted: Sat 16 Oct 2010, 12:21    Post subject:  

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
Back to top
View user's profile Send private message 
Display posts from previous:   Sort by:   
Page 1 of 1 [6 Posts]  
Post new topic   Reply to topic View previous topic :: View next topic
 Forum index » Advanced Topics » Additional Software (PETs, n' stuff) » REQUESTS
Jump to:  

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB © 2001, 2005 phpBB Group
[ Time: 0.0584s ][ Queries: 12 (0.0040s) ][ GZIP on ]