it was not possible to show the current_url in tab or window title
note that I couldn't use {url} as field for the FormatString
This commit is contained in:
parent
0195f717c3
commit
ffab9e263f
@ -2792,6 +2792,7 @@ The following placeholders are defined:
|
|||||||
* `{host}`: The host of the current web page.
|
* `{host}`: The host of the current web page.
|
||||||
* `{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}` : The url of the current web page.
|
||||||
|
|
||||||
|
|
||||||
Type: <<types,FormatString>>
|
Type: <<types,FormatString>>
|
||||||
@ -2928,6 +2929,7 @@ The following placeholders are defined:
|
|||||||
* `{host}`: The host of the current web page.
|
* `{host}`: The host of the current web page.
|
||||||
* `{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}` : The url of the current web page.
|
||||||
|
|
||||||
|
|
||||||
Type: <<types,FormatString>>
|
Type: <<types,FormatString>>
|
||||||
|
@ -1224,6 +1224,7 @@ tabs.title.format:
|
|||||||
- scroll_pos
|
- scroll_pos
|
||||||
- host
|
- host
|
||||||
- private
|
- private
|
||||||
|
- current_url
|
||||||
none_ok: true
|
none_ok: true
|
||||||
desc: |
|
desc: |
|
||||||
The format to use for the tab title.
|
The format to use for the tab title.
|
||||||
@ -1239,6 +1240,7 @@ tabs.title.format:
|
|||||||
* `{host}`: The host of the current web page.
|
* `{host}`: The host of the current web page.
|
||||||
* `{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}` : The url of the current web page.
|
||||||
|
|
||||||
tabs.title.format_pinned:
|
tabs.title.format_pinned:
|
||||||
default: '{index}'
|
default: '{index}'
|
||||||
@ -1254,6 +1256,7 @@ tabs.title.format_pinned:
|
|||||||
- scroll_pos
|
- scroll_pos
|
||||||
- host
|
- host
|
||||||
- private
|
- private
|
||||||
|
- current_url
|
||||||
none_ok: true
|
none_ok: true
|
||||||
desc: The format to use for the tab title for pinned tabs. The same placeholders
|
desc: The 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.
|
||||||
@ -1371,6 +1374,7 @@ window.title_format:
|
|||||||
- host
|
- host
|
||||||
- backend
|
- backend
|
||||||
- private
|
- private
|
||||||
|
- current_url
|
||||||
default: '{perc}{title}{title_sep}qutebrowser'
|
default: '{perc}{title}{title_sep}qutebrowser'
|
||||||
desc: |
|
desc: |
|
||||||
The format to use for the window title.
|
The format to use for the window title.
|
||||||
@ -1385,6 +1389,7 @@ window.title_format:
|
|||||||
* `{host}`: The host of the current web page.
|
* `{host}`: The host of the current web page.
|
||||||
* `{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}` : The url of the current web page.
|
||||||
|
|
||||||
## zoom
|
## zoom
|
||||||
|
|
||||||
|
@ -164,6 +164,11 @@ class TabWidget(QTabWidget):
|
|||||||
except qtutils.QtValueError:
|
except qtutils.QtValueError:
|
||||||
fields['host'] = ''
|
fields['host'] = ''
|
||||||
|
|
||||||
|
try:
|
||||||
|
fields['current_url'] = self.tab_url(idx).url()
|
||||||
|
except qtutils.QtValueError:
|
||||||
|
fields['current_url'] = ''
|
||||||
|
|
||||||
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