Created
January 16, 2014 19:26
-
-
Save HarHar/8461655 to your computer and use it in GitHub Desktop.
quietnet loader for disabling xscreensaver
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
import subprocess | |
import sys | |
import signal | |
target = sys.argv[1] | |
def nop(*args): pass | |
signal.signal(signal.SIGHUP, nop) | |
a = subprocess.Popen(['python', target], stdin=-1, stderr=-1, stdout=-1) | |
while True: | |
print a.stdout.read(1) | |
subprocess.Popen(['xscreensaver-command', '--deactivate']).wait() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment