Skip to content

Instantly share code, notes, and snippets.

@jqtrde
Last active January 2, 2016 00:19
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save jqtrde/8223021 to your computer and use it in GitHub Desktop.
Save jqtrde/8223021 to your computer and use it in GitHub Desktop.

Installation

brew install dvtm dtach

Getting started

To begin, start dvtm with dvtm

Ctrl g is the default modifier for dvtm. You'll prefix every command with it.

To change the default mod, run dvtm with the -m flag. IE: dvtm -m a, will set the modifier to Ctrl a

Basics

  • MOD c creates a new window.
  • MOD x will close it.
  • MOD j/k will switch between windows. Also, your mouse will work.
  • MOD #, where # is the window number, will move you to the appropriate window.
  • MOD q will exit dvtm.

Layouts

  • MOD h/l will resize the window laterally.
  • MOD t will stack inactive windows vertically.
  • MOD b will stack inactive windows horizontally.
  • MOD g will stack windows in a grid.
  • MOD space toggles between layouts.
  • MOD . hides a window.

When I start a project, I'll open a few windows. Start and minimize my watch processes. Get to work.

dtach

My dtach workflow is simple.

  1. dtach -A /tmp/sessionName -r winch dvtm will create and attach to a new session.
  2. Do work.
  3. Ctrl \ to detach from the current session.
  4. dtach -a /tmp/sessionName to reattach.

Additional Resources

There is more to it, but this takes care of 80% of what I do. If you want to dig in, check out the following:

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