# HG changeset patch # User Meredith Howard # Date 1521746654 14400 # Node ID 7520062c1461cbcb655d647bbed1c8a9de488ded # Parent 7118c036f77070c5a1931ccdb73a06a4cd35983b okay -actually- get it to focus the new window diff --git a/.hammerspoon/init.lua b/.hammerspoon/init.lua --- a/.hammerspoon/init.lua +++ b/.hammerspoon/init.lua @@ -40,8 +40,10 @@ cmdCtrl('right', function () focusedWind cmd('return', function () hs.applescript.applescript([[ tell application "iTerm" - set newterm to (create window with default profile) - activate window newterm + set newterm to index of (create window with default profile) + tell application "System Events" to tell process "iTerm2" + perform action "AXRaise" of window newterm + end tell end tell ]]) end)