Skip to content

Instantly share code, notes, and snippets.

@miripiruni
Created March 18, 2014 11:30
Show Gist options
  • Save miripiruni/9618302 to your computer and use it in GitHub Desktop.
Save miripiruni/9618302 to your computer and use it in GitHub Desktop.
Простейший applescript, который открывает три сплита в iTerm: в первом — редактирование файлов, во втором — debug-лог, в третьем — error-лог.
launch "iTerm"
tell application "iTerm 2"
activate
-- ssh in split panes to realty2
set myterm to (make new terminal)
tell myterm
launch session "miripiruni"
set number of columns to 200
set number of rows to 60
tell the last session to write text "ssh ..."
tell the last session to write text "gs"
delay 0.5
tell i term application "System Events" to keystroke "d" using command down
tell the last session to write text "ssh ..."
tell the last session to write text "tail -f /var/log/node-init-cluster/proj-miripiruni/debug.log"
delay 0.5
tell i term application "System Events" to keystroke "D" using command down
tell the last session to write text "ssh ..."
tell the last session to write text "tail -f /var/log/node-init-cluster/proj-miripiruni/error.log"
end tell
end tell
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment