Terminal GuideTerminal Guide

dvtm

Multiplexers
macOSLinux
C

Dynamic virtual terminal manager inspired by dwm window manager.

Official Website

Features

Dynamic LayoutsLightweightdwm-styleTagging

Installation

Homebrew
brew install dvtm
APT (Debian/Ubuntu)
apt install dvtm
Pacman (Arch)
pacman -S dvtm

Why use dvtm?

dvtm (Dynamic Virtual Terminal Manager) is a minimalist terminal multiplexer inspired by the dwm (dynamic window manager) philosophy. It provides dynamic tiling layouts for managing multiple terminals with minimal overhead, making it ideal for users who prefer a lightweight, keyboard-driven workflow.

Dynamic Layouts

Automatically arrange windows in tiling patterns. Switch between different layouts (tile, bottom stack, fullscreen) with a single keystroke.

Lightweight

Minimal memory footprint and dependencies. Written in C for speed and efficiency, perfect for remote servers and embedded systems.

Tag-based Organization

Organize windows using tags instead of traditional workspaces. Multiple tags can be visible simultaneously for flexible workflow management.

Vim-style Navigation

Intuitive keyboard shortcuts for window management. Compatible with vi keybindings and Ctrl key combinations for consistency.

Installation

Using Package Managers

Installation
# macOS (Homebrew)
brew install dvtm

# Ubuntu/Debian
apt install dvtm

# Arch Linux
pacman -S dvtm

# From source
git clone https://www.brain-dump.org/projects/dvtm/
cd dvtm
make
sudo make install

Basic Usage

Starting dvtm

Getting Started
# Start dvtm in the current terminal
dvtm

# Start with a shell or command
dvtm -m ./session.sh

# Use with abduco for persistent sessions
abduco -c dvtm-session dvtm

Basic Keybindings

dvtm uses a modifier key (default: Ctrl+g) for commands. Below are the most important keybindings.

Common Keybindings
# Window Management
Ctrl+g c      # Create new window
Ctrl+g d      # Close current window
Ctrl+g n      # Next window
Ctrl+g p      # Previous window
Ctrl+g j/k    # Cycle through windows

# Layout Control
Ctrl+g t      # Tile layout
Ctrl+g b      # Bottom stack layout
Ctrl+g m      # Maximize window
Ctrl+g e      # Equalize window sizes
Ctrl+g s      # Fullscreen layout

# Tag Management
Ctrl+g [1-9]  # Switch to tag
Ctrl+g 0      # Show all tags
Ctrl+g .      # Next tag
Ctrl+g ,      # Previous tag

# Other
Ctrl+g ?      # Show key bindings
Ctrl+g q      # Quit dvtm

Working with Tags

Tag Operations
# View tags for current window
# Use Ctrl+g [1-9] to view/switch tags

# Create windows on different tags
# Create window on tag 1
Ctrl+g 1, Ctrl+g c

# Create window on tag 2
Ctrl+g 2, Ctrl+g c

# View multiple tags
Ctrl+g 0  # Show all windows from all tags

# View single tag
Ctrl+g 1  # Show only tag 1

Configuration

config.h

dvtm uses a configuration header file that must be edited before compilation. Copy the default config and modify it:

Configuration
# Examine and modify config.h before building
cp config.def.h config.h
vim config.h

# Key configuration options in config.h:
# - Key bindings (key binding arrays)
# - Color schemes (color definitions)
# - Command array (scrollback, terminal)
# - Resize step
# - Border and padding options

# After editing, rebuild
make clean
make
sudo make install

Customizing Key Bindings

config.h - Key Binding Example
/* Example key binding configuration in config.h */
static const Key keys[] = {
  /* modifier, key, function, args */
  { MOD, 'c', create, { NULL } },
  { MOD, 'd', destroy, { NULL } },
  { MOD, 'n', next, { NULL } },
  { MOD, 'p', prev, { NULL } },
  { MOD, 't', setlayout, { .i = TILE } },
  { MOD, 'b', setlayout, { .i = BOTTOM_STACK } },
  { MOD, 'm', maximize, { NULL } },
  { MOD, 's', setlayout, { .i = FULLSCREEN } },
  { MOD, 'j', focusnext, { NULL } },
  { MOD, 'k', focusprev, { NULL } },
  { MOD, 'a', move, { .i = -1 } },
  { MOD, 'z', move, { .i = +1 } },
};

Using dvtm with abduco

For session persistence (detach/attach), use dvtm with abduco:

Session Management
# Create a persistent dvtm session named "main"
abduco -c main dvtm

# Attach to existing session
abduco -a main

# List all sessions
abduco -l

# Create and attach in one command
abduco -A main dvtm

Tips & Tricks

  • Combine dvtm with abduco for tmux-like session management without the complexity.
  • Ctrl+g 0 is useful for showing all open windows across all tags at once.
  • Use tags instead of multiple workspaces for a cleaner, more flexible organization system.
  • dvtm works great on slow or SSH connections due to its minimal overhead and efficient updates.
  • The bottom stack layout is great for having one large main window with smaller windows below it.
  • If you know dwm, dvtm's philosophy will feel very familiar. The keybindings are intentionally similar.
  • Consider using dvtm -m "command" to start with a specific command already running.
Written by Dai AokiPublished: 2026-01-20

Related Articles

Explore More