dvtm mod


| dvtm mod | Epic/Caché mod | AIX mod |

Advantages over vanilla dvtm

Screenshots

Running the tm script described below within mintty using the DejaVu Sans Mono font. Also, I use the summerfruit256 colorscheme in Vim

Tile of 4 terminal windows with a vim session on the left master window, two Caché text sessions identified with dynamic color rule backgrounds on the right, and a test color chart script running on the bottom right.   Grid of 4 terminal windows with two command line sessions on the left and two Caché text sessions identified with dynamic color rule backgrounds on the right.

dvtm package for Epic/Caché (tested on GNU/Linux and AIX compatibility)

Customized version of dvtm specifically to support key mappings and escape sequences used in Caché by Epic. Also includes string matching rules defined in the config.h file for dynamic terminal colors (foreground, background, and attributes). Rules are matched against the window title, and so can be defined to dynamically change based on userid, hostname, etc. See below for details on my configuration files and startup scripts.

To build, edit config.mk to match your local setup and customize config.h as you see fit. Then run make install. See the official dvtm website for more details.

dtach package for AIX compatibility

Customized version of dvtm specifically to compile on AIX.

To build I run ./configure then make, then cp -p dtach $PREFIX/bin/. See the official dtach website for more details.

Putting it all together: My configuration files and startup scripts

Ultimately, the command I use to launch dvtm in my AIX session is the tm script at the end of this section. It uses dtach and the dvtm-status script to start up the dynamic virtual terminal manager that I work in every day.

Changes I make to my config.h file:

#define Black 0 #define White 15 #define DeepSkyBlue4 24 #define Honeydew2 194 #define LightCyan1 195 #define OrangeRed1 202 #define MistyRose1 224 #define SELECTED_ATTR A_NORMAL #define SELECTED_FG White #define SELECTED_BG OrangeRed1 /* curses attributes for normal (not selected) windows */ #define NORMAL_ATTR A_NORMAL #define NORMAL_FG DeepSkyBlue4 #define NORMAL_BG Honeydew2 /* status bar (command line option -s) position */ #define BARPOS BarTop /* BarBot, BarOff */ /* curses attributes for the status bar */ #define BAR_ATTR A_NORMAL #define BAR_FG Honeydew2 #define BAR_BG DeepSkyBlue4 #define MOD CONTROL('a') static const ColorRule colorrules[] = { /* title attrs fgcolor bgcolor */ { "prod:", A_NORMAL, Black, MistyRose1 }, { "shad:", A_NORMAL, Black, LightCyan1 }, };

Changes I make to my config.mk file:

In order to compile on my AIX system, I have to remove -lutil from the LIBS variable in config.mk.

My dvtm-status script:

#!/bin/sh FIFO="$HOME/.dvtm-status" [ -e "$FIFO" ] || mkfifo "$FIFO" chmod 600 $FIFO while true; do echo "`df | grep -E '(9|10).%' | sed 's/.* \([0-9]*%\) \(.*\)/ \2:\1 /' | tr '\n' '-'`\ [`uptime | sed 's/.*age: //'`]\ [`date +\"%a %d-%b-%g %l:%M %p\"`" sleep 10 done > $FIFO & STATUS_PID=$! dvtm -s $FIFO "$@" 2>/dev/null kill $STATUS_PID rm $FIFO

My tm script:

#!/bin/sh SESS="$HOME/.dvtm-session" dtach -A $SESS -r winch dvtm-status $@

To Do

Resources