2017-05-10 45 views
0

我想爲標籤設置名稱,但在iterm2中只有會話標題。在iterm2中分割窗格後保留會話標題

它正常工作,當我在一個標籤都有一個拆分窗格,

set session titile

但會議標題將拆分後的標籤更改爲兩個窗格。

after split

有沒有寫一個腳本劈裂後舉行的會議標題的方法嗎?

回答

0

我解決它通過以下的AppleScript:

tell application "iTerm" 
    tell current session of current window 
     set nameOfSession to {get name} as text 
     set newSession to {split horizontally with same profile} 
     select newSession 
     set name to nameOfSession 
    end tell 
end tell 

把它放到~/Library/Application Support/iTerm/Scripts,重啓iterm2那麼你就可以看到腳本Script Menumore about scripts)。

並且可能是您想要映射快捷方式以在系統鍵盤快捷方式設置中執行該腳本。