dvtm

dynamic virtual terminal manager - with my changes
git clone https://pi.duncano.de/git/dvtm.git

README.md (13411B)


      1 # dvtm - dynamic virtual terminal manager
      2 
      3 [dvtm](http://www.brain-dump.org/projects/dvtm/) brings the concept
      4 of tiling window management, popularized by X11-window managers like
      5 [dwm](http://dwm.suckless.org) to the console. As a console window
      6 manager it tries to make it easy to work with multiple console based
      7 programs.
      8 
      9 ![abduco+dvtm demo](https://raw.githubusercontent.com/martanne/dvtm/gh-pages/screencast.gif)
     10 
     11 ## News
     12 
     13 - [dvtm-0.15](http://www.brain-dump.org/projects/dvtm/dvtm-0.15.tar.gz)
     14   [released](http://lists.suckless.org/dev/1601/28095.html) (09.01.2016)
     15 - [dvtm-0.14](http://www.brain-dump.org/projects/dvtm/dvtm-0.14.tar.gz)
     16   [released](http://lists.suckless.org/dev/1502/25558.html) (19.02.2015)
     17 - [dvtm-0.13](http://www.brain-dump.org/projects/dvtm/dvtm-0.13.tar.gz)
     18   [released](http://lists.suckless.org/dev/1411/24449.html) (15.11.2014)
     19 - [dvtm-0.12](http://www.brain-dump.org/projects/dvtm/dvtm-0.12.tar.gz)
     20   [released](http://lists.suckless.org/dev/1407/22702.html) (05.07.2014)
     21 - [dvtm-0.11](http://www.brain-dump.org/projects/dvtm/dvtm-0.11.tar.gz)
     22   [released](http://lists.suckless.org/dev/1403/20371.html) (08.03.2014)
     23 - [dvtm-0.10](http://www.brain-dump.org/projects/dvtm/dvtm-0.10.tar.gz)
     24   [released](http://lists.suckless.org/dev/1312/18805.html) (28.12.2013)
     25 - [dvtm-0.9](http://www.brain-dump.org/projects/dvtm/dvtm-0.9.tar.gz)
     26   [released](http://lists.suckless.org/dev/1304/15112.html) (3.04.2013)
     27 - [dvtm-0.8](http://www.brain-dump.org/projects/dvtm/dvtm-0.8.tar.gz)
     28   [released](http://lists.suckless.org/dev/1208/12004.html) (1.08.2012)
     29 - [dvtm-0.7](http://www.brain-dump.org/projects/dvtm/dvtm-0.7.tar.gz)
     30   [released](http://lists.suckless.org/dev/1109/9266.html) (4.09.2011)
     31 - [dvtm-0.6](http://www.brain-dump.org/projects/dvtm/dvtm-0.6.tar.gz)
     32   [released](http://lists.suckless.org/dev/1010/6146.html) (8.10.2010)
     33 - [dvtm-0.5.2](http://www.brain-dump.org/projects/dvtm/dvtm-0.5.2.tar.gz)
     34   [released](http://lists.suckless.org/dev/0907/0520.html) (7.07.2009)
     35 - [dvtm-0.5.1](http://www.brain-dump.org/projects/dvtm/dvtm-0.5.1.tar.gz)
     36   [released](http://lists.suckless.org/dwm/0902/7405.html) (8.02.2009)
     37 - [dvtm-0.5](http://www.brain-dump.org/projects/dvtm/dvtm-0.5.tar.gz)
     38   [released](http://lists.suckless.org/dwm/0901/7354.html) (26.01.2009)
     39 - [dvtm-0.4.1](http://www.brain-dump.org/projects/dvtm/dvtm-0.4.1.tar.gz)
     40   [released](http://lists.suckless.org/dwm/0805/5672.html) (10.05.2008)
     41 - [dvtm-0.4](http://www.brain-dump.org/projects/dvtm/dvtm-0.4.tar.gz)
     42   [released](http://lists.suckless.org/dwm/0802/4850.html) (17.02.2008)
     43 - [dvtm-0.3](http://www.brain-dump.org/projects/dvtm/dvtm-0.3.tar.gz)
     44   [released](http://lists.suckless.org/dwm/0801/4735.html) (12.01.2008)
     45 - [dvtm-0.2](http://www.brain-dump.org/projects/dvtm/dvtm-0.2.tar.gz)
     46   [released](http://lists.suckless.org/dwm/0712/4677.html) (29.12.2007)
     47 - [dvtm-0.1](http://www.brain-dump.org/projects/dvtm/dvtm-0.1.tar.gz)
     48   [released](http://lists.suckless.org/dwm/0712/4632.html) (21.12.2007)
     49 - [dvtm-0.01](http://www.brain-dump.org/projects/dvtm/dvtm-0.01.tar.gz)
     50   [released](http://lists.suckless.org/dwm/0712/4424.html) (08.12.2007)
     51 
     52 ## Download
     53 
     54 Either Download the latest source tarball
     55 [dvtm-0.15.tar.gz](http://www.brain-dump.org/projects/dvtm/dvtm-0.15.tar.gz)
     56 with sha1sum
     57 
     58     9bcec7af79b2adfead88c5513fa19b53dad6e134  dvtm-0.15.tar.gz
     59 
     60 compile (you will need curses headers) and install it
     61 
     62     $EDITOR config.mk && $EDITOR config.def.h && make && sudo make install
     63 
     64 or use one of the distribution provided packages:
     65 
     66  * [Debian](http://packages.debian.org/dvtm)
     67  * [Ubuntu](http://packages.ubuntu.com/dvtm)
     68  * [Fedora](https://admin.fedoraproject.org/pkgdb/package/dvtm/)
     69  * [openSUSE](http://software.opensuse.org/package/dvtm?search_term=dvtm)
     70  * [ArchLinux](http://www.archlinux.org/packages/?q=dvtm)
     71  * [Gentoo](http://packages.gentoo.org/package/app-misc/dvtm)
     72  * [Slackware](http://slackbuilds.org/result/?search=dvtm)
     73  * [FreeBSD](http://www.freshports.org/sysutils/dvtm/)
     74  * [NetBSD](http://www.pkgsrc.se/misc/dvtm/)
     75  * [OpenBSD](http://openports.se/misc/dvtm)
     76  * [Mac OS X](http://braumeister.org/formula/dvtm) via homebrew
     77 
     78 ## Why dvtm? The philosophy behind
     79 
     80 dvtm strives to adhere to the
     81 [Unix philosophy](http://www.catb.org/esr/writings/taoup/html/ch01s06.html).
     82 It tries to do one thing, *dynamic* window management on the console,
     83 and to do it well.
     84 
     85 As such dvtm does *not* implement [session management](#faq) but instead
     86 delegates this task to a separate tool called
     87 [abduco](http://www.brain-dump.org/projects/abduco/).
     88 
     89 Similarly dvtm's copy mode is implemented by piping the scroll back buffer
     90 content to an external editor and only storing whatever the editor writes
     91 to `stdout`. Hence the selection process is delegated to the editor
     92 where powerful features such as regular expression search are available.
     93 
     94 As a result dvtm's source code is relatively small
     95 ([~4000 lines of C](http://www.ohloh.net/p/dvtm/analyses/latest/languages_summary)),
     96 simple and therefore easy to hack on.
     97 
     98 
     99 ## Quickstart
    100 
    101 All of dvtm keybindings start with a common modifier which from now
    102 on is refered to as `MOD`. By default `MOD` is set to `CTRL+g` however
    103 this can be changed at runttime with the `-m` command line option.
    104 For example setting `MOD` to `CTRL-b` is accomplished by starting
    105 `dvtm -m ^b`.
    106 
    107 ### Windows
    108 
    109 New windows are created with `MOD+c` and closed with `MOD+x`.
    110 To switch among the windows use `MOD+j` and `MOD+k` or `MOD+[1..9]`
    111 where the digit corresponds to the window number which is displayed
    112 in the title bar. Windows can be minimized and restored with `MOD+.`.
    113 Input can be directed to all visible window by pressing `MOD+a`,
    114 issuing the same key combination again restores normal behaviour
    115 i.e. only the currently focused window will receive input.
    116 
    117 ### Layouts
    118 
    119 Visible Windows are arranged by a layout. Each layout consists of a
    120 master and a tile area. Typically the master area occupies the largest
    121 part of the screen and is intended for the currently most important
    122 window. The size of the master area can be shrunk with `MOD+h`
    123 and enlarged with `MOD-l` respectively. Windows can be zoomed into
    124 the master area with `MOD+Enter`. The number of windows in the
    125 master area can be increased and decreased with `MOD+i` and `MOD+d`.
    126 
    127 By default dvtm comes with 4 different layouts which can be cycled
    128 through via `MOD+Space`
    129 
    130  * vertical stack: master area on the left half, other clients
    131    stacked on the right
    132  * bottom stack: master area on the top half, other clients stacked below
    133  * grid: every window gets an equally sized portion of the screen
    134  * fullscreen: only the selected window is shown and occupies the
    135    whole available display area `MOD+m`
    136 
    137 Further layouts are included in the source tarball but disabled by
    138 default.
    139 
    140 ### Tagging
    141 
    142 Each window has a non empty set of tags [1..n] associated with it. A view
    143 consists of a number of tags. The current view includes all windows
    144 which are tagged with the currently active tags. The following key
    145 bindings are used to manipulate the tagsets.
    146 
    147 - `MOD-0`  view all windows with any tag
    148 - `Mod-v-Tab` toggles to the previously selected tags
    149 - `MOD-v-[1..n]` view all windows with nth tag
    150 - `Mod-V-[1..n]` add/remove all windows with nth tag to/from the view
    151 - `Mod-t-[1..n]` apply nth tag to focused window
    152 - `Mod-T-[1..n]` add/remove nth tag to/from focused window
    153 
    154 ### Statusbar
    155 
    156 dvtm can be instructed to read and display status messages from a named
    157 pipe. As an example the `dvtm-status` script is provided which shows the
    158 current time.
    159 
    160     #!/bin/sh
    161 
    162     FIFO="/tmp/dvtm-status.$$"
    163 
    164     [ -p "$FIFO" ] || mkfifo -m 600 "$FIFO" || exit 1
    165 
    166     while true; do
    167         date +%H:%M
    168         sleep 60
    169     done > "$FIFO" &
    170 
    171     STATUS_PID=$!
    172     dvtm -s "$FIFO" "$@" 2> /dev/null
    173     kill $STATUS_PID
    174     wait $STATUS_PID 2> /dev/null
    175     rm -f "$FIFO"
    176 
    177 ### Copymode ###
    178 
    179 `MOD+e` pipes the whole scroll buffer content to an external editor.
    180 What ever the editor writes to `stdout` is remembered by dvtm and can
    181 later be pasted with `MOD+p`.
    182 
    183 In order for this to work the editor needs to be usable as a filter
    184 and should use `stderr` for its user interface. Examples where this is
    185 the case include [sandy](http://tools.suckless.org/sandy) and
    186 [vis](http://github.com/martanne/vis).
    187 
    188     $ echo Hello World | vis - | cat
    189 
    190 ## Patches
    191 
    192 There exist a number of out of tree patches which customize dvtm's
    193 behaviour:
    194 
    195  - [pertag](http://waxandwane.org/dvtm.html) (see also the corresponding
    196    [mailing list post](http://lists.suckless.org/hackers/1510/8186.html))
    197 
    198 ## FAQ
    199 
    200 ### Detach / reattach functionality
    201 
    202 dvtm doesn't have session support built in. Use
    203 [abduco](http://www.brain-dump.org/projects/abduco/) instead.
    204 
    205     $ abduco -c dvtm-session
    206 
    207 Detach using `CTRL-\` and later reattach with
    208 
    209     $ abduco -a dvtm-session
    210 
    211 ### Copy / Paste does not work under X
    212 
    213 If you have mouse support enabled, which is the case with the
    214 default settings, you need to hold down shift while selecting
    215 and inserting text. In case you don't like this behaviour either
    216 run dvtm with the `-M` command line argument, disable it at run
    217 time with `MOD+M` or modify `config.def.h` to disable it completely
    218 at compile time. You will however no longer be able to perform
    219 other mouse actions like selecting windows etc.
    220 
    221 ### How to change the key bindings?
    222 
    223 The configuration of dvtm is done by creating a custom `config.h`
    224 and (re)compiling the source code. See the default `config.def.h`
    225 as an example, adapting it to your preference should be straightforward.
    226 You basically define a set of layouts and keys which dvtm will use.
    227 There are some pre defined macros to ease configuration.
    228 
    229 ### WARNING: terminal is not fully functional
    230 
    231 This means you haven't installed the `dvtm.info` terminfo description
    232 which can be done with `tic -s dvtm.info`. If for some reason you
    233 can't install new terminfo descriptions set the `DVTM_TERM` environment
    234 variable to a known terminal when starting `dvtm` as in
    235 
    236     $ DVTM_TERM=rxvt dvtm
    237 
    238 This will instruct dvtm to use rxvt as `$TERM` value within its windows.
    239 
    240 ### How to set the window title?
    241 
    242 The window title can be changed by means of a
    243 [xterm extension](http://tldp.org/HOWTO/Xterm-Title-3.html#ss3.2)
    244 terminal escape sequence
    245 
    246     $ echo -ne "\033]0;Your title here\007"
    247 
    248 So for example in `bash` if you want to display the current working
    249 directory in the window title this can be accomplished by means of
    250 the following section in your startup files.
    251 
    252     # If this is an xterm set the title to user@host:dir
    253     case "$TERM" in
    254     dvtm*|xterm*|rxvt*)
    255         PROMPT_COMMAND='echo -ne "\033]0;${USER}@${HOSTNAME}: ${PWD/$HOME/~}\007"'
    256         ;;
    257     *)
    258         ;;
    259     esac
    260 
    261 Other shells provide similar functionality, zsh as an example has a
    262 [precmd function](http://zsh.sourceforge.net/Doc/Release/Functions.html#Hook-Functions)
    263 which can be used to achieve the same effect.
    264 
    265 ### Something is wrong with the displayed colors
    266 
    267 Make sure you have set `$TERM` correctly for example if you want to
    268 use 256 color profiles you probably have to append `-256color` to
    269 your regular terminal name. Also due to limitations of ncurses by
    270 default you can only use 255 color pairs simultaneously. If you
    271 need more than 255 different color pairs at the same time, then you
    272 have to rebuild ncurses with
    273 
    274     $ ./configure ... --enable-ext-colors
    275 
    276 Note that this changes the ABI and therefore sets SONAME of the
    277 library to 6 (i.e. you have to link against `libncursesw.so.6`).
    278 
    279 ### Some characters are displayed like garbage
    280 
    281 Make sure you compiled dvtm against a unicode aware curses library
    282 (in case of ncurses this would be `libncursesw`). Also make sure
    283 that your locale settings contain UTF-8.
    284 
    285 ### The numeric keypad does not work with Putty
    286 
    287 Disable [application keypad mode](http://the.earth.li/~sgtatham/putty/0.64/htmldoc/Chapter4.html#config-features-application)
    288 in the Putty configuration under `Terminal => Features => Disable application keypad mode`.
    289 
    290 ### Unicode characters do not work within Putty
    291 
    292 You have to tell Putty in which
    293 [character encoding](http://the.earth.li/~sgtatham/putty/0.64/htmldoc/Chapter4.html#config-translation)
    294 the received data is. Set the dropdown box under `Window => Translation`
    295 to UTF-8. In order to get proper line drawing characters you proabably
    296 also want to set the TERM environment variable to `putty` or `putty-256color`.
    297 If that still doesn't do the trick then try running dvtm with the
    298 following ncurses related environment variable set `NCURSES_NO_UTF8_ACS=1`.
    299 
    300 ## Development
    301 
    302 You can always fetch the current code base from the git repository.
    303 
    304     git clone https://github.com/martanne/dvtm.git
    305 
    306 or
    307 
    308     git clone git://repo.or.cz/dvtm.git
    309 
    310 If you have comments, suggestions, ideas, a bug report, a patch or something
    311 else related to abduco then write to the
    312 [suckless developer mailing list](http://suckless.org/community)
    313 or contact me directly mat[at]brain-dump.org.
    314 
    315 [![Build Status](https://travis-ci.org/martanne/dvtm.svg?branch=master)](https://travis-ci.org/martanne/dvtm)
    316 [![Coverity Scan Build Status](https://scan.coverity.com/projects/4256/badge.svg)](https://scan.coverity.com/projects/4256)
    317 
    318 ## License
    319 
    320 dvtm reuses some code of dwm and is released under the same
    321 [MIT/X11 license](https://raw.githubusercontent.com/martanne/dvtm/master/LICENSE).
    322 The terminal emulation part is licensed under the ISC license.