|
|
|
|
||||||
| comp.unix.shell Using and programming the Unix shell. |
![]() |
|
|
LinkBack | Outils de la discussion |
|
|
#1 |
|
Messages: n/a
Hébergeur: |
Hi,
I would like to get the time of the most recent human activity like a cursor movement or a key hit. Does anyone know how I can get this back to start some action after there has been no activity for X minutes/seconds? Thank you! -- chEErs roN |
|
|
|
#2 |
|
Messages: n/a
Hébergeur: |
2008-03-26, 03:38(+00), Ron Eggler:
[...] > I would like to get the time of the most recent human activity like a cursor > movement or a key hit. > Does anyone know how I can get this back to start some action after there > has been no activity for X minutes/seconds? [...] For X11, google for the xprintidle utility or the XScreenSaverQueryInfo(3) API. -- Stéphane |
|
|
|
#3 |
|
Messages: n/a
Hébergeur: |
Stephane CHAZELAS wrote:
> 2008-03-26, 03:38(+00), Ron Eggler: > [...] >> I would like to get the time of the most recent human activity like a >> cursor movement or a key hit. >> Does anyone know how I can get this back to start some action after there >> has been no activity for X minutes/seconds? > [...] > > For X11, google for the xprintidle utility or the > XScreenSaverQueryInfo(3) API. > Well for X11, not sure what would be about the others without X11... :? -- chEErs roN |
|
|
|
#4 |
|
Messages: n/a
Hébergeur: |
Ron Eggler <ron@example.com> writes:
> Well for X11, not sure what would be about the others without X11... :? Well, perhaps you can monitor the access time of /dev/tty, /dev/mouse... |
|
|
|
#5 |
|
Messages: n/a
Hébergeur: |
2008-03-26, 14:26(+00), Ron Eggler:
[...] > Well for X11, not sure what would be about the others without X11... :? Then that would be system dependant. On Linux, you could watch /proc/interrupts for instance, there might be more specific APIs. On a terminal, you can look at the modification time of $(tty). -- Stéphane |
|
|
|
#6 |
|
Messages: n/a
Hébergeur: |
Maxwell Lol wrote:
> Ron Eggler <ron@example.com> writes: > >> Well for X11, not sure what would be about the others without X11... :? > > Well, perhaps you can monitor the access time of /dev/tty, /dev/mouse... I don't have a /dev/mouse but the access time on /dev/input/mice doesn't mirror the time of the last mouse movment. I just checked with an "la -la" would you have thought about any other possibilities? Thank you! -- chEErs roN |
|
|
|
#7 |
|
Messages: n/a
Hébergeur: |
Ron Eggler schreef:
> Hi, > > I would like to get the time of the most recent human activity like a cursor > movement or a key hit. > Does anyone know how I can get this back to start some action after there > has been no activity for X minutes/seconds? > Thank you! > $ man screen .... blanker Activate the screen blanker. First the screen is cleared. If no lanker program is defined, the cursor is turned off, otherwise, the program is started and it's output is written to the screen. The screen blanker is killed with the first keypress, the read key is discarded. This command is normally used together with the "idle" command. blankerprg [program args] Defines a blanker program. Disables the blanker program if no arguments are given. -- Luuk |
|
|
|
#8 |
|
Messages: n/a
Hébergeur: |
Luuk wrote:
> Ron Eggler schreef: >> Hi, >> >> I would like to get the time of the most recent human activity like a >> cursor movement or a key hit. >> Does anyone know how I can get this back to start some action after there >> has been no activity for X minutes/seconds? >> Thank you! >> > > $ man screen > > ... > > blanker > Activate the screen blanker. First the screen is cleared. If no lanker > program is defined, the cursor is turned off, otherwise, the program is > started and it's output is written to the screen. The screen blanker is > killed with the first keypress, the read key is discarded. > This command is normally used together with the "idle" command. > > blankerprg [program args] > Defines a blanker program. Disables the blanker program if no arguments > are given. And where would i find these applications? i googled but didn't find anything... ![]() Thanks! -- chEErs roN |
|
![]() |
| Outils de la discussion | |
|
|