Skip to content

Instantly share code, notes, and snippets.

@casprwang
Created May 6, 2017 20:56
Show Gist options
  • Save casprwang/1c2b4a71bc9f8d449800c76c3f369d05 to your computer and use it in GitHub Desktop.
Save casprwang/1c2b4a71bc9f8d449800c76c3f369d05 to your computer and use it in GitHub Desktop.
-- disable alt-v for Adobe's built-in shortcut
function applicationWatcher(appName, eventType, appObject)
if (eventType == hs.application.watcher.activated) then
if (string.find(appName, 'iTerm')) then
for i,v in pairs(editting) do
v:disable()
end
-- editting.cD:disable()
else
for i,v in pairs(editting) do
v:disable()
end
-- editting.cD:enable()
end
if (string.find(appName, 'Adobe')) then
altV:disable()
else
altV:enable()
end
end
end
-- end
local appWatcher = hs.application.watcher.new(applicationWatcher)
appWatcher:start()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment