hs: Refactor iTerm init config
This commit is contained in:
parent
851be63c38
commit
5f6913122c
|
@ -36,26 +36,26 @@ App.new("iTerm2")
|
||||||
-- new tmux window
|
-- new tmux window
|
||||||
self.bind({'cmd'}, 'n', function()
|
self.bind({'cmd'}, 'n', function()
|
||||||
if not tmuxPressKey({}, 'c') then
|
if not tmuxPressKey({}, 'c') then
|
||||||
App.find("iTerm2"):selectMenuItem({"Shell", "New Window"})
|
app:selectMenuItem({"Shell", "New Window"})
|
||||||
end
|
end
|
||||||
end)
|
end)
|
||||||
|
|
||||||
-- new window
|
-- new window
|
||||||
self.bind({'cmd', 'shift'}, 'n', function()
|
self.bind({'cmd', 'shift'}, 'n', function()
|
||||||
App.find("iTerm2"):selectMenuItem({"Shell", "New Window"})
|
app:selectMenuItem({"Shell", "New Window"})
|
||||||
end)
|
end)
|
||||||
|
|
||||||
-- close pane/window
|
-- close pane/window
|
||||||
self.bind({'cmd'}, 'w', function()
|
self.bind({'cmd'}, 'w', function()
|
||||||
if not tmuxPressKey({}, 'x') then
|
if not tmuxPressKey({}, 'x') then
|
||||||
App.find("iTerm2"):selectMenuItem({"Shell", "Close"})
|
app:selectMenuItem({"Shell", "Close"})
|
||||||
end
|
end
|
||||||
end)
|
end)
|
||||||
|
|
||||||
-- detach tmux before quitting iterm
|
-- detach tmux before quitting iterm
|
||||||
self.bind({'cmd'}, 'q', function()
|
self.bind({'cmd'}, 'q', function()
|
||||||
if not tmuxPressKey({}, 'd') then
|
if not tmuxPressKey({}, 'd') then
|
||||||
App.find("iTerm2"):kill()
|
app:kill()
|
||||||
end
|
end
|
||||||
end)
|
end)
|
||||||
end)
|
end)
|
||||||
|
|
Loading…
Reference in a new issue