Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Made GNOME app

  • Loading branch information...
commit 02284b723a61170de4b950bbc0fc76a0342a113c 1 parent fcf4024
@pranjalv123 pranjalv123 authored
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
1  AUTHORS
@@ -0,0 +1 @@
+Pranjal Vachaspati
View
1  COPYING
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
17 focus.py
@@ -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.
Something went wrong with that request. Please try again.