From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 9870 invoked from network); 15 Dec 1998 23:54:59 -0000 Received: from math.gatech.edu (list@130.207.146.50) by ns1.primenet.com.au with SMTP; 15 Dec 1998 23:54:59 -0000 Received: (from list@localhost) by math.gatech.edu (8.9.1/8.9.1) id SAA24054; Tue, 15 Dec 1998 18:54:22 -0500 (EST) Resent-Date: Tue, 15 Dec 1998 18:54:13 -0500 (EST) Message-ID: <19981215235912.25281@athenaeum.demon.co.uk> Date: Tue, 15 Dec 1998 23:59:12 +0000 From: Phil Pennock To: zsh-users@math.gatech.edu Subject: Re: Tracking idletimes Mail-Followup-To: zsh-users@math.gatech.edu References: Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Mailer: Mutt 0.89.1 In-Reply-To: ; from "Gossamer" on Tue 15 Dec 1998 (23:27 +0000) Organisation: Organisation? Here? No, over there ----> X-Disclaimer: Any views expressed in this message, where not explicitly attributed otherwise, are mine and mine alone. Such views do not necessarily coincide with those of any organisation or company with which I am or have been affiliated. X-Phase-of-Moon: The Moon is Waning Crescent (9% of Full) Resent-Message-ID: <"QgmG22.0.It5.bQlTs"@math> Resent-From: zsh-users@math.gatech.edu X-Mailing-List: archive/latest/1990 X-Loop: zsh-users@math.gatech.edu X-Loop: zsh-workers@math.gatech.edu Precedence: list Resent-Sender: zsh-workers-request@math.gatech.edu Typing away merrily, Gossamer produced the immortal words: > I want to put together a daemon to track idletime, the sort of thing > that tells you to get up and stretch every half hour of worktime. Make it sleep half an hour at a time then. while : do sleep $[60*30] do_whatever done > Trouble is, there's no way I can figure out to track "Last keypress in > any virtual terminal" (I don't and can't use X) and finger is reporting > invalid idletimes :(. Not sure if there is a portable way to do that. But your stated problem doesn't require it. If you want to restrict it to worktime, then wrap vlock with a shell-function which does, eg: function lockterm { killall -USR1 my_idle_daemon_name vlock -a killall -USR2 my_idle_daemon_name } and then adjust your daemon to handle the signals. > If I run a shellscript that calls other programs, the idletime for > that VT gets reset every time the secondary program is activated. It > also seems to like to report Mutt as un-idle even when it is. What are you using to try and get 'idle time'? -- --> Phil Pennock ; GAT d- s+:+ a22 C++(++++) UL++++/I+++/S+++/H+ P++@ L+++ E-@ W(+) N>++ o !K w--- O>+ M V !PS PE Y+ PGP+ t-- 5++ X+ R !tv b++>+++ DI+ D+ G+ e+ h* r y?