Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

@AndrewThian
Last active April 22, 2019 03:40
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 AndrewThian/4ffebc773e19feedd4d1d787bcbed08a to your computer and use it in GitHub Desktop.
Save AndrewThian/4ffebc773e19feedd4d1d787bcbed08a to your computer and use it in GitHub Desktop.
Automatic iterm2 window creation

Steps

We'll be using itermocil to aid the creation process.

  1. Simply follow the installation process in the itermocil repo (best way to install is brew, which we already have)

  2. Create a folder .itermocil in your home folder

  3. itermocil uses a yaml based configuration file. The filename is the key to trigger the iterm creation process. E.g the w99.yml would be instantiated with itermocil w99

  4. Add a yaml file into the .itermocil folder with whatever name you wish

  5. copy these configurations

windows:
  - name: ninenine
    root: ~/
    layout: main-vertical
    panes:
      - ssh 99
      - ssh -t 99 "tmux attach-session -t spa"
      - ssh -t 99 "tmux attach-session -t oldweb"

Please note that the ssh 99 configuration comes from the ~/.ssh/config which is defined by your user settings

  1. Use itermocil w99 to create the windows. You may also bind an alias to this
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment