#! /bin/csh # BreathingReminder - Version 0.1 # (c) Copyright 2006 - Laurent Facq - facq@u-bordeaux.fr - 17/03/2006 # BreathingReminder is licensed under the terms of the General Public License # (GPL), version 2. For information on this license look at the source # code that came with the software or see the GNU project page at # http://www.gnu.org/. # $Id: BreathingReminder-0.1,v 1.3 2006/03/19 06:34:34 facq Exp facq $ # Intro : when spending hours on a computer, beacause of heavy # concentration, breathing is often reduced, bad body position are # took, dehydratation can occur, and so on, ending in an excessive and # unnecessary tiredness. # BreathingReminderer is a *very* simple script to remind you, when spending # long time on a computer, just to take care of you so that you can # spend even more hacking hours :) # How it works : It just popup an (friendly) image at regular interval # (default 2 min) and remove this popup after some small delay # (default 1 sec). Each time the popup appear, take a deep breath, # try to feel happy, smile, check your body position and correct it if # needed, also check if you need to drink (some water!) to rehidrate # yourself and so on... It works like a beneficial subliminal # message. # BreathingReminder is more a concept than a program. # This firt implementation rely on the xteddy et timeout tools. # Debian : # apt-get install xteddy timeout # Suggestions : # launch it automaticaly at session startup # for gnome, go here : applications/desktop/advanced/session/startup programs/add # or put it in you .xinitrc or .xstartuprc # Customize the popup picture picture to show something that make you # happy and relax : photographs of you child, wife, girl/boy friend, # natural things (stars, sun, trees, sea, moon...) # TODO randomize geometry position # TODO found other simple popup like xteddy # TODO cycle or randomly choose between several pictures # TODO? standalone implementation from scratch or by modifying xteddy ############### Tuning ############################################################### set secinterval = 120 # 20 minutes set duration = 1 # how long to show the picture set run = 'xteddy' # program to run # fullnames list of image to display (empty = teddy) #set images = ( /home/facq/Perso/Images/ad.gif /home/facq/Perso/Images/mama.gif /home/facq/Perso/Images/romain.gif ) set images = ( ) set x = 300 # X position (pixel) set y = 300 # Y position (pixel) ###################################################################################### # debug #set secinterval = 1 # 20 minutes ################# if ( ! $#images ) then set images = ( teddy ) endif while ( 1 ) set image = $images[1] shift images set images = ( $images $image ) if ("a$image" != "a") then set image = "-F$image" endif # echo "loading $image" timeout $duration $run -geometry +300+300 $image >& /dev/null sleep $secinterval end