timeplot 0.8.4

Personal activity tracker & graph plotter
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
#!/usr/bin/env osascript

# script for "timeplot"
# credits: https://github.com/octalmage/active-window/blob/master/scripts/mac.scpt

global frontApp, frontAppName, windowTitle
set windowTitle to ""
tell application "System Events"
	set frontApp to first application process whose frontmost is true
	set frontAppName to name of frontApp
	tell process frontAppName
		tell (1st window whose value of attribute "AXMain" is true)
			set windowTitle to value of attribute "AXTitle"
		end tell
	end tell
end tell
return {windowTitle}