From 1c64e7c7c512f54a4169e42ee68d180fdc4a11d3 Mon Sep 17 00:00:00 2001 From: Gwang O Lee Date: Thu, 4 Sep 2014 16:04:40 +0200 Subject: [PATCH] add "Close the current terminal" key binding Summary: First, you must delete the '~/.config/terminology/config/standard/base.cfg'. Key : Ctrl + Shift + End Reviewers: huchi, seoz, billiob Reviewed By: billiob Subscribers: seoz Differential Revision: https://phab.enlightenment.org/D1404 --- README | 1 + man/terminology.1 | 4 ++++ src/bin/config.c | 1 + src/bin/keyin.c | 8 ++++++++ 4 files changed, 14 insertions(+) diff --git a/README b/README index 326bb8e..96926d1 100644 --- a/README +++ b/README @@ -49,6 +49,7 @@ Shift+Keypad-Divide = Copy highlight to Clipboard (same as ctrl+c in gui apps) Ctrl+PgUp = switch focus to previous terminal inside a window Ctrl+PgDn = switch focus to next terminal inside a window Ctrl+Shift+t = create new terminal on top of current inside window (tabs) +Ctrl+Shift+End = close the focused terminal. Ctrl+Shift+h = toggle displaying the miniview of the history Ctrl+Shift+Home = bring up "tab" switcher Ctrl+Shift+PgUp = split terminal horizontally (1 term above the other) diff --git a/man/terminology.1 b/man/terminology.1 index 3d98723..aba7c57 100644 --- a/man/terminology.1 +++ b/man/terminology.1 @@ -236,6 +236,10 @@ Toggle displaying the miniview of the history. Create a new terminal on top of current inside window (tabs). . .TP +.B Ctrl+Shift+End +Close the current terminal. +. +.TP .B Ctrl+Shift+Home Bring up "tab" switcher. . diff --git a/src/bin/config.c b/src/bin/config.c index 15b4170..d4c37d0 100644 --- a/src/bin/config.c +++ b/src/bin/config.c @@ -314,6 +314,7 @@ _add_default_keys(Config *config) ADD_KB("Prior", 1, 0, 1, "split_h"); ADD_KB("Next", 1, 0, 1, "split_v"); ADD_KB("t", 1, 0, 1, "tab_new"); + ADD_KB("End", 1, 0, 1, "exited"); ADD_KB("Home", 1, 0, 1, "tab_select"); ADD_KB("c", 1, 0, 1, "copy_clipboard"); ADD_KB("v", 1, 0, 1, "paste_clipboard"); diff --git a/src/bin/keyin.c b/src/bin/keyin.c index 99dafbc..001ab83 100644 --- a/src/bin/keyin.c +++ b/src/bin/keyin.c @@ -756,6 +756,13 @@ cb_tab_new(Evas_Object *term) return EINA_TRUE; } +static Eina_Bool +cb_exited(Evas_Object *term) +{ + evas_object_smart_callback_call(term, "exited", NULL); + return EINA_TRUE; +} + static Eina_Bool cb_tab_select(Evas_Object *term) { @@ -903,6 +910,7 @@ static Shortcut_Action _actions[] = {"split_h", gettext_noop("Split horizontally (new below)"), cb_split_h}, {"split_v", gettext_noop("Split vertically (new on right)"), cb_split_v}, {"tab_new", gettext_noop("Create a new \"tab\""), cb_tab_new}, + {"exited", gettext_noop("Close the focused terminal"), cb_exited}, {"tab_select", gettext_noop("Bring up \"tab\" switcher"), cb_tab_select}, {"tab_1", gettext_noop("Switch to terminal tab 1"), cb_tab_1}, {"tab_2", gettext_noop("Switch to terminal tab 2"), cb_tab_2},