Add {backend} window/tab title field
This commit is contained in:
parent
d7d270ea28
commit
8e0565b79a
@ -356,7 +356,8 @@ def data(readonly=False):
|
|||||||
('window-title-format',
|
('window-title-format',
|
||||||
SettingValue(typ.FormatString(fields=['perc', 'perc_raw', 'title',
|
SettingValue(typ.FormatString(fields=['perc', 'perc_raw', 'title',
|
||||||
'title_sep', 'id',
|
'title_sep', 'id',
|
||||||
'scroll_pos', 'host']),
|
'scroll_pos', 'host',
|
||||||
|
'backend']),
|
||||||
'{perc}{title}{title_sep}qutebrowser'),
|
'{perc}{title}{title_sep}qutebrowser'),
|
||||||
"The format to use for the window title. The following "
|
"The format to use for the window title. The following "
|
||||||
"placeholders are defined:\n\n"
|
"placeholders are defined:\n\n"
|
||||||
@ -367,7 +368,8 @@ def data(readonly=False):
|
|||||||
"otherwise.\n"
|
"otherwise.\n"
|
||||||
"* `{id}`: The internal window ID of this window.\n"
|
"* `{id}`: The internal window ID of this window.\n"
|
||||||
"* `{scroll_pos}`: The page scroll position.\n"
|
"* `{scroll_pos}`: The page scroll position.\n"
|
||||||
"* `{host}`: The host of the current web page."),
|
"* `{host}`: The host of the current web page.\n"
|
||||||
|
"* `{backend}`: Either 'webkit' or 'webengine'"),
|
||||||
|
|
||||||
('modal-js-dialog',
|
('modal-js-dialog',
|
||||||
SettingValue(typ.Bool(), 'false'),
|
SettingValue(typ.Bool(), 'false'),
|
||||||
@ -675,7 +677,8 @@ def data(readonly=False):
|
|||||||
"* `{index}`: The index of this tab.\n"
|
"* `{index}`: The index of this tab.\n"
|
||||||
"* `{id}`: The internal tab ID of this tab.\n"
|
"* `{id}`: The internal tab ID of this tab.\n"
|
||||||
"* `{scroll_pos}`: The page scroll position.\n"
|
"* `{scroll_pos}`: The page scroll position.\n"
|
||||||
"* `{host}`: The host of the current web page."),
|
"* `{host}`: The host of the current web page.\n"
|
||||||
|
"* `{backend}`: Either 'webkit' or 'webengine'"),
|
||||||
|
|
||||||
('title-alignment',
|
('title-alignment',
|
||||||
SettingValue(typ.TextAlignment(), 'left'),
|
SettingValue(typ.TextAlignment(), 'left'),
|
||||||
|
@ -124,6 +124,7 @@ class TabWidget(QTabWidget):
|
|||||||
fields['title'] = page_title
|
fields['title'] = page_title
|
||||||
fields['title_sep'] = ' - ' if page_title else ''
|
fields['title_sep'] = ' - ' if page_title else ''
|
||||||
fields['perc_raw'] = tab.progress()
|
fields['perc_raw'] = tab.progress()
|
||||||
|
fields['backend'] = objreg.get('args').backend
|
||||||
|
|
||||||
if tab.load_status() == usertypes.LoadStatus.loading:
|
if tab.load_status() == usertypes.LoadStatus.loading:
|
||||||
fields['perc'] = '[{}%] '.format(tab.progress())
|
fields['perc'] = '[{}%] '.format(tab.progress())
|
||||||
|
Loading…
Reference in New Issue
Block a user