Skip to content

Instantly share code, notes, and snippets.

@HarHar
Created January 16, 2014 19:26
Show Gist options
  • Save HarHar/8461655 to your computer and use it in GitHub Desktop.
Save HarHar/8461655 to your computer and use it in GitHub Desktop.
quietnet loader for disabling xscreensaver
#!/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