Provided by: dhex_0.65-1_i386
dhexrc -- Configuration File for dhex
dhexrc is the configuration file that specifies the colorscheme and the
key translation tab for dhex(1), Upon starting the program, it is being
read and parsed. It is being written and/or created after invoking the
A typical .dhexrc file looks like this:
'#possible colors are: BLACK,RED,GREEN,YELLOW,BLUE,MAGENTA,CYAN,WHITE'
'#possible extra flags are: UNDERLINE,REVERSE,BLINK,DIM,BOLD'
'KEYF1:1b 5b 31 31 7e'
'KEYF2:1b 5b 31 32 7e'
'KEYF3:1b 5b 31 33 7e'
'KEYF4:1b 5b 31 34 7e'
'KEYF5:1b 5b 31 35 7e'
'KEYF6:1b 5b 31 37 7e'
'KEYF7:1b 5b 31 38 7e'
'KEYF8:1b 5b 31 39 7e'
'KEYF9:1b 5b 32 30 7e'
'KEYF10:1b 5b 32 31 7e'
'KEYUP:1b 5b 41'
'KEYDOWN:1b 5b 42'
'KEYRIGHT:1b 5b 43'
'KEYLEFT:1b 5b 44'
'KEYPGUP:1b 5b 35 7e'
'KEYPGDOWN:1b 5b 36 7e'
'KEYHOME:1b 5b 37 7e'
'KEYEND:1b 5b 38 7e'
In the example above, the dhexrc file has three distinct sections: A
comment section, a color section and a key conversion tab section.
Comments are indicated with a '#' character. Everything afterwards in a
line is being ignored when parsing the file
There are 13 color groups. Each of the color group has a foreground
color, a background color and some extra flags, coming from ncurses. The
foreground color is being defined by FG= while the background color is
being defined by BG=. They and the extra flags are being separated by
','. Possible colors are BLACK, GREEN, RED, YELLOW, BROWN, BLUE, MAGENTA,
WHITE, and exclusively as foreground colors LIGHTBLACK, LIGHTGREEN,
LIGHTRED, LIGHTYELLOW, LIGHTBROWN, LIGHTBLUE, LIGHTMAGENTA and
LIGHTWHITE. Valid extra flags are UNDERLINE, REVERSE, BLINK, DIM and
The color pairs are as followed:
This specifies the color for the brackets around text fields.
This specifies the color in which the file's content is being shown.
When entering text, it is in this color.
The cursor in the hex field has this color.
This color is for informative text as well as for text fields which
are not taking input yet.
Menu items which are not selected belong into this color group.
The selected menu item gets this special color.
Hotkeys for menu items are visually distinct from the rest of the
text because they have this color.
If the actual menu item has a hotkey, it is shown in this color.
Some screens have frames. Those frames have this color.
Differences in the file's content (either because of changes or
because dhex is running in diff mode) are indicated by this color.
If the cursor is on one of those differences, it will have this
On top of the screen, there is a headline. Which is shown in this
Key conversion tab section
When pressing a "standard" key, something which can be mapped directly to
an ascii character, only this character will end up in ncurses' buffer.
However, pressing special keys like (for example) F1 or ALT+6 will
produce longer sequences. Mapping those sequences back to a specific key
is the job of the key conversion tab. (I was dissatisfied how ncurses
handled this on its own). The sequences are called (in order) KEYF1,
KEYF2, KEYF3, KEYF4, KEYF5, KEYF6, KEYF7, KEYF8, KEYF9, KEYF10, KEYESC,
KEYBACKSPACE, KEYDEL, KEYENTER, KEYTAB, KEYUP, KEYDOWN, KEYRIGHT,
KEYLEFT, KEYPGUP, KEYPGDOWN, KEYHOME and KEYEND.
Sequences itself are a string of lower case hex-values, each two nibbles
long. Currently, there is no way of adding an alternativ sequence to the
It is possible that the sequence made up of hex values does not REALLY
belong to the key. (For example if F2 was pressed in the setup program
when F1 was prompted). However, when this sequence ends up in the
ncurses buffer, it is being interpreted as if that key was pressed.
Report bugs to <firstname.lastname@example.org>. Make sure to include DHEX somewhere
in the subject.
Written by Thomas Dettbarn
dhex(1), dhex_markers(5), dhex_searchlog(5)