Permalink
Browse files

Made GNOME app

  • Loading branch information...
1 parent fcf4024 commit 02284b723a61170de4b950bbc0fc76a0342a113c @pranjalv123 pranjalv123 committed Sep 19, 2011
Showing with 3 additions and 18 deletions.
  1. +1 −0 AUTHORS
  2. +1 −0 COPYING
  3. +1 −1 README
  4. +0 −17 focus.py
View
@@ -0,0 +1 @@
+Pranjal Vachaspati
View
View
2 README
@@ -1 +1 @@
-Set up basedir in focus.py, data gets stored here.
+Set data_dir in src/focus_globals.py, then add src/focus.py to startup applications (or just run it manually).
View
@@ -1,17 +0,0 @@
-import time
-import thread
-import os
-
-basedir = "/home/pranjal/usagedata/"
-
-def get_filename(t):
- return basedir + time.strftime("%Y-%m-%d", t)
-while True:
- inp = os.popen("xdotool getwindowfocus | xargs xprop _NET_WM_NAME -id")
- nm = inp.readline().split('"')[-2]
- tm = time.localtime()
- f = open(get_filename(tm), "a")
- tofday = time.strftime("%H:%M:%S", tm)
- f.write(tofday + " => " + nm + "\n")
- f.close()
- time.sleep(5)

0 comments on commit 02284b7

Please sign in to comment.