dvtm
Dynamic virtual terminal manager inspired by dwm window manager.
Official WebsiteFeatures
Installation
brew install dvtmapt install dvtmpacman -S dvtmWhy 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
# 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 installBasic Usage
Starting dvtm
# 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 dvtmBasic Keybindings
dvtm uses a modifier key (default: Ctrl+g) for commands. Below are the most important 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 dvtmWorking with Tags
# 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 1Configuration
config.h
dvtm uses a configuration header file that must be edited before compilation. Copy the default config and modify it:
# 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 installCustomizing Key Bindings
/* 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:
# 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 dvtmTips & Tricks
- •Combine dvtm with
abducofor tmux-like session management without the complexity. - •
Ctrl+g 0is 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 stacklayout 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.
Related Articles
abduco - Session Management Tool
Session management tool that works with dvtm or any other program
tmux - Terminal Multiplexer
Terminal multiplexer for session management and window splitting
Zellij - Modern Terminal Multiplexer
Modern Rust-based terminal multiplexer with intuitive UI