M config.def.h => config.def.h +8 -0
@@ 207,3 207,11 @@ static Action actions[] = {
static char const * const keytable[] = {
/* add your custom key escape sequences */
};
+
+/* Print dvtm's control sequence as it is typed in status bar, similar
+ * to :showcmd in vim.
+ *
+ * Change 0 to 1 to enable.
+ */
+#define FEATURE_PRINT_KEYS
+static const int config_print_keys = 0;
M dvtm.c => dvtm.c +12 -1
@@ 46,6 46,17 @@ int ESCDELAY;
# define set_escdelay(d) (ESCDELAY = (d))
#endif
+/*
+ * This feature was introduced in 0.15.1, and this code makes sure that
+ * it config file from 0.15 will continue compile as work as before.
+ */
+
+#ifndef FEATURE_PRINT_KEYS
+static const int compat_print_keys = 0;
+#else
+static const int compat_print_keys = config_print_keys;
+#endif
+
typedef struct {
float mfact;
unsigned int nmaster;
@@ 355,7 366,7 @@ drawbar(void) {
addstr(layout->symbol);
attrset(TAG_NORMAL);
- if (keys) {
+ if (compat_print_keys && keys) {
unsigned int keycount = 0;
while (keycount < MAX_KEYS && keys[keycount]) {
if (keys[keycount] < ' ')