Mercurial > code > home > repos > homeauto
changeset 1166:64e36f30f046
xidle to docker
Ignore-this: 2c930853a8f7e7aa9b323f50c46b705d
darcs-hash:64d89546c78f166864fd96861caeb462ae29eea5
author | drewp <drewp@bigasterisk.com> |
---|---|
date | Sun, 09 Sep 2018 04:04:16 -0700 |
parents | 9676b60b4288 |
children | 03e132cd351b |
files | service/xidle/pydeps service/xidle/xidle.py |
diffstat | 2 files changed, 10 insertions(+), 11 deletions(-) [+] |
line wrap: on
line diff
--- 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
--- 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')