Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
#!/usr/bin/env python
import flicklib
import subprocess
from time import sleep
from copy import copy
def move(x, y, z):
global xyz
xyz = [x,y,z]
def main():
global xyz
xyz = [0,0,0]
old_xyz = [0,0,0]
while True:
if old_xyz != xyz:
print 'Detected movement. Sending Bat-signal to Screenly!'['pkill', '-SIGUSR1', '-f', ''])
old_xyz = copy(xyz)
if __name__ == "__main__":
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.