Notices


Reply
Thread Tools
Posts: 84 | Thanked: 4 times | Joined on Mar 2010 @ Leeds, UK
#11
whoop! I got it to work!
can i change the sound so i have a different one for the 10 second to the 50 second? the sound wasnt very loud and I kept missing it and not knowing which one it was on! also any way of turning up the sound other than the volume button of course!
 
Posts: 84 | Thanked: 4 times | Joined on Mar 2010 @ Leeds, UK
#12
Is there a way that I can save this script and call on it using a command? where should I store it and in what format? At the moment I've just got it saved as a text file and I copy and paste it we very morning!! there must be a n easier way!!!!
thanks
 
Dousan's Avatar
Posts: 1,161 | Thanked: 1,707 times | Joined on Jan 2010 @ Denmark
#13
I played a little with the script and i'm no dev so there might be an other way to do this

I added a SOUND line after the first called SOUND1:

SOUNDFILE="/usr/share/sounds/game-chess_illegal_move.wav" ; SOUNDFILE1="/usr/share/sounds/ui-general_warning.wav" ; while true ; do aplay $SOUNDFILE; sleep 50; aplay $SOUNDFILE1; sleep 10 ; done

I suppose you could just change directory all together and play sounds from which ever directory you want to or just add the sounds in /usr/share/sounds for the ease of it.

Maybe just call them start.wav/mp3 and pause.wav/mp3 (less rewriting) ...
__________________
My Procreate art:
https://folio.procreate.art/dousan

My Søciety6:
http://society6.com/Dousan

Last edited by Dousan; 2010-09-20 at 12:54.
 
Posts: 75 | Thanked: 125 times | Joined on Nov 2008
#14
if you want to save that shell script to a file for easy running, type this from a terminal:
Code:
cat - > interval.sh
then press enter, then type
Code:
#!/bin/sh
as the first line, then paste the above script in entirity, then press enter for a new line and press CTRL+D to end the file.

Now make it executable:
Code:
chmod u+x interval.sh
and now whenever you want to run it, type:
Code:
./interval.sh
that line starts with a dot and assumes you did all of the above in your home directory, which is the default working directory when you open a terminal.
 
Posts: 84 | Thanked: 4 times | Joined on Mar 2010 @ Leeds, UK
#15
I have a 20 minute workout that includes interval training of varying times. I've typed the commands up in a text file, but when I try and paste the code into xterm it only pastes half of it. Is there a limit to the length of the command line? Can i chunk it into parts? Would it work better if I stored the command? would this mean I can use a longer command?
 
Posts: 84 | Thanked: 4 times | Joined on Mar 2010 @ Leeds, UK
#16
also how do I do a > in terminal?
thanks
 
Reply


 
Forum Jump


All times are GMT. The time now is 22:07.