Skip to content

Instantly share code, notes, and snippets.

@fabioluciano
Created September 13, 2011 18:46
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save fabioluciano/1214659 to your computer and use it in GitHub Desktop.
Save fabioluciano/1214659 to your computer and use it in GitHub Desktop.
#! /usr/bin/python
# -*- coding: iso-8859-1 -*-
# Dependencias pynotify e xprintidle
import commands
import time
import pynotify
msg = 'Computador idle por mais de 5 minutos. Pegue café.'
limit = 3000000
while 1:
idle = int(commands.getoutput('xprintidle'))
if idle > limit:
notification = pynotify.Notification("Cafeinne", msg)
notification.show()
time.sleep(60)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment