diff options
| author | Přemysl Janouch <p.janouch@gmail.com> | 2016-12-30 05:36:06 +0100 | 
|---|---|---|
| committer | Přemysl Janouch <p.janouch@gmail.com> | 2016-12-30 05:45:53 +0100 | 
| commit | bc631570c3b3875e8a03ecbbe6dfee483fb82053 (patch) | |
| tree | 6cab8dfb5bc6627b797c68c95be91e71a2219012 | |
| parent | dc33535bbbeef4fd2c15cde1eda9d0b858c5f615 (diff) | |
| download | hex-bc631570c3b3875e8a03ecbbe6dfee483fb82053.tar.gz hex-bc631570c3b3875e8a03ecbbe6dfee483fb82053.tar.xz hex-bc631570c3b3875e8a03ecbbe6dfee483fb82053.zip | |
Finishing touches for an early release
| -rw-r--r-- | README.adoc | 14 | ||||
| -rw-r--r-- | hex.c | 10 | ||||
| -rw-r--r-- | hex.png | bin | 0 -> 8165 bytes | 
3 files changed, 15 insertions, 9 deletions
| diff --git a/README.adoc b/README.adoc index 6f550f1..334add0 100644 --- a/README.adoc +++ b/README.adoc @@ -1,12 +1,15 @@  hex  === -'hex' is yet another hex viewer.  As of now, there are no advantages to it. +'hex' is yet another hex viewer.  Right now there are no advantages to it as it +has almost no features at all at this stage. + +image::hex.png[align="center"]  Plans  -----  In the future, it should be able to automatically interpret fields within files -using a set of Lua scripts. +using a set of Lua scripts, colorize them and show descriptions on the side.  Packages  -------- @@ -41,7 +44,8 @@ Or you can try telling CMake to make a package for you.  For Debian it is:  Note that for versions of CMake before 2.8.9, you need to prefix `cpack` with  `fakeroot` or file ownership will end up wrong. -Having the program installed, optionally create a configuration file and run it. +Having the program installed, optionally create a configuration file and run it +on a file of your choice.  Configuration  ------------- @@ -50,9 +54,9 @@ Create _~/.config/hex/hex.conf_ with contents like the following:  ....  colors = {  	footer     = "" -	highlight  = "bold" +	footer_hl  = "bold"  	bar        = "reverse" -	bar_active = "ul" +	bar_hl     = "reverse bold"  	even       = ""  	odd        = ""  	selection  = "reverse" @@ -24,10 +24,10 @@  // Avoiding colours in the defaults here in order to support dumb terminals.  #define ATTRIBUTE_TABLE(XX)                                    \  	XX( FOOTER,     "footer",     -1, -1, 0                  ) \ -	XX( HIGHLIGHT,  "highlight",  -1, -1, A_BOLD             ) \ +	XX( FOOTER_HL,  "footer_hl",  -1, -1, A_BOLD             ) \  	/* Bar                                                  */ \  	XX( BAR,        "bar",        -1, -1, A_REVERSE          ) \ -	XX( BAR_ACTIVE, "bar_active", -1, -1, A_REVERSE | A_BOLD ) \ +	XX( BAR_HL,     "bar_hl",     -1, -1, A_REVERSE | A_BOLD ) \  	/* View                                                 */ \  	XX( EVEN,       "even",       -1, -1, 0                  ) \  	XX( ODD,        "odd",        -1, -1, 0                  ) \ @@ -440,7 +440,7 @@ app_footer_field (struct row_buffer *b, char id, int len, const char *fmt, ...)  		coding = "be";  	char *key = xstrdup_printf ("%c%d%s", id, len * 8, coding); -	row_buffer_append (b, key, APP_ATTR (HIGHLIGHT)); +	row_buffer_append (b, key, APP_ATTR (FOOTER_HL));  	free (key);  	struct str value; @@ -462,7 +462,7 @@ app_draw_footer (void)  	// XXX: can we get rid of this and still make it look acceptable?  	chtype a_normal = APP_ATTR (BAR); -	chtype a_active = APP_ATTR (BAR_ACTIVE); +	chtype a_active = APP_ATTR (BAR_HL);  	struct row_buffer buf;  	row_buffer_init (&buf); @@ -848,6 +848,8 @@ g_default_bindings[] =  	{ "End",        ACTION_GOTO_BOTTOM,        {}},  	{ "M-<",        ACTION_GOTO_TOP,           {}},  	{ "M->",        ACTION_GOTO_BOTTOM,        {}}, +	{ "g",          ACTION_GOTO_TOP,           {}}, +	{ "G",          ACTION_GOTO_BOTTOM,        {}},  	{ "PageUp",     ACTION_GOTO_PAGE_PREVIOUS, {}},  	{ "PageDown",   ACTION_GOTO_PAGE_NEXT,     {}},  	{ "C-b",        ACTION_GOTO_PAGE_PREVIOUS, {}},Binary files differ | 
