Switching Between Projects in Ten Seconds (or less)

If you work on more than one project at a time, as most of us do, switching between projects can be a major timesuck and momentum killer. For me, I work on a number of things throughout the day - at the very least, a couple client projects and a side project. For each of those, I might have the following things open/running:

  • Atom for editing
  • Indesign for UX work
  • Terminal: running mongo
  • Terminal: running node
  • Terminal: at directory, for git management
  • Browser tab for Github issues
  • Slack team related to project
  • Toggl for tracking time on the project

…and who knows what else.

What that means is that each time I switch between projects, I have to close all that, and reopen it to a new directory, configuration or workspace. Depending on the project, this can mean a lot of time spent managing the environment. Time spent managing the environment is tool time, not goal time, and it can sap the momentum out of you as you switch between tasks.

A Better Way Forward

Recently, my buddy Josh turned me onto using tmux for better managing sessions of terminal windows. Tmux in itself is awesome, but combined with tmuxinator, it’s really killer. Tmuxinator allows you to - among other things - create configurations of tmux sessions and launch a number of configured session with a single command.

Let’s look at a quick example of how that works. I’m working on a little side project right now - it’s a web app, built in Angular with a MongoDB backend and using Grunt to do the build.

Here’s my tmuxinator configuration for the project, written in yaml:

name: tipping
root: ~/Code/tipping/app

  - server:
    layout: main-horizontal
        - grunt serve
  - database: mongo

When I run this (mux start tipping), I end up with the following:


How about that? It starts a tmux session, creates a window for the database, and another running the server and giving me a command line at the project directory.

Adding Gas

So, tmuxinator is cool enough, but I stumbled on a post that kicked it into high gear by creating a shell script for handling setup of other things that tmuxinator doesn’t necessarily handle. This is a game changer. To take the tmuxinator concept and blow it out, I created a shell script that looks like this:


projectname = "Tipping"

atom $dir

toggl stop
toggl start $projectname

open /Applications/Robomongo.app
open https://github.com/jwd2a/tipping/issues
tmuxinator tipping

I stashed that file in /.dotfiles/projectconfigs/tipping, and symlinked my entire /projectconfigs directory to a directory on my PATH, and boom, we were in business.

Now, all I have to do is open a terminal, type tipping, and it does the following:

  • Opens Atom (my editor) to the project directory
  • Stops toggl from tracking any existing projects, and restarts for this one
  • Opens Robomongo for monitoring/interacting with MongoDB
  • Opens my github repo for the project to the issues
  • Creates a tmux session with mongo running, the server running, and a command line I can use for managing git, etc. (all the stuff shown in the earlier section).

I definitely feel like this is a HUGE timesaver and momentum saver. Now, for each new project, I just create that config file, and off I go.

As an added bonus, I use Alfred, so I can simply call up Alfred, type > tipping, and the entire environment is created. No need to even open the terminal first.

In the future, I’d like to expand the config to do more things. I’d love to open specific files in Indesign, open specific Slack teams, etc. The other missing piece is hooking up a window manager to the config as well - something like Divvy or Slate, to have it automatically do the layout of applications.

If you’re looking to make your process of switching between projects easier and quicker, I definitely recommend looking into this method. It’s definitely made a huge difference for me, and I can only imagine it’ll get much better as I made the project configs more robust.

Got any tips or tricks to add? Do you use a system like this to help speed up switching between projects? Leave your thoughts in the comments!

Related Posts

Review: Keto Diet

I recently gave the Keto (Ketogenic) Diet a try. Suffice to say...it works.

You Don't Need to Get it All Correct Immediately

Too many people wait on shit to be perfect. Get it close, leave out some stuff, and set yourself up to quickly iterate.

Using Foundation 6 in Angular 4 (or 2)

How to use Foundation for Sites 6 in Angular 4 (or any version 2+)

Great Products Need Great DevOps

In the quest for shipping great products, DevOps is often overlooked, and that's a mistake

How I Increased my Water Intake by 500%

We all need to drink more water, but it's hard to get in the habit. Here's a simple trick I used to get a 5x improvement on my intake.

Three Secrets That Made Cutting The Cord Easy

After decades of being attached at the hip to cable, I finally cut the cord, and it's been amazing. Here are three secrets that helped me get the most of it.

How to Onboard a Product Designer

If you're bringing a product designer or UX designer in to help you design your product, there's a bad way to do it, and a good way to do it. Here's how to make sure you're doing it right.

Review: Slicing Pie

Slicing Pie is a new way to think about company equity splits, and it blows away the old methods you've probably used.

When Troubleshooting, Follow the Process!

When you're trying to troubleshoot something - a car that won't start, or a business that isn't working - follow the right process.

The Art of Finding a Way

Being resourceful and relentless is one of the keys to being successful (and a great shipper). When in doubt, find a way.