Skip to content

Instantly share code, notes, and snippets.

View rcconsult's full-sized avatar

R1 rcconsult

  • RC Consult
  • Switzerland
  • 04:40 (UTC +02:00)
View GitHub Profile
@rcconsult
rcconsult / iterm.scpt
Created May 30, 2018 22:45 — forked from gnachman/iterm.scpt
Replace /Applications/Docker/Docker Quickstart Terminal.app/Contents/Resources/Scripts/iterm.scpt with this.
set itermRunning to (application "iTerm" is running)
set scriptPath to quoted form of POSIX path of ((path to me as text) & "::" & "start.sh")
set user_shell to do shell script "dscl /Search -read /Users/$USER UserShell | awk '{print $2}'"
tell application "iTerm"
activate
if not (exists window 1) or (itermRunning = false) then
reopen
end if