From: Phil Pennock <phil@athenaeum.demon.co.uk>
To: zsh-users@math.gatech.edu
Subject: Re: Tracking idletimes
Date: Tue, 15 Dec 1998 23:59:12 +0000 [thread overview]
Message-ID: <19981215235912.25281@athenaeum.demon.co.uk> (raw)
In-Reply-To: <slrn77ds3e.lun.gossamer@tertius.net.au>; from "Gossamer" on Tue 15 Dec 1998 (23:27 +0000)
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?
next prev parent reply other threads:[~1998-12-15 23:54 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
1998-12-15 23:27 Gossamer
1998-12-15 23:59 ` Phil Pennock [this message]
1998-12-16 5:01 ` Gossamer
1998-12-16 9:53 ` Bart Schaefer
1998-12-16 15:42 ` Anthony Whitehouse
1998-12-16 23:57 ` Gossamer
1998-12-16 18:26 Juergen Sell
1998-12-16 23:56 ` Gossamer
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=19981215235912.25281@athenaeum.demon.co.uk \
--to=phil@athenaeum.demon.co.uk \
--cc=zsh-users@math.gatech.edu \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.vuxu.org/mirror/zsh/
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).