~kaction/dvtm

53ce17ebc300dbc8af49bcc00535286eb4d0a757 — Dmitry Bogatov 2 years ago 668d9be
Include toggle for "showcmd" feature into config.def.h

Commit [426ff5f] introduced feature of displaying partially typed
keycombo keys; this commit introduces knob in "config.def.h" to turn it
off at compilation time.

Default value is "true" to not change behavior compared with 0.15.2.
2 files changed, 5 insertions(+), 1 deletions(-)

M config.def.h
M dvtm.c
M config.def.h => config.def.h +4 -0
@@ 55,6 55,10 @@ static Color colors[] = {
#define TAG_OCCUPIED (COLOR(BLUE) | A_NORMAL)
/* curses attributes for not selected tags which with urgent windows */
#define TAG_URGENT (COLOR(BLUE) | A_NORMAL | A_BLINK)
/* Display keys of partially typed keycombo next to layout icon.
 * Similar vim feature is called "showcmd".
 */
#define SHOW_COMBO true

const char tags[][8] = { "1", "2", "3", "4", "5", "6", "7", "8", "9" };


M dvtm.c => dvtm.c +1 -1
@@ 355,7 355,7 @@ drawbar(void) {
	addstr(layout->symbol);
	attrset(TAG_NORMAL);

	if (keys) {
	if (SHOW_COMBO && keys) {
		unsigned int keycount = 0;
		while (keycount < MAX_KEYS && keys[keycount]) {
			if (keys[keycount] < ' ')