


 tm(l)								       tm(l)




 NAME
      tm - "typemon" monitor keyboard and mouse activity  and  suggest	rest
      breaks.

 SYNOPSIS
      tm [ -bprtmvo ] [ keyboard_dev_path ] [ mouse_dev_path ]

 DESCRIPTION
      This X11-based program attempts to  reduce  repetitive  stress  injury
      (RSI)  by  monitoring  mouse and keyboard activity to suggest periodic
      rest breaks. If the consecutive time of typing or mousing exceeds  the
      user-defined  limits,  then a warning window pops up advising the user
      to take a rest break.  The window remains  until	there  has  been  no
      typing  or  mousing  for	the  user-defined  rest  time.	 A  log file
      ~/.typelog keeps track of the  total  cumulative	typing	and  mousing
      times  for  each day. This data can be plotted in histogram form using
      the script typehisto.

      The main status window contains two bargraphs to	allow  the  user  to
      plan his rest breaks.  The upper bargraph shows the percentage of time
      spent in the current working period.  The  lower	bargraph  shows  the
      current  amount  of pause time.  When the pause time bar graph reaches
      100% of the rest time, the upper bargraph  is  zeroed.   This  feature
      allows  the  user  to  plan "pre-emptive" rest breaks to coincide with
      natural pauses in work activity.

      A new feature in this version of tm is a "stop" button  in  the  upper
      right  corner  of  the  tm status window.  This button allows tm to be
      temporarily stopped to avoid annoying a visitor.	When tm is  stopped,
      the  normally  blue  bar-graph  is  displayed  as red.  An option menu
      allows the user to reset the activity timer, display the status of all
      command line options, and show the current version number.

      -r  rest_time
	   This specifies the resting period, in seconds, that	is  required
	   to  clear  the  warning window once the maximum typing or mousing
	   times have been exceeded.

      -t  maximum_typing_time
	   This is the maximum consecutive typing time allowed (in seconds).
	   If this parameter is not specified, but the	maximum_mousing_time
	   is, then the  maximum_typing_time   will  be  set  equal  to  the
	   maximum_mousing_time.   If neither parameter is set, then default
	   values will be  used  for  both.   The  typing  timer  increments
	   whenever one is typing. If typing stops for more than pause_time,
	   the timer stops counting. If typing does not resume in  rest_time
	   the	typing	timer  is reset to zero.  Whenever the timer reaches
	   maximum_typing_time,  the  warning  window  is  activated.	 The
	   warning  window  remains active until there has been no typing or
	   mousing activity for rest_time. Once inactivity has remained  for
	   rest_time,  the  window  is	cleared  and  the typing and mousing



				    - 1 -	Formatted:  December 5, 1995






 tm(l)								       tm(l)




	   timers are reset to zero.

      -m  maximum_mousing_time
	   This  is  the  maximum  consecutive	mousing  time  allowed	 (in
	   seconds).	If   this   parameter  is  not	specified,  but  the
	   maximum_typing_time is, then the  maximum_mousing_time   will  be
	   set	equal  to  the maximum_typing_time.  If neither parameter is
	   set, then default values will be  used  for	both.	The  mousing
	   timer  increments  whenever	one is mousing. If mousing stops for
	   more than pause_time, the timer stops counting. If  mousing	does
	   not	resume	in  rest_time  the  mousing  timer is reset to zero.
	   Whenever the  timer	reaches  maximum_mousing_time,	the  warning
	   window  is  activated.   The  warning window remains active until
	   there has been no mousing or typing activity for rest_time.	Once
	   inactivity  has remained for rest_time, the window is cleared and
	   the typing and mousing timers are reset to zero.

      If both typing and mousing are occurring simultaneously, the  internal
      timers  are incremented by an amount equal to the weighted averages of
      maximum_typing_time and maximum_mousing_time. The warning will then be
      issued   at   an	 interval  of  time  that  falls  somewhere  between
      maximum_typing_time and maximum_mousing_time.

      -p  pause_time
	   This time (in seconds) determines how long of a pause  will	stop
	   the mouse and keyboard activity timers from running.

      -b   This option runs tm in  the	background  without  generating  the
	   normal status window.

      -v  verbose logfile.
	   This option writes updated information to the logfile  each	time
	   the	keyboard or mouse change from active to passive states. This
	   option will cause  the  logfile  to	grow  very  quickly  and  is
	   normally only used for debugging.

      -o  obnoxiousness_level
	   This option specifies how obnoxiously the  program  will  try  to
	   persuade  you  to rest.  A default setting of "0" will pop up the
	   "Take a break" window in the middle of the screen only  once  and
	   will  silently truncate the "Continue Resting" bar graph for rest
	   violations.	Settings of "1"  and  above  will  not	destroy  the
	   "warn"  window when the "reset timer" button is selected from the
	   "Options" menu, making it harder to "cheat" on the  rest  period.
	   A  setting  of  "1"	issues an audible beep everytime you violate
	   your rest period.  A setting of "2" will both beep  and  recenter
	   the	window	for every violation.  Level "3" is the same as level
	   "2", but also grabs the keyboard  and  mouse  focus,  essentially
	   taking  over  the  user interface until the timer expires.  Level
	   "3" is guaranteed to stop the most flagrant violator!




				    - 2 -	Formatted:  December 5, 1995






 tm(l)								       tm(l)




      keyboard_dev_path, mouse_dev_path
	   As currently written, the program assumes it  is  running  on  an
	   HP-UX  system,  and	it scans the /dev/hil[1-7] files to find out
	   which devices are busy (ie., already opened by  X11).   The	last
	   busy device is assumed to belong to the mouse, and the next lower
	   busy device is assumed to be the keyboard.  These  arguments  can
	   be  used  to override the program's choice of device files.	They
	   should only be needed for unusual system configurations.  A	good
	   way	to  figure out which device files to use is to run "ls -lrtu
	   /dev/hil*".	This gives a verbose  listing  of  the	/dev  files,
	   reverse  sorted  by	their last access time. Usually the last two
	   entries in the listing  will  correspond  to  your  keyboard  and
	   mouse.   X11 hackers may wish to modify the routine get_dev_files
	   in the tm script to autoconfigure properly for non HP-UX systems.

 EXAMPLES
      To specify a maximum 10-minute typing time and 15-minute mousing time,
      with a 2-minute rest time and a 10-second pause threshold:
	  "tm -t 600 -m 900 -r 120 -p 10"

 SEE ALSO
      A good reference book on this subject is Emil Pascarelli	and  Deborah
      Quilter,	"Repetitive  Strain  Injury, A Computer User's Guide", 1994,
      John Wiley and Sons, ISBN 0-471-59533-0.

 FILES
      The   default   logfile	is   ~/.typelog.     The    executable	  is
      /usr/local/bin/tm.   Tm  is built with the tcl/tk window shell package
      by John Ousterhout (See usenet group  comp.lang.tcl  for	details,  or
      check   out  "http://web.cs.ualberta.ca/~wade/Auto/Tcl.html"  for  the
      latest release). As distributed, tm is written  for  the	tcl3.6/tk4.0
      wish interpreter.

 AUTHORS
      Rick    Walker	(walker@opus.hpl.hp.com),     and     Tom     Knotts
      (knotts@opus.hpl.hp.com).   This	program  was  inspired	by,  and  is
      similar	to   the    script    'typewatch'    by    Richard    Donkin
      (richardd@hoskyns.co.uk).   It  was  completely  re-written  in  C  to
      enhance performance and monitor  of  mouse  activity,  and  later  re-
      written in tcl/tk to improve the user interface.

 BUGS
      Use this program at your own risk. No liability  is  assumed  for  the
      results  of  using  this	program.  The  proper  values of working and
      resting times should be selected by you according  to  the  advice  of
      your doctor.








				    - 3 -	Formatted:  December 5, 1995



