From 80acc7fea74a3c687c71cd0ced8239f2e7527cf9 Mon Sep 17 00:00:00 2001 From: Ross Mohn Date: Mon, 27 Jul 2015 16:24:55 +0200 Subject: [PATCH] Change potentially destructive key bindigns The old bindings were too easy to press by accident. The have been changed to: MOD-x-x closes the focused window MOD-q-q quits dvtm --- config.def.h | 4 ++-- dvtm.1 | 4 ++-- testsuite.sh | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/config.def.h b/config.def.h index e25d83c..9813f4e 100644 --- a/config.def.h +++ b/config.def.h @@ -77,7 +77,7 @@ static Layout layouts[] = { static KeyBinding bindings[] = { { { MOD, 'c', }, { create, { NULL } } }, { { MOD, 'C', }, { create, { NULL, NULL, "$CWD" } } }, - { { MOD, 'x', }, { killclient, { NULL } } }, + { { MOD, 'x', 'x', }, { killclient, { NULL } } }, { { MOD, 'j', }, { focusnext, { NULL } } }, { { MOD, 'J', }, { focusnextnm, { NULL } } }, { { MOD, 'K', }, { focusprevnm, { NULL } } }, @@ -107,7 +107,7 @@ static KeyBinding bindings[] = { { { MOD, '8', }, { focusn, { "8" } } }, { { MOD, '9', }, { focusn, { "9" } } }, { { MOD, '\t', }, { focuslast, { NULL } } }, - { { MOD, 'q', }, { quit, { NULL } } }, + { { MOD, 'q', 'q', }, { quit, { NULL } } }, { { MOD, 'a', }, { togglerunall, { NULL } } }, { { MOD, CTRL('L'), }, { redraw, { NULL } } }, { { MOD, 'r', }, { redraw, { NULL } } }, diff --git a/dvtm.1 b/dvtm.1 index b8e72e9..14da56d 100644 --- a/dvtm.1 +++ b/dvtm.1 @@ -82,7 +82,7 @@ Create a new shell window. .B Mod\-C Create a new shell window using the current working directory of the focused window. .TP -.B Mod\-x +.B Mod\-x\-x Close focused window. .TP .B Mod\-l @@ -203,7 +203,7 @@ Apply nth tag to focused window. .B Mod-T-[1..n] Add/remove nth tag to/from focused window. .TP -.B Mod\-q +.B Mod\-q\-q Quit dvtm. .SS Mouse commands .TP diff --git a/testsuite.sh b/testsuite.sh index 4a828cd..766d1bd 100755 --- a/testsuite.sh +++ b/testsuite.sh @@ -42,7 +42,7 @@ test_copymode() { # requires wget, diff, vis dvtm_cmd 'p' dvtm_input "${ESC}dd:wq\n" while [ ! -r "$COPY" ]; do sleep 1; done; - dvtm_cmd 'q' + dvtm_input "exit\n" diff -u "$FILENAME" "$COPY" 1>&2 local RESULT=$? rm -f "$COPY" -- 2.11.4.GIT