Skip to content

Instantly share code, notes, and snippets.

@luckyliaolei
luckyliaolei / windowTracker.lua
Created July 10, 2017 07:19 — forked from tmandry/windowTracker.lua
Track all window open, close, move, and resize events using Hammerspoon
local events = hs.uielement.watcher
watchers = {}
function init()
appsWatcher = hs.application.watcher.new(handleGlobalAppEvent)
appsWatcher:start()
-- Watch any apps that already exist
local apps = hs.application.runningApplications()