Allow showing the name of the current layout and the number of windows in tab titles

Fixes #2634
This commit is contained in:
Kovid Goyal
2020-05-09 08:00:17 +05:30
parent 6edf00e699
commit 28fc9c69da
4 changed files with 25 additions and 6 deletions

View File

@@ -870,6 +870,11 @@ A template to render the tab title. The default just renders
the title. If you wish to include the tab-index as well,
use something like: :code:`{index}: {title}`. Useful
if you have shortcuts mapped for :code:`goto_tab N`.
In addition you can use :code:`{layout_name}` for the current
layout name and :code:`{num_windows}` for the number of windows
in the tab. Note that formatting is done by Python's string formatting
machinery, so you can use, for instance, :code:`{layout_name[:2].upper()}` to
show only the first two letters of the layout name, upper-cased.
'''))
o('active_tab_title_template', 'none', option_type=active_tab_title_template, long_text=_('''
Template to use for active tabs, if not specified falls back