Add shortcut to change tab's title
Signed off: Toan Pham <tpham3783@gmail.com>
This commit is contained in:
parent
d293b2531a
commit
ad7409fdfc
|
@ -232,6 +232,10 @@ Switch focus to next terminal inside a window (when using splits).
|
|||
Toggle displaying the miniview of the history.
|
||||
.
|
||||
.TP
|
||||
.B Ctrl+t
|
||||
Set tab's title.
|
||||
.
|
||||
.TP
|
||||
.B Ctrl+Shift+t
|
||||
Create a new terminal on top of current inside window (tabs).
|
||||
.
|
||||
|
|
|
@ -324,6 +324,7 @@ _add_default_keys(Config *config)
|
|||
ADD_KB("7", 1, 0, 0, 0, "tab_7");
|
||||
ADD_KB("8", 1, 0, 0, 0, "tab_8");
|
||||
ADD_KB("9", 1, 0, 0, 0, "tab_9");
|
||||
ADD_KB("t", 1, 0, 0, 0, "tab_title");
|
||||
|
||||
/* Alt- */
|
||||
ADD_KB("Home", 0, 1, 0, 0, "cmd_box");
|
||||
|
|
|
@ -387,6 +387,16 @@ cb_term_new(Evas_Object *termio_obj)
|
|||
return EINA_TRUE;
|
||||
}
|
||||
|
||||
static Eina_Bool
|
||||
cb_tab_set_title(Evas_Object *termio_obj)
|
||||
{
|
||||
Term *term = termio_term_get(termio_obj);
|
||||
if (!term)
|
||||
return EINA_FALSE;
|
||||
term_set_title(term);
|
||||
return EINA_TRUE;
|
||||
}
|
||||
|
||||
#define CB_TAB(N) \
|
||||
static Eina_Bool \
|
||||
cb_tab_##N(Evas_Object *termio_obj) \
|
||||
|
@ -617,6 +627,7 @@ static Shortcut_Action _actions[] =
|
|||
{"tab_8", gettext_noop("Switch to terminal tab 8"), cb_tab_8},
|
||||
{"tab_9", gettext_noop("Switch to terminal tab 9"), cb_tab_9},
|
||||
{"tab_10", gettext_noop("Switch to terminal tab 10"), cb_tab_0},
|
||||
{"tab_title", gettext_noop("Change title"), cb_tab_set_title},
|
||||
|
||||
{"group", gettext_noop("Font size"), NULL},
|
||||
{"increase_font_size", gettext_noop("Font size up 1"), cb_increase_font_size},
|
||||
|
|
Loading…
Reference in New Issue