Last active
January 22, 2022 23:46
-
-
Save somenugget/8de63107bc1d9e78aa71e29f99af3870 to your computer and use it in GitHub Desktop.
Run App In iTerm
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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