![]() ![]() This is a bit involved, but worth the effort, so strap in. Pretty sweet, eh? The process to set it up is as follows. Default Environment Iterm Default Theme Production Iterm Production Theme Staging Iterm Staging Theme Here is an example of what my final setup looks like. This all conforms to my general philosophy of “Make it really hard to do the wrong thing.” I’ve found it really useful as it allows me to quickly recognise which terminal window I need to be in, and helps prevent me from accidentally running a command on Production that I, in fact, wanted to run on Staging. I won't send you more than one email a month.A couple of months ago I decided to set it up so my iTerm 2 terminal changed to a different colour when I am ssh’d into either one of our Production or Staging servers when I am working at Disco. If you like what I write about subscribe to my newsletter via email or RSS. Debugging a Slow Starting Elixir Application.Visualizing Backoff Functions With Gnuplot.I'm a maintainer of asdf and the creator of eFlambé. I'm passionate about building reliable systems with Erlang and Elixir. I'm a software engineer working at Rent from Florida. I won't send you more than one email a month. If you enjoyed this article and would like to receive more articles like this subscribe to my newsletter via email or RSS. Get more articles like this in your inbox This makes it easy to load them from a setup script in your dotfile repository. It’s possible load them from the command line. You actually don’t have to use the iTerm2 GUI to load the preferences. If you have any questions feel free to contact me. Hopefully this post has been useful to you. Now getting iTerm2 setup on a new laptop is as simple as check the “Load preferences from folder” option and navigating to the file that already exists inside your dotfile repository. Now that the file is checked in to your Git repository every time you make a change to your iTerm2 configuration via the GUI it will appear as a change to the config file in your dotfile repo, which you can then commit or discard. Commit the file and push it up to your hosted dotfile repository. Git should show the new directory in the status message. ![]() Assuming you are using Git to manage your dotfiles, you should also be able to hop into the shell and run git status. ![]() Navigate to the directory you specified and you should see the config file. !(/images/posts/sync_iterm2_profile/iterm_settings_complete.png “”) An XML config file should be created in the folder you specified. Once the directory has been selected click the “Save Settings to Folder” button. !(/images/posts/sync_iterm2_profile/iterm_settings_choose_directory.png “”) After creating the directory go back to the iTerm2 settings and click the browse button next to the input box for the iterm2 config file path/URL and select the directory you just created. Using the shell or Finder navigate to your dotfile repository and create a directory to store the iTerm2 config file. Before you continue you will want to created a directory to hold the config file. This allow us to load and save iTerm2 config files to the specified directory. Once this option is checked an input box with a browse button next to it should be enabled below the checkbox you just checked. Towards the bottom of the window you should see an option that says “Load preferences from a custom folder or URL”. Once you have iTerm2 configured the way you like navigate to the preferences window (iTerm2 -> preferences). In this post I show you how to store your iTerm2 profile in your dotfiles repository along with everything else.įirst get iTerm2 configured the way you like it (in the scenario above, this would mean using your old laptop). Transferring all your iTerm2 settings manually is a pain. Everything from colors to scrollback options are stored in your iTerm2 configuration, which is hidden away somewhere on your file system on your old laptop. Looks like you forgot to transfer your iTerm2 profile to your new laptop. Bash and Zsh are configured correctly, but they don’t look right. ![]() You fire up iTerm2, clone down the repository, run the setup script and restart iTerm. Everything you need to get setup on the new MacBook Pro is stored in your dotfile repository hosted on GitHub. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |