projects
/
ozzloy@gmail.com
/
oble
/ blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
blame
|
history
|
raw
|
HEAD
pulling out dbus stuff from face detection
[ozzloy@gmail.com/oble]
/
monitor_idle.pl
1
#!/usr/bin/env perl
2
3
my
$cmd
=
"dbus-monitor --session
\"
type='signal',interface='org.gnome.ScreenSaver',member='SessionIdleChanged'
\"
"
;
4
5
open
(
IN
,
"
$cmd
|"
);
6
7
while
(<
IN
>) {
8
if
(
m/^\s+boolean true/
) {
9
`./hello-world`
;
10
}
elsif
(
m/^\s+boolean false/
) {
11
print
"*** Session is no longer idle ***
\n
"
;
12
}
13
}