dvtm
dvtm brings the concept of tiling window management, popularized by X11-window managers like dwm to the console. As a console window manager it tries to make it easy to work with multiple console based programs like vim, mutt, cmus or irssi.
News
- dvtm-0.7 released (4.09.2011)
- dvtm-0.6 released (8.10.2010)
- dvtm-0.5.2 released (7.07.2009)
- dvtm-0.5.1 released (8.02.2009)
- dvtm-0.5 released (26.01.2009)
- dvtm-0.4.1 released (10.05.2008)
- dvtm-0.4 released (17.02.2008)
- dvtm-0.3 released (12.01.2008)
- dvtm-0.2 released (29.12.2007)
- dvtm-0.1 released (21.12.2007)
- dvtm-0.01 released (08.12.2007)
Download
dvtm is packaged by various distributions, see the links below.
- dvtm-0.7 source tarball || freshmeat.net project page
- Debian GNU/Linux
- Ubuntu
- Fedora
- Arch Linux
- FreeBSD
- NetBSD
- OpenBSD
- MacOS X
Development
You can always fetch the current codebase from the git repository.
git clone git://repo.or.cz/dvtm.gitIf you have comments, suggestions, ideas, a bug report, a patch or something else related to dvtm then write to the dwm maling list (the list members don't mind) or contact me directly mat[at]brain-dump.org.
Installation
In order to use dvtm you will need a curses library, for example libncurses.
Download the latest version of dvtm and extract it.
Edit config.mk to match your local setup (dvtm is installed into the /usr/local namespace by default).
Customize config.h as you see fit, see the configuration section
for further information.
If you are on a system with utf8 locales (if unsure check $LANG and the output of locale) you probably want
dvtm to be linked against libncursesw so type make unicode otherwise plain make should suffice.
$EDITOR config.mk
$EDITOR config.h
make
# or on a utf8 aware system
# make unicode
make installYou should now be able to start dvtm, redirect stderr to a file or /dev/null (just in case something goes wrong you will see it there).
./dvtm 2> logConfiguration
The configuration of dvtm is done by creating a custom config.h
and (re)compiling the source code. See the default config.h as an example adapting it to your
preference should be straightforward. You basically define a set of layouts and keys which dvtm
will use. There are some pre defined macros to ease configuration.
CTRL(char key)ALT(char key)CTRL_ALT(char key)COLOR(fg,bg)
Command line options
dvtm only contains 3 simple command line options.
-vprints the version and exits-m modsets the modifier during runtime and thus overrides settings in config.h. So-m ^wwill set the modifier to CTRL+w. This might be useful if you want to run multiple nested dvtm instances.-s status-fifoif status-fifo is a valid named pipe dvtm will read it's content and display it in the statusbar. See the dvtm-status script below which is also included in the source tarball for a possible usecase.
#!/bin/sh
FIFO="/tmp/dvtm-status.$$"
[ -e "$FIFO" ] || mkfifo "$FIFO"
chmod 600 $FIFO
while true; do
date +%H:%M
sleep 60
done > $FIFO &
STATUS_PID=$!
./dvtm -s $FIFO 2> /dev/null
kill $STATUS_PID
rm $FIFOFAQ
Below are some explanations to topics which were asked quite frequently.
Detach / reattach functionality
If you just want to be able to detach and later reattach dvtm sessions i would suggest to use dtach.
dtach -c /tmp/dvtm-session -r winch dvtmIf you additionaly want something similiar to workspaces try running multiple dvtm sessions in different screen windows.
Some characters are displayed like garbage
Make sure you compile dvtm with make unicode if you are in an unicode environment (check whether your locale contains UTF-8).
Copy / Paste doesn't work in X
If you have mouse support enabled, which is the case with the default settings, you need to hold down shift while selecting and inserting text. In case you don't like this behaviour remove CONFIG_MOUSE from the CFLAGS in config.mk you will however no longer be able to perform other mouse actions like selecting windows etc.
The numeric keypad doesn't work with Putty
Disable application keypad mode in the Putty configuration under Terminal => Features => Disable application keypad mode.
Unicode characters don't work within Putty
You have to tell Putty in which character encoding the received data is. Set the dropdown box under Window => Translation to UTF-8. In order to get proper line drawing characters you proabably also want to set the TERM environment variable to putty or putty-256color. If that still doesn't do the trick then try running dvtm
with the following ncurses related environment variable set NCURSES_NO_UTF8_ACS=1.
Problems with some readline keybindings
Pressing CTRL+j j/k to view the command line history doesn't work, it behaves like ENTER. This is the case for all curses applications because curses uses the keybindings as defined by terminfo and CTRL+j is normally configured to match the ENTER behaviour. This can be verified with infocmp.
infocmp $TERM | grep '\^J'
cud=\E[%p1%dB, cud1=^J, cuf=\E[%p1%dC, cuf1=\E[C,
il=\E[%p1%dL, il1=\E[L, ind=^J, is1=\E[?47l\E=\E[?1l,As you can see ^J is mapped to cud1 and ind which acorrding to terminfo(5) means line down respectively scroll text up. This means dvtm will never see CTRL+j but instead allways receive KEY_ENTER.
Layouts
dvtm currently includes 4 standard layouts, below is a schema of each one. These layouts are mostly adapted from dwm (the grid layout is enhanced to always use the whole screen). Porting a layout from dwm should be relatively easy.
+----------+----------+ +----------+----------+
| | | | | |
| | | | | |
| | | | | |
| | | | +----------+
| | | | | |
| | | | | |
| | | | | |
+---------------------+ +---------------------+
2 windows 3 windows
+----------+----------+ +----------+----------+
| | | | | |
| | | | +----------+
| +----------+ | | |
| | | | +----------+
| +----------+ | | |
| | | | +----------+
| | | | | |
+---------------------+ +---------------------+
4 windows 5 windows
+----------+----------+ +----------+----------+
| | | |
| | | |
| | | |
+---------------------+ +---------------------+
| | | | |
| | | | |
| | | | |
+---------------------+ +---------------------+
2 windows 3 windows
+---------------------+ +---------------------+
| | | |
| | | |
| | | |
+------+-------+------+ +----+-----+-----+----+
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
+------+-------+------+ +----+-----+-----+----+
4 windows 5 windows
+----------+----------+ +----------+----------+
| | | | | |
| | | | | |
| | | | | |
| | | +----------+----------+
| | | | |
| | | | |
| | | | |
+---------------------+ +---------------------+
2 windows 3 windows
+----------+----------+ +------+-------+------+
| | | | | | |
| | | | | | |
| | | | | | |
+----------+----------+ +------+---+---+------+
| | | | | |
| | | | | |
| | | | | |
+---------------------+ +---------------------+
4 windows 5 windows
The fullscreen layout displays only the currently selected window.
Screenshots
Below are a few screenshots which show dvtm in action.
Links
Below are some links which are in one way or another related to dvtm.
License
dvtm reuses some code of dwm and is released under the same MIT/X11 license. madtty which is used for the terminal emulation is licensed under the GNU LGPL.
