From 5f6913122cc3be7a56a7f17088a3245d7cf64eba Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Wed, 17 Feb 2016 20:33:55 -0500 Subject: [PATCH] hs: Refactor iTerm init config --- hammerspoon/apps/iterm.lua | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/hammerspoon/apps/iterm.lua b/hammerspoon/apps/iterm.lua index 9bd7db90..24e4eddb 100644 --- a/hammerspoon/apps/iterm.lua +++ b/hammerspoon/apps/iterm.lua @@ -36,26 +36,26 @@ App.new("iTerm2") -- new tmux window self.bind({'cmd'}, 'n', function() if not tmuxPressKey({}, 'c') then - App.find("iTerm2"):selectMenuItem({"Shell", "New Window"}) + app:selectMenuItem({"Shell", "New Window"}) end end) -- new window self.bind({'cmd', 'shift'}, 'n', function() - App.find("iTerm2"):selectMenuItem({"Shell", "New Window"}) + app:selectMenuItem({"Shell", "New Window"}) end) -- close pane/window self.bind({'cmd'}, 'w', function() if not tmuxPressKey({}, 'x') then - App.find("iTerm2"):selectMenuItem({"Shell", "Close"}) + app:selectMenuItem({"Shell", "Close"}) end end) -- detach tmux before quitting iterm self.bind({'cmd'}, 'q', function() if not tmuxPressKey({}, 'd') then - App.find("iTerm2"):kill() + app:kill() end end) end)