Added protocol key to field
This commit is contained in:
parent
6973a703c5
commit
30b25da273
@ -1292,6 +1292,7 @@ tabs.title.format:
|
|||||||
- host
|
- host
|
||||||
- private
|
- private
|
||||||
- current_url
|
- current_url
|
||||||
|
- protocol
|
||||||
none_ok: true
|
none_ok: true
|
||||||
desc: |
|
desc: |
|
||||||
Format to use for the tab title.
|
Format to use for the tab title.
|
||||||
@ -1308,6 +1309,7 @@ tabs.title.format:
|
|||||||
* `{backend}`: Either ''webkit'' or ''webengine''
|
* `{backend}`: Either ''webkit'' or ''webengine''
|
||||||
* `{private}` : Indicates when private mode is enabled.
|
* `{private}` : Indicates when private mode is enabled.
|
||||||
* `{current_url}` : URL of the current web page.
|
* `{current_url}` : URL of the current web page.
|
||||||
|
* `{protocol}` : Internet Protocol of the current web page.
|
||||||
|
|
||||||
tabs.title.format_pinned:
|
tabs.title.format_pinned:
|
||||||
default: '{index}'
|
default: '{index}'
|
||||||
@ -1324,6 +1326,7 @@ tabs.title.format_pinned:
|
|||||||
- host
|
- host
|
||||||
- private
|
- private
|
||||||
- current_url
|
- current_url
|
||||||
|
- protocol
|
||||||
none_ok: true
|
none_ok: true
|
||||||
desc: Format to use for the tab title for pinned tabs. The same placeholders
|
desc: Format to use for the tab title for pinned tabs. The same placeholders
|
||||||
like for `tabs.title.format` are defined.
|
like for `tabs.title.format` are defined.
|
||||||
@ -1467,6 +1470,7 @@ window.title_format:
|
|||||||
- backend
|
- backend
|
||||||
- private
|
- private
|
||||||
- current_url
|
- current_url
|
||||||
|
- protocol
|
||||||
default: '{perc}{title}{title_sep}qutebrowser'
|
default: '{perc}{title}{title_sep}qutebrowser'
|
||||||
desc: |
|
desc: |
|
||||||
Format to use for the window title. The same placeholders like for
|
Format to use for the window title. The same placeholders like for
|
||||||
|
@ -181,6 +181,11 @@ class TabWidget(QTabWidget):
|
|||||||
except qtutils.QtValueError:
|
except qtutils.QtValueError:
|
||||||
fields['current_url'] = ''
|
fields['current_url'] = ''
|
||||||
|
|
||||||
|
try:
|
||||||
|
fields['protocol'] = self.tab_url(idx).url(options = QUrl.RemovePath)
|
||||||
|
except qtutils.QtValueError:
|
||||||
|
fields['protocol']= ''
|
||||||
|
|
||||||
y = tab.scroller.pos_perc()[1]
|
y = tab.scroller.pos_perc()[1]
|
||||||
if y is None:
|
if y is None:
|
||||||
scroll_pos = '???'
|
scroll_pos = '???'
|
||||||
|
Loading…
Reference in New Issue
Block a user