# HG changeset patch # User drewp@bigasterisk.com # Date 1536491056 25200 # Node ID 01817264cc3db9aa45eea72ded2c42425acfb876 # Parent 2efa246a65e7e810f6637ca567989153572ef72e xidle to docker Ignore-this: 2c930853a8f7e7aa9b323f50c46b705d diff -r 2efa246a65e7 -r 01817264cc3d service/xidle/pydeps --- a/service/xidle/pydeps Sun Sep 09 04:01:44 2018 -0700 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,6 +0,0 @@ -python-dateutil==2.1 -rdflib==3.2.3 - -https://bebop.bigasterisk.com/python/PyXSS.tar.gz -influxdb==3.0.0 -cyclone==1.1 diff -r 2efa246a65e7 -r 01817264cc3d service/xidle/xidle.py --- a/service/xidle/xidle.py Sun Sep 09 04:01:44 2018 -0700 +++ b/service/xidle/xidle.py Sun Sep 09 04:04:16 2018 -0700 @@ -2,24 +2,29 @@ from __future__ import division """ X server idle time is now available over http! + +Note: HD-4110 webcams stop X from going idle by sending events +constantly. Run this to fix: + + xinput disable "HP Webcam HD-4110" """ import time -import sys, socket, json +import sys, socket, json, os from rdflib import Namespace, URIRef, Literal from influxdb import InfluxDBClient +import influxdb.exceptions import cyclone.web from twisted.internet import reactor, task -# from http://bebop.bigasterisk.com/python/ -import xss +import actmon # another option: http://thp.io/2007/09/x11-idle-time-and-focused-window-in.html DEV = Namespace("http://projects.bigasterisk.com/device/") ROOM = Namespace("http://projects.bigasterisk.com/room/") -sys.path.append("/my/site/magma") -from stategraph import StateGraph +sys.path.append('../../lib') +from patchablegraph import PatchableGraph, CycloneGraphEventsHandler, CycloneGraphHandler host = socket.gethostname() client = InfluxDBClient('bang6', 9060, 'root', 'root', 'main')