Skip to content

Instantly share code, notes, and snippets.

@somenugget
Last active January 22, 2022 23:46
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save somenugget/8de63107bc1d9e78aa71e29f99af3870 to your computer and use it in GitHub Desktop.
Save somenugget/8de63107bc1d9e78aa71e29f99af3870 to your computer and use it in GitHub Desktop.
Run App In iTerm
on run {input, parameters}
tell application "iTerm"
if not (exists first window) then
create window with default profile
end if
tell current window
-- leave only one tab opened
repeat (count of tabs) - 1 times
tell current tab
close
end tell
end repeat
tell current session of current tab
set background color to {5555, 0, 0, 0}
write text "~/path/to/rails-app"
write text "bundle exec rails server"
end tell
create tab with default profile
tell current session of current tab
set background color to {0, 7777, 0, 0}
write text "~/path/to/frontend-app"
write text "npm run start"
end tell
create tab with default profile
tell current session of current tab
set background color to {0, 0, 33333, 0}
write text "~/path/to/rails-app"
write text "bundle exec sidekiq"
end tell
end tell
end tell
end run
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment