Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

So, I have this bash script that runs AppleScript that I use to start up a bunch of servers at once, each in their own Terminal tab. At the heart of it is this 'new-tab' function[1]. I don't really like AppleScript, and would like to not use it.

Can I duplicate this functionality using iTerm, without using AppleScript?

[1] Here's the code; I cobbled it together from some StackOverflow snippet or something: https://gist.github.com/anonymous/f16a46c327a14ec8a5b5



Take a look at tmux and tmuxinator.

I have a config that looks like this:

    # ~/.tmuxinator/blah.yml

    name: blah
    root: ~/Development/blah

    windows:
      - web:
          layout: even-vertical
          panes:
            - cd web
            - cd web; gulp server default watch --device desktop
      - admin:
          layout: even-vertical
          panes:
            - cd admin
            - cd admin; gulp dev
      - ssh:test:
          layout: even-vertical
          panes:
            - clear; ssh ubuntu@web.test
      - ssh:prod:
          layout: even-vertical
          panes:
            - clear; ssh ubuntu@web1.prod
            - clear; ssh ubuntu@web2.prod
and I just run `mux start blah` and that will either start a new tmux session and set up everything as I need, or resume an already running session.



I built teamocil for this purpose. https://github.com/remiprev/teamocil


Warning: Teamocil may cause numbness of the extremities, short term memory loss and may decrease your sex drive.


You might want to put it in a GitHub Gist, or similar, for better readability.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: