Get new window focused

Tue, 21 Feb 2017 01:52:31 -0500

author
Meredith Howard <mhoward@roomag.org>
date
Tue, 21 Feb 2017 01:52:31 -0500
changeset 520
a6a39c406585
parent 519
42e8433b8a51
child 521
a14e7cd58d81

Get new window focused

.hammerspoon/init.lua file | annotate | diff | comparison | revisions
--- a/.hammerspoon/init.lua
+++ b/.hammerspoon/init.lua
@@ -40,8 +40,8 @@ cmdCtrl('right', function () focusedWind
 cmd('return', function ()
   hs.applescript.applescript([[
     tell application "iTerm"
-      create window with default profile
-      activate
+      set newterm to (create window with default profile)
+      tell newterm to activate
     end tell
   ]])
 end)

mercurial