Skip to content

Instantly share code, notes, and snippets.

@sbimochan
Last active December 31, 2021 05:14
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save sbimochan/98f516b2060515b377fadc759bb75b43 to your computer and use it in GitHub Desktop.
Save sbimochan/98f516b2060515b377fadc759bb75b43 to your computer and use it in GitHub Desktop.
Daily work flow automation
#!/usr/bin/osascript
tell application "iTerm2"
tell current session of current tab of current window
split vertically with default profile
split vertically with default profile
write text "cd ~/projects/myFavProject"
write text "code ."
end tell
tell second session of current tab of current window
write text "cd ~/projects/myFavProject"
write text "git fetch --all --prune"
write text "npm run start"
end tell
tell third session of current tab of current window
write text "cd ~/projects/myFavProjectBackend"
write text "git fetch --all --prune"
write text "npm run start:dev"
end tell
end tell
# Open applications
tell application "Google Chrome"
open
open location "https://your-jira-url"
open location "https://your-pull-requests-url"
end tell
tell application "Mail"
open
end tell
tell application "Slack"
open
activate
end tell
tell application "Spotify"
play
end tell
# Only applicable for mac machines
# Save it as work.scpt and
# Execute it by `osascript work.scpt`
# or create an alias for it
@sbimochan
Copy link
Author

Of course configure it as your choice.

@sbimochan
Copy link
Author

Also you can create an alias for it

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment